Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/15/03 15:56
Read: times


 
#52674 - RE: Help me for LCD 16x2 , plz !
Responding to: ???'s previous message
Greeting,

Could you try this, I revise a little bit. I think the controller of your LCD is HD44780. You need to properly initialize it. Also, you must provide your initialization routine with proper Delay Time (I think some body suggested you to do that already.)

Anyway, after you power up, you wait for about 15mSec then initialize your LCD. Here is your code with some changes:

INIT_LCD:

SETB B0h.7 ;// EN
CLR B0h.6 ;// RS
MOV 80h,#30h
CLR B0h.7
;********************************
; You can\'t access the BF Bit yet
; You need to add some Time Delay
; routine here (5ms)
;;LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#30h
CLR B0h.7
;********************************
; You can\'t access the BF Bit yet
; You need to add some Time Delay
; routine here (1ms)
;;LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#30h
CLR B0h.7
LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#38h ;//8 bit, 2 rows, 5x7 dot
CLR B0h.7
LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#08h ;//cursor off, lcd off, no blink
CLR B0h.7
LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#01h ;// Clear LCD
CLR B0h.7
LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#0ch ;// Lcd On, cursor off
CLR B0h.7
LCALL WAIT_LCD

SETB B0h.7
CLR B0h.6
MOV 80h,#06h ;// Auto increment
CLR B0h.7
LCALL WAIT_LCD

RET

WAIT_LCD:

SETB B0h.7
CLR B0h.6
SETB B0h.5 ;// R/W
MOV 80h,#0FFh
MOV E0h,80h
;*******************************
; I MOVED THIS LINE DOWN FURTHER
;JB E0h.7,WAIT_LCD
;*******************************
CLR B0h.7
CLR B0h.5
JB E0h.7,WAIT_LCD

RET


List of 26 messages in thread
TopicAuthorDate
Help me for LCD 16x2 , plz !            01/01/70 00:00      
   RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
      RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
         RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
            RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
   RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
      RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
         RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
         RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
            RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
               RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
                  RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
                  RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
                     RE: Help me for LCD - Mak            01/01/70 00:00      
                        RE: Help me for LCD - Mak            01/01/70 00:00      
                     RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
      RE: Help me for LCD 26x48 , plz !            01/01/70 00:00      
         RE: Help me for LCD 26x48 , plz !            01/01/70 00:00      
         RE: Help me for LCD 26x48 , plz !            01/01/70 00:00      
         RE: Help me for LCD 26x48 , plz !            01/01/70 00:00      
   RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
      RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
         RE: P.S !            01/01/70 00:00      
      RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
   RE: Help me for LCD 16x2 , plz !            01/01/70 00:00      
   Muhammad Kamran            01/01/70 00:00      

Back to Subject List