ASCII symbol

Thread Starter

nanobyte

Joined May 26, 2004
120
Does anybody out there know the correct ASCII code for the degree sign (like for temperature or angles). I have search all of the internet and cannot find it. There are plenty of sites out there that offer ASCII codes for the degree symbol, but thus far I haven't found a single one that is right. I'll take any number system (octal, hex, or decimal). I'm trying to displaying the temperature on a LCD.
 

pebe

Joined Oct 11, 2004
626
It's extended ASCII code 167 dec. That prints correctly to screen in 'Word'. But you cannot send it, as is, to an LCD display to print out.
 

Dave

Joined Nov 17, 2003
6,969
In light of pebe's comments.

Is there scope for creating your own degree symbol as part of a user-dfined chararcter map?

Dave
 

n9352527

Joined Oct 14, 2005
1,198
If you are using a Hitachi compatible LCD controller (such as HD44780), the degree symbol is mapped at 11011111 (0xDF). If not, then the easiest way to find out the code is from the datasheet. If no datasheet available, then you could try sending all possible combinations one by one and see what comes up. For example, with 8-bit parallel interface, you could send from 0x00 to 0xFF, keeping in mind that some of the codes are reserved and might do something else.
 
Top