How do I make PORTA.5 on a 16F628 module function as an OUTPUT?

Submitted by: TechTools

You can't...and that is a good thing. :)
This is not a bug or an ICE limitation; this is how the real chip works.

You can set the jumpers to use it as an INPUT, but NOT an OUTPUT.

Some of the device Datasheet documentation says porta.5 is an I/O AND the MPLAB SIMULATOR allows you to use it that way. However, PORTA.5 is actually an INPUT ONLY.

On page 33 of the current datasheet(DS40300B as of today), the TRISA definition shows bit 5 as unimplemented. Also the PORTA.5 is defined as 'INPUT/MCLR' whereas the other pins are 'Bi-directional/some other function'.

The PIN DIAGRAMS (pages 31-32) for RA4 and RA5 show 4 as INPUT and 5 as I/O...but they are backwards. So the diagrams are inconsistent with the tables. Experience shows that the TABLES are correct; RA5 is INPUT only.