??? 02/24/05 02:26 Read: times |
#88263 - Problem with LCD code |
This is a good code for LCD beginner. But I still found some problem and hope can be resolve.
;to display "Hello There" from port 1 to LCD ;port 3.2 to RS ;port 3.3 to RW ;port 3.4 to Enable org 8000h lcdisp: mov a, #3ch acall command mov a, #0eh acall command mov a, #06h acall command mov a,#01h acall command mov a, #87h acall command mov a, #'H' acall display mov a, #'e' acall display mov a, #'l' acall display mov a, #'l' acall display mov a, #'o' acall display mov a, #0c7h acall command mov a, #'T' acall display mov a, #'h' acall display mov a, #'e' acall display mov a, #'r' acall display mov a, #'e' acall display here: sjmp here command: acall ready mov p1,a clr p3.2 clr p3.3 setb p3.4 clr p3.4 ret display: acall ready mov p1, a setb p3.2 clr p3.3 setb p3.4 clr p3.4 ret ready: clr p3.4 mov p1, #0ffh ;ready port1 for input clr p3.2 setb p3.3 ;read enable wait: clr p3.4 setb p3.4 jb p1.7, wait clr p3.4 ret end 1. For RS pin at LCD, what is difference if we write it to data register? What if we write it to command register as code above? 2. "Here: Sjmp Here" in the code meaning that the message "Hello There" can display at LCD forever? It refresh the prompt to LCD? 3. I think the problem is with subroutine display. I should clr RW, setb Enable and setb RS then only "move P1, a" then clr Enable, right? |
Topic | Author | Date |
Problem with LCD code | 01/01/70 00:00 | |
Re: LCD code problem.![]() | 01/01/70 00:00 |