Hi all, I just want to ask why I cannot use this in C51:
... sbit INPUT1 = P0 ^ 0; sbit INPUT2 = P0 ^ 1; #define CHECK_INPUT ((INPUT1 << 7) | (INPUT2 << 6))
When try using it:
while(1) { ... unsigned char temp; temp = CHECK_INPUT; ... }
When compiled, the error: *** ERROR C193 IN LINE 40 OF xxx.c: '<<' : bad operand type
What should be the best thing to do? And why the error occur?
regards gee
Thanks Per and Hans for your very simple yet effective solution.
thanks again Gee