//Toggling Bit 7 of P2 on MDE 8051 Trainer //Tested by Mazidi //Modified from Example 7-12 in chapter 7 of the "8051 Microcontroller" textbook by Mazidis & McKinlay //Connect an LED to P2.7 and see it toggles //Or connect a buzzer to P2.7 pin and hear buzzer sound #include sbit mybit = P2^7; void MSDelay(unsigned int); void main(void) { while(1) { mybit=1; MSDelay(250); mybit=0; MSDelay(250); } } void MSDelay(unsigned int itime) { unsigned int i, j; for(i=0;i