ASCII symbol

Discussion in 'General Electronics Chat' started by nanobyte, Sep 25, 2006.

  1. nanobyte

    Thread Starter Senior Member

    May 26, 2004
    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.
  2. pebe

    AAC Fanatic!

    Oct 11, 2004
    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.
  3. Dave

    Retired Moderator

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

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

  4. sci-3d

    Well-Known Member

    Aug 22, 2006
    Assembly or C. I also work the same kind as you but I use C.

    I use ads7841 12 bit ADC convert analog output from Range Sensor.

    The value from Ads7841 is 12 bit BCD (0-4096) which can be easy displayed on LCD

    by using integer to ASCII convertion routine, see
  5. n9352527

    AAC Fanatic!

    Oct 14, 2005
    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.