??? 07/17/08 04:33 Read: times |
#156784 - SCON code question - data not seen |
Here is my code.
9600 baud / 8/n/1 No receive required, just send. I have tried hyperterminal and a Epson printer configured correctly, AND am using a null modem cable. I can see the serial data sent on my scope but neither the printer or the hyperterminal will recognixe the data and display it. 11.059 Xtal on AT89C4051 CPU chip. what am I doing wrong? ; SNDWNOW:MOV SCON,#01000000B MOV TH1,#0FDH MOV TMOD,#00100000B CLR RI ;NO RX COMM SETB TR1 ;TURN ON BAUD RATE TIMER ; MOV SBUF,#2AH ;SEND "*" CALL TSWAIT MOV SBUF,#57H ;SEND "W" CALL TSWAIT MOV SBUF,44H ;SEND MSD OF DATA CALL TSWAIT MOV SBUF,43H ;SEND LSD OF data CALL TSWAIT MOV SBUF,#0DH ;SEND "CR" CALL TSWAIT MOV SBUF,#0AH ;SEND "LF" CALL TSWAIT RET ; ; TSWAIT: JNB TI,TSWAIT CLR TI RET ; ; |