This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I define one bit of Port6 as a symbol?(C8051F020)

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!

Parents Reply Children
No data