CodePudding user response:
You are the p20 use wrongLed=P2 ^ 0;
CodePudding user response:
P is usually uppercase, and IO mouth are numbered, beginning P0,CodePudding user response:
Error: error LED does not defineSo to define the LED is a first operation
Previously used C51 line should remember this:
Unsigned char bdata p
Sbit led=p ^ 7//p ^ 7 value is 0, 7
CodePudding user response:
Do a port up to eight, values can only be 0 ~ 7Sbit led=P0 ^ N ; N=0 ~ 7 in a value