Degree symbol
Newzed
Posts: 2,503
I am unable to display the degree symbol, ASCII 186, on my LCD.· It does display on the debug screen.· Does this have to be a custom character?
SEROUT lcd, Baud, [noparse][[/noparse]L1, "Temp:· ", dec tF/10, 186,· " F"]·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
SEROUT lcd, Baud, [noparse][[/noparse]L1, "Temp:· ", dec tF/10, 186,· " F"]·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
Comments
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
I guess my Matrix Orbital LCD2041 is different than your serial display. Using the following line of code:
SEROUT LCDpin, N19200, [noparse][[/noparse]"Temp is: 65", 223, "F"]
Prints the degree symbol on mine.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Post Edited (Mike Cook) : 10/6/2005 11:36:15 PM GMT
·· If you check the documentation for the Display you will find that character is not implemented and must be created as a custom character.· Here is a DATA statement with the character data, code to load it and·the line to display it.
These routines are from different sections of the code and must be placed in their respective areas.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Like Mike, I've used ascii code 223 for the degree symbol.
In fact, i have data sheets for both the ubiquitous HD44780U controller, and for the Seetron ILM216 here in front of me, and both show ascii 223 as the degree symbol.
In a pinch, you can use an apostophe 39, accent 96 or carat 94. Or define your own in the character RAM as Chris suggested.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
serout lcd, baud, [noparse][[/noparse]"Temp· :', dec tf, 223, " F"]
an all I got was
Temp:· 84 F
I'd really like to use the degree symbol if I can get it to display.· Am I doing something wrong.
Sid
Just checked the documentation on the Parallax Serial LCD (#27976/27977)
It only supports characters (decimal) 32-127, looks like you will have to do what Chris suggested and make a custom character.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
SEROUT LCD, Baud, [noparse][[/noparse]"· ", DEC2 tempF, 0, "F "
What does the " 0 " refer to?· You wrote:
LcdCC0········· CON···· $F8············ ' Define Custom Char 0····
and
Download_Chars:
· FOR index = 0 TO 8··················· ' Download Custom Characters
··· READ CC0 + index, work············· ' Read EEPROM Data
··· SEROUT LCD, Baud, [noparse][[/noparse]work]··········· ' Send To LCD CGRAM
· NEXT
It looks like the serout to the LCD should use $F8 or work instead of 0.
Can you clarify - sorry to be so dumb.
Sid
$F8 is the command to Define custom character 0. This command must be followed by eight data bytes.
The routine:
FOR index = 0 TO 8 ' Download Custom Characters
· READ CC0 + index, work ' Read EEPROM Data
· SEROUT LCD, Baud, [noparse][[/noparse]work] ' Send To LCD CGRAM
NEXT
Loads the data statement:
CC0 DATA LcdCC0, $0C, $12, $12, $0C, $00, $00, $00, $00
That defines the "Degree" symbol (custom character)
To print the custom character loaded in to $F8 you would use the serial LCD display's command $0 to display the custom character.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Sid
You can do quite a bit with the custom characters. I did a Model Rocket launch controller about 5 years ago using a 4 line by 20 column Matrix Orbital LCD2041 serial display. I was able to define the rocket graphic and the animated "Flames" using all 8 custom characters. The rocket and flames were animated on several screens:
1. Rocket came down backwards when the display told the user to "Position Rocket on Launch Pad"
2. Rocket flashed when there was no continuity
3. Rocket flew "up" when the continuity tested "false" and the pad detect switch went "false" within a couple of seconds of each other.
Attached is an Excel sheet that I used to create the display graphics, so I would know what it would look like before I wrote any code.
Good luck with your project,
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Sid
·· Did you understand the code in the end?· I have been using that in several projects for temperature.· In fact I like the symbol I drew better than the stock symbol mentioned above, since on the LCD it tends to look more like a square.· You can also re-use CGRAM Characters on an LCD.
·· You have 8 custom characters to use, but that doesn't necessarily limit you to 8 characters.· Sometimes you might need custom characters for a splash screen that may never get used again.· You can always download the characters, display them, and then re-write them before you need the new ones.· Also note that on most HD44780-compatible displays you can re-write the CGRAM (Custom characters) while they're being displayed and they will change on the display.· This can be used to simulate animation of a cell.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thank you, Chris.· Thank you, Mike.
Sid
·· Glad you got it working.· I have been also working on a few examples for our display to share, such as two versions of a bar graph routine.· Either one will allow you to define a total and current count and display a Bar Graph on the display representing the percentage.· I hope to have these posted this weekend.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Sid
·· On the following page you will find what I used to create these characters.· It's a program Jon Williams wrote some time ago that gives you a data statement to match what needs to be downloaded into a Hitachi-Compatible display to get the character.· Plus it's easier to use than Graph Paper.
http://www.parallax.com/html_pages/downloads/software/software_LCDCC.asp
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
By doing it manually it helps me fully understand what's going on.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Thanks again to both of you.
Sid
Not to mention, along your last comment Sid, I do have quite a library of custom characters.· I have the digits 0-9 from the "byte" font.· Several symbols used in controllers I have built.· Audio symbols for my amplifier systems, and even a few funny ones, like all the pieces for the Pac-Man animation, as well as a ghost animation (As in the ghost from Pac-Man).· I think I have an animated torch as well.· The animated ones look cool if you know how to use them.
You may have seen an·Pac-Man animation from Parallax (Jon Williams), however you can animate characters in a single position on the display.· The torches were used on either side of the Splash Screen on a product I helped a friend build.· The character was cycled through 3 different frames of animation by re-setting the CGRAM location for that character.· It was a nice effect.· I will have to do another demo of it.· I also once saw an article for an Odometer style LCD display where the digits looked like they rolled up the screen because they were re-programmed on the fly to look like that.· Anyone know the link to that page?
[noparse][[/noparse]EDIT]· Found it! [noparse][[/noparse]/EDIT]
http://www.seetron.com/an_odo1.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 10/8/2005 4:38:36 PM GMT
I do agree, I ended up writing a character coder for the "Model Rocket Launch Controller" in vB so I could quickly, and frequently during development, generate an eeprom table for BASCOM-AVR. This speeded up development of the project.
But I do believe when you are learning the "ropes" it is fundamental to understand how to it by hand, because sometimes the "crutches" that I might rely on may not be handy.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
www.seetron.com/lcd_andex.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
·· You point is correct, and well taken.· It is true you should understand the fundamentals of how something works if you plan to use it.· I face this everytime I do an Ohm's Law calculation.· I understand Ohm's Law.· I've been using it for many years.· However, I find myself having to re-think the calculations at work when I use the Windows Calculator instead of my Engineering Calculator I have at home, which displays everything in direct electrical formulas and notations.· I guess to some degree (No pun intended) that lends some credibility to your statement.· Thanks for you input.·
Tracy,
·· Yes, Scott Edwards was the inspiration for us all when it came to LCDs, and later the savior of many when he released an inexpensive Serial Backpack for LCD Displays.· I will admit I stuck with Parallel Displays myself, but I knew a handful of people who stayed away from LCDs until Serial Interface was available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 10/8/2005 5:15:15 PM GMT