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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/30/05 10:56
Modified:
  04/30/05 11:05

Read: times


 
#92642 - To Gondya!
Responding to: ???'s previous message
Gondya,
If you sure to writing data in to cgram
with this code you can read it from Character Generator Ram
and write it in to DDRAM or Data Display Ram

CGRAM_READ:
SETB LCD_EN
SETB LCD_RS
MOV A,ADRES ;ADRES is between 0-7 ,CGRAM Pointer
MOV P1,A ;P1 is for lcd pinoutCLR LCD_EN
LCALL DELAY1 ;40 us delay
CLR LCD_RS
RET

To writing character to special point of lcd
you must set ddram address before it

For example:

MOV A,#80H
LCALL ADDRESS ;Set DDRAM address,beginning of first line
MOV ADRES,#0
LCALL CGRAM_READ ;This Code Writes char in address#0 of cgram
;on to the beginning of first line


ADDRESS:
SETB LCD_EN
CLR LCD_RW
CLR LCD_RS
MOV P1,A
LCALL DELAY2 ;1.5 ms delay
CLR LCD_EN
LCALL DELAY1
RET


Good Luck
Mehdi

List of 4 messages in thread
TopicAuthorDate
Help Please on custom characters in LCD            01/01/70 00:00      
   CG RAM Character Codes            01/01/70 00:00      
   To Gondya!            01/01/70 00:00      
   Look into Michael Karas' Users Page            01/01/70 00:00      

Back to Subject List