 | Discussion Forum |  |
|
|
Debugger "Port 1 Error" messageNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Chris Kessell Posted 25-Apr-2001 16:23 GMT Toolset C51 |  Debugger "Port 1 Error" message Chris Kessell 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). | | Read-Only Author Jon Ward Posted 25-Apr-2001 17:31 GMT Toolset C51 |  RE: Debugger Jon Ward 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
| | Read-Only Author Chris Kessell Posted 27-Apr-2001 09:44 GMT Toolset C51 |  RE: Debugger Chris Kessell I think I've isolated the root of the problem. I'm using the PCA to generate a PWM waveform on one of the Port 1 outputs, so I normally have the corresponding P1 bit set to 1. However, at times I want to disable the PWM output temporarily so rather than mess with the PCA registers I use a quick and dirty method of setting the P1 bit to 0, forcing the output low. This works fine on the real microcontroller, but does seem to create a conflict within the debugger/simulator - hence the error message.
| |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|