| ??? 11/11/00 07:41 Read: times |
#6420 - Another LCD Problem |
Hello , You can see that i have no
luck with this chip :) i wrote a program to write text on my 16x2 Lcd. the problem is, that i only see on my lcd cursor on the end of the first line i think. here is the program , (you can ask me to email you if u like ) - after the program i'll mention how i connect every pin. ******************** jmp start MSG1: db 'Ofir Yacobi V1.0',000 stringwrite: clr a movc a,@A+dptr jz eom ;jump to end of message call cmdwrite inc dptr jmp stringwrite eom: ret cmdwrite: Mov 90h,A ; Post Accumulator at LCD data input Clr 0B3h ; Set 0B3h low (Instruction) Clr 0B5h ; Set 0B5h low (Write) Nop ; Wait circuit settling Setb 0B4h ; Tells the LCD to work (receive instruction byte) Nop ; Wait a little bit Nop ; Clr 0B4h ; Drop the selection line Ret ; Return to Caller ;END Of "cmdwrite" LCDInitialize: Mov A,#038h ; Data Lenght (8 bits), 2 lines, char 5x7 Call CmdWrite ; Needs 3 times this byte (1st) Call Delay10ms ; Some delay routine 10 milliseconds ; Call CmdWrite ; (second) Call Delay10ms ; Some delay routine 10 milliseconds ; Call CmdWrite ; (third) Call Delay10ms ; Some delay routine 10 milliseconds ; Mov A,#006h ; Move direction and Shift Display Call CmdWrite ; Call Delay10ms ; Some delay routine 10 milliseconds ; Mov A,#00Eh ; Display and Cu0B3hor On, not blinking Call CmdWrite ; ; Mov A,#001h ; LCD Clear Jmp CmdWrite ; ... and return to caller ret ;END OF INiTIaLIZATION delay10ms: nop nop nop nop nop nop nop nop ret ;END OF Delay start: call LCDInitialize mov dptr,#msg1 call stringwrite end ******************************** i can guess my program is not good.. connections: 8052 LCD ---- --- 1 7 2 8 3 9 4 10 5 11 6 12 7 13 8 14 13 4 14 6 15 5 Ofir. |
| Topic | Author | Date |
| Another LCD Problem | 01/01/70 00:00 | |
| RE: Another LCD Problem | 01/01/70 00:00 | |
RE: Another LCD Problem | 01/01/70 00:00 |



