As a Newbie to 8051_C I have a steep learning curve to climb. I wrote the following simple program: #include <REG320.H> #include <stdio.h> int xdata LED _at_ 0x0fd40; /*LED Mapped to External Memory Location FD40 via PAL */ sbit SW = P1^0; /*Switch connected to P1.0*/ void main (void) { SW = 1; /* Configure P1.0 as an input */ while (1) /* Forever Make LED lite if SWitch is on */ { LED = SW; /* Copy P1.0 to Memory Location FD40 */ } } In the debugger I watch SW, LED and memory location FD40. If I toggle P1.0 (SW) varible LED toggles but Memory FD40 never changes. What am I doing wrong? Thanks Brian
I may have found my Error. I think my memory window is pointing to code space. How do I redirect it to external Data space? Thanks Brian
If your memory window is pointing to code space, the addresses will be prefixed with "C:". To display external (XDATA) memory, prefix your address entry with "X:" in the address entry box.
That was it! Thanks much Brian