Hi all,

I thought I'd share the resolution to a problem I had using a board we designed that included three PIC controllers. It was elusive and took quite some time fumbling around before the cause presented itself.

The board we use has two 16f876s and one 16f877, though the problem would have occured with any PICS connected the following way.

The TX and RX lines were tied to all three chips from a MAX232 circuit. The board was connected by serial cable to my computer and each of the pics had the MicroCode Bootloader installed.

An on-board three-position jumper chose which pic would receive the MCLR LOW signal to initialize the correct pic for programming. And for a while it would seem that everything worked. And that is what really led me astray. Why would it work one day and not the next.

Long story short...

The TRIS register for PORTC has to be set properly so that the TX and RX pins are made INPUTS (high impedance) on EACH of the PICS. In my case, the '876s defaulted to a HIGH output on the TX (or RX) pin. When trying to program one of the PICs, the data signals would fight going LOW because the other pics would be stubbornly trying to hold the TX or RX lines HIGH. This meant that the PICS could only be programmed with one on board at a time.

Once I realized the problem, I set the TRIS registers on all three PICS to make their TX and RX pins INPUT. Then I could install all three PICS without further problems. Now I can boot-load programs to any of the three PICS with only a jumper change (for MCLR).

Having multiple PICS on a circuit board may be seldom done but it can be done with the MicroCode bootloader and work well.

I hope this helps someone in the future. This forum has helped me a great deal.

CUDOS to the forum GODS!

Ross