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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/15/10 11:56
Read: times


 
#176688 - lcd black
Responding to: ???'s previous message

clr lcdreset ; reset
LCALL WRITE_DELAY ; 40 MICROSEC
setb lcdreset
clr lcdfs
call read_status

MOV PA_BUFFER,#90h ; lcd off curser off
call CNTRL_WRITE
//// ;==================================================================
LCALL WAIT_1SEC
LCALL WAIT_1SEC
call error_status ;read_error flag
clr lcdreset ; reset
LCALL WAIT_1SEC
LCALL WAIT_1SEC
LCALL WAIT_1SEC
setb lcdreset
MAIN:
CPL WD_RESET
jmp main

;==================================================================
CNTRL_WRITE:
setb LCDce
setb LCDcd
setb lcdrd
setb LCDwr
MOV LCD_PORT,PA_BUFFER
nop
clr LCDce
clr LCDwr
LCALL WRITE_DELAY
setb LCDwr
setb LCDce
RET

;==================================================================

DATA_WRITE:
setb LCDce
setb LCDcd
setb lcdrd
setb LCDwr
MOV LCD_PORT,PA_BUFFER
nop
clr LCDcd
clr LCDce
clr LCDwr
LCALL WRITE_DELAY
setb LCDwr
setb LCDce
setb lcdcd
RET
;==================================================================
read_status:
push acc
mov LCD_PORT,#0ffh ; input
setb LCDce
setb LCDcd
setb lcdrd
setb LCDwr
nop
redstag:
clr LCDce
clr lcdrd
LCALL WRITE_DELAY
MOV a,LCD_PORT
;LCALL WRITE_DELAY
setb lcdrd
setb LCDce
anl a,#03h
cjne a,#03h,redstag
pop acc
RET
;==================================================================
error_status:
push acc
mov LCD_PORT,#0ffh ; input
setb LCDce
setb LCDcd
setb lcdrd
setb LCDwr
nop
rederstag:
clr LCDce
clr lcdrd
LCALL WRITE_DELAY
MOV a,LCD_PORT
;LCALL WRITE_DELAY
setb lcdrd
setb LCDce
anl a,#040h
cjne a,#00h,rederstag
pop acc
RET
;==================================================================
lcd contrast is ok it is changing from min to max by pot
the last small code i believe it will change lcd from black to white but it is not . why?
thanks for your responce


List of 7 messages in thread
TopicAuthorDate
128240A 1/128 duty - graphic still dark            01/01/70 00:00      
   contrast?            01/01/70 00:00      
   lcd black            01/01/70 00:00      
      please help me            01/01/70 00:00      
   please help            01/01/70 00:00      
   why nobody answer            01/01/70 00:00      
      Please provide the missing info            01/01/70 00:00      

Back to Subject List