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 CCS Technical Support

How to display special character degree c on LCD

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



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

How to display special character degree c on LCD
PostPosted: Thu Jul 01, 2004 8:03 am     Reply with quote

I want to show temperature in degree c in my LCD, how to print out this special character degree C simble?
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

PostPosted: Thu Jul 01, 2004 8:09 am     Reply with quote

Find the data sheet for your LCD display. Most manufacturers include a table of displayable symbols. Use the table to figure out the code to send.

If the table does not have the degree symbol, then you can make your own and store it in the CGRam of the display and call that instead.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jul 01, 2004 8:28 am     Reply with quote

I checked theback of my lcd it is CMC216NO6, I think it is from CMC company, however I could not find related datasheet anywhere, any suggestion that where I could get it?
Guest
Guest







Here's the data sheet
PostPosted: Thu Jul 01, 2004 8:39 am     Reply with quote

First hit on google brought up the (probable) data sheet for this....

Like most, 0xdf is the degree symbol.....

http://www.spezial.de/doc/cctech/cmc216-01.pdf
dyeatman



Joined: 06 Sep 2003
Posts: 1938
Location: Norman, OK

View user's profile Send private message

CMC216
PostPosted: Thu Jul 01, 2004 8:39 am     Reply with quote

This looks to be it... You will have to check and see.

Used Google and searched for CMC216 to find it.


www.spezial.de/doc/cctech/cmc216-01.pdf
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jul 01, 2004 8:49 am     Reply with quote

Thank you, I got it.
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jul 01, 2004 9:02 am     Reply with quote

Then after I know the code for degree c, then how should I program it

printf(lcd_putc, "%2d %sc",temperature, 0xdf);? oxdf is the code for degree c.
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Thu Jul 01, 2004 9:04 am     Reply with quote

All right, I got it, It is printf(lcd_putc,"%2d %c",temperature, 0xdf);
Thank you again
SimpleAsPossible



Joined: 19 Jun 2004
Posts: 21

View user's profile Send private message

PostPosted: Thu Jul 08, 2004 7:43 pm     Reply with quote

How about the escape sequence:
Code:
printf(lcd_putc, "%2d " "\xdf" "C", temperature);

or in octal notation which doesn't require the funny string stuff:
Code:
printf(lcd_putc, "%2d /337C",temperature, 0xdf);
Guest








PostPosted: Fri Jul 09, 2004 7:43 am     Reply with quote

Quote:

How about the escape sequence:
Code:
printf(lcd_putc, "%2d " "\xdf" "C", temperature);


is working fine
however the second command

Quote:

or in octal notation which doesn't require the funny string stuff:
Code:
printf(lcd_putc, "%2d /337C",temperature, 0xdf);


have "printf type is invalide" error
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