//Sending message "YES" to HyperTerminal (or TeraTerminal) via Serial 0 COM port on MDE 8051 Trainer //Tested by Mazidi //This is Examples 10-16 from "The 8051 Microcontroller" textbook by Mazidis & McKinlay //Download the program by putting the slide SW on PROG //After the download is completed, put the slide SW on RUN and Reset the board and you will see the message "YES" will appear on //screen //Notice the Serial 0 COM port is the same as the one used to download the program to MDE8051 Trainer #include void SerTx(unsigned char); void main(void) { TMOD=0x20; TH1=0xFD; SCON=0x50; TR1=1; while(1) { SerTx('Y'); SerTx('E'); SerTx('S'); } } void SerTx(unsigned char x) { SBUF=x; while(TI==0); TI=0; }