Debugger "Port 1 Error" message

When trying to run a program under the latest version of the uVision2 debugger (v6.12), the simulator keeps halting with the error box "Port 1 Error - You have tried to modify a port pin which is configured as output!".

Although the message looks clear, I don't understand its meaning since the area of code where it happens doesn't have any Port 1 accesses! The error also doesn't occur when single-stepping, only when running at full speed.

It looks like a bug in the simulator. Can anyone else shed any light on it?

(Unfortunately my program is pretty big, and I haven't managed to replicate the problem with a small code fragment, so I can't (yet) post the offending code).

Parents
  • When you set one of the bits in P1 (the SFR) to 0 that signals that that pin is set as an output.

    If you subsequently change the corresponding pin value, you will receive this message. This message is designed to alert you that you have changed a pin that is not designated as an input.

    If the port pin should be an input, you'll have to set its SFR to a 1.

    Jon

Reply
  • When you set one of the bits in P1 (the SFR) to 0 that signals that that pin is set as an output.

    If you subsequently change the corresponding pin value, you will receive this message. This message is designed to alert you that you have changed a pin that is not designated as an input.

    If the port pin should be an input, you'll have to set its SFR to a 1.

    Jon

Children
More questions in this forum