Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Botched a $100 PCB...yyyaaayy

Status
Not open for further replies.

dknguyen

Well-Known Member
Most Helpful Member
So I found out that I botched a PCB but it's too late to cancel the order now so I gotta live with it. Well...when I found out I had botched it and had to make corrections and I ended up also adding a bunch of other stuff which means I will send away for a good board again anyways (another $100, ack). So now I have to salvage this PCB.

Anyways, it's a dsPIC control board for a chip with SPI/i2C/Programming/Emulation lines multiplexed to the same pin (with the emulation lines also multiplexed to a separate set of pins). What the board does it has a DPDT switch that is *supposed* to let you program the device, but then transfers the ICD jack to the emulation pins so you can debug with
I2C devices connected to the sytem.

My switch arrangement:
Switch Position 1- ICD2 jack -> I2C/Programming pins
Switch Position 2- ICD2Jack -> Emulation Pins

What I did not realize is that there is no harm sending programming messages to the emulation pins while programming. I also forgot about the pull-up resistors on the I2C lines which is not so bad since I can plug them externally into the I2C jack. The big problem is that for programming to work properly, I must basically unplug all I2C devices and the pull-up resistors from the I2C jack since these will prevent the ICD2 from programming properly.

Correct Switch Arrangement:
ICD2 Jack- Hardwired to Emulation Pins
Switch Position 1- programming/I2C pins -> ICD2 Jack
Switch Position 2- programming/I2C pins -> I2C port (and pull-up resistors)

So basically, what it boils down to is that for I2C to work I have to add to plug external pull-up resistors into the I2C jack which isn't too bad. But the switch does not disconnect the pull-up resistors (or I2C devices) from the programming/I2C pin when I need to program. It's just a pain.

Can anyone think of any way around this short of unplugging everything from the I2C jack every time I need to program? I'm pretty sure there's no way around it, so something like the suggestion of a jack that can be disconnected by a electrically disconnected by a button (but physically still connected) would be nice.
 
Last edited:
Here it is:

dsPIC- microcontroller schematic
Ports- Jacks and pretty much everything else
Power- Power regulation
PCB- The PCB traces. The big muddle under the chip is a ground plane. I'm not sure why it turned out looking like that. But the immediate area of interest is the area to the top-left of the microcontroller. It includes the I2C jacks, the ICD jack and the DPDT. The big thick thick traces are the power traces (some are 24V, some are 5V, and ground). The power and ground traces overlap each on the board.
 

Attachments

  • dsPIC.gif
    dsPIC.gif
    112.6 KB · Views: 127
  • Ports.gif
    Ports.gif
    126.9 KB · Views: 121
  • Power.gif
    Power.gif
    22.6 KB · Views: 109
  • PCB.gif
    PCB.gif
    260.4 KB · Views: 133
Last edited:
dknguyen said:
Can anyone think of any way around this short of unplugging everything from the I2C jack every time I need to program? I'm pretty sure there's no way around it, so something like the suggestion of a jack that can be disconnected by a electrically disconnected by a button (but physically still connected) would be nice.

Yes I can.
Make a new 5 or 6 pin header connector. In that connector, wire in the two pullup resistors and I2C bus devices through the new header.

Unplug the header, all the I2C stuff is gone. Plug in the programmer. Reverse order.
 
Sounds good. I have another question. In my corrected board there is like an almost whirlwind like set of traces for the I2C/SPI and switchover between programming and debug. I'm worried about crosstalk and I'm wondering if this makes a difference:

-Right now I'm using quite wide traces but it makes the traces closer together (more crosstalk potential I assume)
-Or I could use thinner traces which would make the traces farther a part (but more resistance along the lines. Not sure what this would do if anything.)

I'm not sure if this makes a difference at all and I should just keep them thick.

Here is the layout for my corrected PCB. The big long straight connections travelling across the PCB arching over everything are jumper wires. Notice the whirlwind type section to the top left of the PIC surrounding the Grayhill DPDT switch, just below the bank of I2C/SPI ports.
 

Attachments

  • atr-1_Model.gif
    atr-1_Model.gif
    311.9 KB · Views: 121
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top