We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
My system use Cygnal C8051f020.The program is with "#include <c8051f020.h>",which be compiled and specified " compiling shanghai.c... SHANGHAI.C(27): error C146: 'P6': invalid base address SHANGHAI.C(30): error C146: 'P4': invalid base address SHANGHAI.C(466): error C202: 'CE': undefined identifier SHANGHAI.C(467): error C202: 'CLE': undefined identifier " In the program ,I define: sbit CE = P4^4; sbit CLE = P6^5; First ,I think that 'main()' didn't call the headfile(C8051F020.h).But "P7"can use in the program everywhere,which be defined in C8051F020.h. How can I solve this? Thanks for help!
Note that this is also stated in the C51 Manual: "Not all SFRs are bit-addressable. Only those SFRs whose address is evenly divisible by 8 are bit-addressable." http://www.keil.com/support/man/docs/c51/c51_le_sbittype.asp