| ??? 12/01/00 00:34 Read: times |
#6860 - Need help with Serial to LCD program. |
I am some what new to 8051 programming and I need a little help or guidance with a program I am working on. The program basically takes incoming serial data and displays it on a 2x16 LCD display. The program does not seem to want to display the data, I have check and the serial functions seem to be working. I was wondering if any of you could take a look at my code and perhaps tell me where I am going wrong. Also what I would like to be able to do is when the serial data is complete on Line 1 of the LCD drop down to Line 2 to continue displaying the data. Thanks in advance!
Craig VFD EQU P0 RS EQU P2.0 E EQU P2.1 ORG 0200H MOV SCON,#50H ;Set for 8 bit variable baud MOV TMOD,#20H ;Set for Timer 1 MOV TH1,#253 ;Set TH1 to 253 MOV TCON,#40H SETB TR1 ORG 0H INTD: CLR RS MOV VFD,#38H CALL TOGGLE MOV VFD,#0FH CALL TOGGLE MOV VFD,#6 CALL TOGGLE MOV VFD,#1 CALL TOGGLE DATA0: CLR RI MOV R7,#11 MOV R1,#5FH SERIAL1: JNB RI,SERIAL1 MOV A,SBUF CLR RI MOV @R1,A INC R1 DJNZ R7,DISPLAYDATA DEC R7 CJNE R7,#0,SERIAL1 DJNZ R7,DISPLAYDATA RAM: MOV A,#1 MOV R1,#5FH MOV R7,#11 DISPLAYDATA: MOV A,@R1 MOV VFD,A CLR RS ACALL TOGGLE INC R1 DJNZ R7,DISPLAYDATA DEC R7 CJNE R7,#0,DISPLAYDATA DJNZ R7,DISPLAYDATA JMP DATA0 TOGGLE: SETB E CALL TD1 CLR E CALL TD1 RET TD1: MOV 30H,#5 MOV 31H,#0 WAIT: DJNZ 31H,WAIT DJNZ 30H,WAIT RET END |
| Topic | Author | Date |
| Need help with Serial to LCD program. | 01/01/70 00:00 | |
| RE: Need help with Serial to LCD program. | 01/01/70 00:00 | |
| RE: Need help with Serial to LCD program. | 01/01/70 00:00 | |
| RE: Need help with Serial to LCD program. | 01/01/70 00:00 | |
RE: Need help with Serial to LCD program. | 01/01/70 00:00 |



