Why don't the PORT bits change when I edit them?

Submitted by: TechTools

a) First note that the emulator accurately emulates the PICmicro® MCU. The PICmicro® MCU architecture updates the data output latch at the end of an instruction. Mathias freezes the system at the end of the instruction. The port PIN will accurately reflect the new value. HOWEVER, the PICmicro® MCU architecture does not read back the port pin until the beginning of the next instruction cycle. As soon as you STEP once, you will see the input value you expected.

b) Mathias reads the PIN states; not the data output latch (exactly like the PICmicro® MCU it is emulating). This means that Mathias will read and display the same values your program would read. Remember to verify that the TRIS bits are correctly configured to allow the written data to reach the pins. Also note that your target can affect the levels on these pins.

c) If experiencing a problem with Port A pin 4 (RA4), check the Data sheet for the device you are emulating. In most PICmicro® MCUs this pin is an an open drain and may require an external pullup, depending on your application.

d) See FAQ1 PART C about A/D converters