| ??? 01/21/05 12:27 Read: times |
#85489 - Writing to 8051-CY7C6461 registers in C |
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 equivalent of the following assembly code in C: mov dptr,#0x7f95 clr a movx @dptr,a Any suggestions?? |
| Topic | Author | Date |
| Writing to 8051-CY7C6461 registers in C | 01/01/70 00:00 | |
| EXTERN needs corresponding definition! | 01/01/70 00:00 | |
Cypress Header Files | 01/01/70 00:00 |



