How can I write to the CPU registers(PORTCCFG,PORTBCFG,etc) and the Input-Output Port Registers(OUTB,OUTC,OEB,OEC, etc) of the 8051 microcontroller of the Cypress CY7C64613 chip in 'C'(language). I have the following lines in the header file: EXTERN xdata volatile BYTE PORTBCFG _AT_ 0x7F94; EXTERN xdata volatile BYTE PORTCCFG _AT_ 0x7F95; EXTERN xdata volatile BYTE OUTB _AT_ 0x7F97; EXTERN xdata volatile BYTE OUTC _AT_ 0x7F98; EXTERN xdata volatile BYTE OEB _AT_ 0x7F9D; EXTERN xdata volatile BYTE OEC _AT_ 0x7F9E; Currently am writing in the following way: PORTBCFG = 0x00; but the Keil compiler gives a warning "UNRESOLVED EXTERNAL SYMBOL" Actually what i want to do is get an quivalent of the following assembly code in C: mov dptr,#0x7f95 clr a movx @dptr,a Any suggestions??
Your snippet contains a keyword not predefined by any compiler: EXTERN. There's a likely candidate as to what your source code may define this word to mean, but without knowing that context, it's impossible to know what's wrong with your source. My guess is you overlooked this aspect yourself, and that that's exactly your problem.