ICSP throwing taking port low

Thread Starter

wannaBinventor

Joined Apr 8, 2010
180
Sorry for the botched title. I'm always typing faster than I think.

I am using ICSP for programming my 16F84 (don't worry, I've already ordered some more modern PICs).

I have it set up as shown in the ICSP section linked below:

http://www.best-microcontroller-projects.com/pic16f84.html

I had a matrix keypad set up, and it was working in very sporadic ways/not at all. I had a code program set up (as in correct password activates some action).

I noticed that it was not scanning. Column 1 was on RB0, Column 2 on RB1, and Column 3 on RB2. I noticed that RB0 stayed logic 0; in other words, the program wasn't scanning. Further probing indicated that RB6 (connected for row 2 pin on keypad) was around 1 volt.

Because I am using ICSP, RB6 is connected to PGC (clock) on the PicKit2. If I disconnect the PGC wire from RB6 I get proper function out of my PIC and circuit.

I've never noticed PGC interfering with logic levels on that pin.

Is this normal?

Seems like something is messed up to me. Thoughts?
 
Last edited:

BMorse

Joined Sep 26, 2009
2,675
If using ICSP, and using those pins as IO (RB6 and RB7) the circuit connected to these pins need to be isolated from the programmer when connected, or you will have to disconnect whatever is connected to those pins when programming, then disconnect the pickit2 before reconnecting them to the circuit.



[The ICSPCLK or PGC and ICSPDAT or PGD pins need to be isolated from the
application circuit to prevent the programming signals from being affected by the
application circuitry. ICSPCLK or PGC is a unidirection synchronous serial
programming clock line from the programmer to the target. ICSPDAT or PGD is a
bidirectional synchronous serial programming data line.
If the design permits, dedicate these pins for ICSP. However, if the application circuit
requires that these pins be used in the application circuit, design the circuitry in a
manner that does not alter the signal level and slew rates. Isolation circuitry will vary
according to the application./QUOTE]
 
Top