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.
When I step through this code I get the error message above
//Write an 8051 C program to read the P1.0 and P1.1 bits and issue an //ASCII character to P0 according to the following table. //P1.1 P1.0 //0 0 send ‘0’ to P0 //0 1 send ‘1’ to P0 //1 0 send ‘2’ to P0 //1 1 send ‘3’ to P0 //Solution: #include <reg51.h> void main(void) { unsigned char z; z=P1; z=z &0x300; switch (z) { case(0): { P0='0'; break; } case(1): { P0='1'; break; } case(2): { P0='2'; break; } case(3): { P0='3'; break; } } }