CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LCD character pattern

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guard



Joined: 20 Jan 2005
Posts: 43

View user's profile Send private message

LCD character pattern
PostPosted: Thu Mar 17, 2005 8:07 am     Reply with quote

Hi,

Do you know code for write character pattern on lcd?
Thanks
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Thu Mar 17, 2005 8:30 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Jul 20, 2005 12:19 pm     Reply with quote

Hi
How can i read character pattern from CGram?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jul 20, 2005 6:03 pm     Reply with quote

Read that RAM address.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Jul 21, 2005 7:56 am     Reply with quote

For custom characters on a graphic LCD I use fontgen.
http://www.ccsinfo.com/forum/viewtopic.php?t=23640&highlight=lcd+font
I am nibble
Guest







PostPosted: Thu Jul 21, 2005 11:50 am     Reply with quote

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







PostPosted: Thu Jul 21, 2005 12:08 pm     Reply with quote

I don't use R/W pin
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Jul 21, 2005 2:26 pm     Reply with quote

R/W
R = Read
W = Write

See if you can figure it out
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group