View previous topic :: View next topic |
Author |
Message |
Guard
Joined: 20 Jan 2005 Posts: 43
|
LCD character pattern |
Posted: Thu Mar 17, 2005 8:07 am |
|
|
Hi,
Do you know code for write character pattern on lcd?
Thanks |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Thu Mar 17, 2005 8:30 am |
|
|
A character is sent to the lcd with RS line held high.
Commands are send the same way with RS held low.
To do custom characters, you need to define the bit pattern with 8 byte values:
Code: | BYTE const lcd_custom[8] = {
0x1f,0x11,0x0a,4,0x0a,0x11,0x1f,0, //;picture of hour glass
};
|
First, initialize the lcd like normal.
Next you need to send 8 bytes to the lcd with RS held low. Be sure to send 8 bytes for each custom character. Each byte maps which squares are on or off for a single line of the 5 x 8 character block. |
|
|
nibble
Joined: 20 Jul 2005 Posts: 1
|
|
Posted: Wed Jul 20, 2005 12:19 pm |
|
|
Hi
How can i read character pattern from CGram? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Jul 20, 2005 6:03 pm |
|
|
Read that RAM address. |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
|
I am nibble Guest
|
|
Posted: Thu Jul 21, 2005 11:50 am |
|
|
I am using alphanumeric LCD.
I put rs to 0 and write to 0x40 for CGRAM address
then I put rs to 1 and write the chr pattern. ( 8 byte)
How read the ddram?
Thank |
|
|
I am nibble Guest
|
|
Posted: Thu Jul 21, 2005 12:08 pm |
|
|
I don't use R/W pin |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Jul 21, 2005 2:26 pm |
|
|
R/W
R = Read
W = Write
See if you can figure it out |
|
|
|