 | Discussion Forum |  |
|
|
Port 2 & GP registers problemNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Jordi Roure Posted 30-Sep-2004 23:12 GMT Toolset C166 |  Port 2 & GP registers problem Jordi Roure I've got a problem where port 2 on a c166 gets written to for no apparent reason, and I was just wondering if anyone would have some suggestios on what could be the cause. My problem is the following:
Port 2 is configured as all outputs except for bit 0 (i.e. DPP2 = 0xFFFE). My application is apparently running smoothly, apart from some outputs that never get set when they should. After some investigation with the debugger, and having had a look at the assembler code generated, I noticed that the outputs do get set at some point, but for some strange reason they get reset as soon as the contents of R4 change.
I first thought that if for some reason the ?C_MAINREGISTERS section were overlapping the SFR area, that could cause the change of the contents of Port 2 (or part of it), but that seems quite improbable. Furthermore, looking at the map file, ?C_MAINREGISTERS seems to be correctly located between 0x0FC00 and 0x0FC1F.
I will appreciate any comments. Thanks. | | Read-Only Author Jordi Roure Posted 1-Oct-2004 08:45 GMT Toolset C166 |  RE: Port 2 & GP registers problem Jordi Roure Problem solved, I just forgot to disable some of the CCx pins on the microcontroller. | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|