//Toggling P1 and P2 on MDE 8051 Trainer //Tested by Mazidi //Modified from Example 7-8 in chapter 7 of the "8051 Microcontroller" textbook by Mazidis & McKinlay //Connect the LEDs to P1 and P2 and see they are toggling #include void MSDelay(unsigned int); void main() { P1=0x0; P2=0x0; for(;;) { P1= 0x55; P2= 0x55; MSDelay(250); P1= 0xAA; P2= 0xAA; MSDelay(250); } } void MSDelay(unsigned int itime) { unsigned int i, j; for(i=0;i