;Sending letter "A" to HyperTerminal (or TeraTerminal) via Serial 1 (2nd COM port next slide Sw) on MDE 8051 Trainer ;Tested by M. Mazidi ;Modified from Example 10-11 in "The 8051 Microcontroller" textbook by Mazidis & McKinlay ;Download the program by putting the slide SW on PROG ;After the download is completed: ;a) disconnect the power, ;b) disconnect the serial cable from Serial 0 DB-9 and connect it to serial 1 DB-9 ;c) Make sure to put a jumper on S2 (next to Power LED) to connect the TXD ;d) Reconnect the power ;put the slide SW on RUN and Reset the board and you will see letter 'A' will appear on screen ;Notice the Serial 0 COM port is the one used to download the program to MDE 8051 Trainer ;and Serial 1 (2nd cOM port used in this example) is next to the slide SW for PROG/RUN SBUF1 EQU 0C1H ;the addresses for 2nd serial (serial 1) port SCON1 EQU 0C0H TI1 BIT 0C1H RI1 BIT 0C0H ORG 0H MAIN: MOV TMOD,#20H MOV TH1,#-3 ;notice -3 gives 9600 baud rate MOV SCON1,#50H SETB TR1 AGAIN: MOV A,#'A' ACALL SENDCOM2 SJMP AGAIN ;--------------------sending data via the 2nd serial port SENDCOM2: MOV SBUF1,A HERE: JNB TI1,HERE CLR TI1 RET ;------------------------ END