Electronic – PIC outputs while programming

microchipmicrocontrollerpic

Does anyone know what the state of the PORT pins are on a PIC when flashing the part? I am running a PIC 16F916 with an ICD3 programmer, and the IO pins are performing various functions, and need to understand what state they are in during programming when the PIC is energized.

Best Answer

In the datasheet for your microcontroller there are four tables, table 2-1 to 2-4, which describes all the registers, including PORTx and TRISx.

The tables have a column named Value on POR/BOR Reset and Value on all other Resets which describes the register state at startup and after resets.

As you can see for TRISA up to and including TRISD, the state is 1111 1111, which means that the pins are configured as inputs, or in other words, put the corresponding output driver in a High-impedance mode.

Unless I'm completely mistaken, the programming mode should not change this, except for the pins relevant to programming.