| ??? 08/21/03 21:28 Read: times |
#53052 - 2x16 lcd: only 1 line works? |
I've got a 2x16 LCD but although I initialize it with 2 display lines, It only shows 1 line, and I've looked it over and over again for hours now, but I can't find the problem.
connection LCD <> uC: D0 to D7 are connected to P1 P3.5 = RS P3.6 = R/W P3.7 = Enable the program shows 16 t's and let them scroll. teller .equ 10h .org 0000h MAIN mov r3,#255 ;delay lus4 mov r4,#255 lus5 djnz r4,lus5 djnz r3,lus4 mov r3,#255 ;delay lus6 mov r4,#255 lus7 djnz r4,lus7 djnz r3,lus6 acall LCDINIT mov ammo,#0ffh mov hits,#0 acall LCDSTAT LOOP mov A,#00011100b ;let the whole display scroll acall SENDC mov r3,#255 ;delay lus2 mov r4,#255 lus3 djnz r4,lus3 djnz r3,lus2 sjmp LOOP LCDSTAT mov teller,#16 ;print 16 t's lus1 mov A,#'t' acall SENDD djnz teller,lus1 ret LCDINIT setb P3.7 mov A,#00111100b ;init 8 bits, 2 lines, 5x7 character acall SENDC mov A,#00000001b ;home+clear acall SENDC mov A,#00001110b ;display on, cursor on, character blink off acall SENDC ret BUSY mov P1,#255 ;BusyFlag wait clr P3.5 setb P3.6 acall STROBE BF jb P1.7,BF ret SENDC clr P3.5 ;send commands clr P3.6 mov P1,a acall STROBE acall BUSY ret SENDD setb P3.5 ;send data clr P3.6 mov P1,a acall STROBE acall BUSY ret GOTO anl A,#10000000b ;display address jump acall SENDC ret STROBE clr P3.7 ;enable puls nop setb P3.7 ret .end I've tried 3 LCD's but none of them gave text on the 2nd line. thanks in advance, Martijn |
| Topic | Author | Date |
| 2x16 lcd: only 1 line works? | 01/01/70 00:00 | |
| little addition | 01/01/70 00:00 | |
| RE: little addition | 01/01/70 00:00 | |
| RE: little addition | 01/01/70 00:00 | |
| RE: 2x16 lcd: only 1 line works? | 01/01/70 00:00 | |
| RE: 2x16 lcd: only 1 line works? | 01/01/70 00:00 | |
| RTFM | 01/01/70 00:00 | |
| RE: RTFM- ? | 01/01/70 00:00 | |
| RE: RTFM- ? | 01/01/70 00:00 | |
| RE: RTFM- ? | 01/01/70 00:00 | |
RE: RTFM- ? | 01/01/70 00:00 | |
| RE: RTFM | 01/01/70 00:00 | |
| RE: 2x16 lcd: only 1 line works? | 01/01/70 00:00 | |
| it works now, but still some questions | 01/01/70 00:00 |



