OLED (axe133y) degree symbol (again?)

GreenLeader

Senior Member
Hi all
I've not been doing any PICAXEing for a while but I now have an axe133y serial LCD for a temperature project and I've not been able to work out how to display a degree symbol yet.
I've read thru a number of forum posts which gave some clues but I've not managed to turn them into anything that works!

I am not using the display in serial mode - I have adapted the "firmware" to read some DS18B20's on pins C.0,C.1,C.2.
That is all working well - I am able to read the values and display them on the OLED, but I just can't get a degree symbol to work!

Here are some code extracts to illustrate - modified from axe133y.bas that comes with the axe133y:
First define a "test" message (in EEPROM)
Code:
[color=Blue]EEPROM [/color][color=Navy]$30[/color][color=Black], [/color][color=Blue]([/color][color=Red]"+000 -000 +000 C"[/color][color=Blue])       [/color][color=Green]; store msg3 in the EEPROM memory[/color]
Now display it:
Code:
  [color=Blue]low rs                [/color][color=Green]; command mode
  [/color][color=Blue]let [/color][color=Purple]pinsB [/color][color=DarkCyan]= [/color][color=Navy]192       [/color][color=Green]; move to line 2, first character
  [/color][color=Blue]pulsout enable[/color][color=Black],[/color][color=Navy]1      [/color][color=Green]; pulse the enable pin to send data.
  [/color][color=Blue]high rs               [/color][color=Green]; character mode again  
  [/color][color=Blue]let [/color][color=Purple]b1 [/color][color=DarkCyan]= [/color][color=Navy]3            [/color][color=Green]; select message 3
  [/color][color=Blue]gosub [/color][color=Black]msg             [/color][color=Green]; print it[/color]
so how would I now write a degree symbol just before the letter "C"?
One of the things I tried was to copy and paste the degree symbol from the PE ASCII table wizard, like this:
Code:
[color=Blue]EEPROM [/color][color=Navy]$30[/color][color=Black], [/color][color=Blue]([/color][color=Red]"+000 -000 +000°C"[/color][color=Blue])       [/color][color=Green]; store msg3 in the EEPROM memory[/color]
but it did not work - some other weird symbol did display though!
I can see the degree symbol in the OLED Character Table in appendix 1 of the axe133y manual (its in row 3, column 13) but I have no idea how to use the table!

any more clues appreciated!!
 

BeanieBots

Moderator
The required code for the degree sign can vary from one display to another depending on the font it uses.
I cannot remember the code for the OLED but is probably $3D which most other displays use.
Try sending something like ("+000 -000 +000",$3d,"C") and see what happens.
 

Technical

Technical Support
Staff member
As BB says, column 3 (hex 3), row 13 (hex D) = $3D

row 14 (value hex D), column 3 (value hex 2) = $D2
 
Last edited:

GreenLeader

Senior Member
the clues have got me there thanks!
This works - its $D2 - found that mentioned in another post

Code:
[color=Blue]EEPROM [/color][color=Navy]$30[/color][color=Black], [/color][color=Blue]([/color][color=Red]"+000 -000 +000"[/color][color=Black],[/color][color=Navy]$D2[/color][color=Black],[/color][color=Red]"C"[/color][color=Blue])       [/color][color=Green]; store msg3 in the EEPROM memory[/color]
PS - its row 3, column 13 in the table in the axe133y manual.
I did not follow Technical's train of thought in converting the table from column 3, row 13 to hex numbers - could you elaborate so I can understand for future reference?
The table has row/column headers labelled "lower 4bit" and "upper 4bit" and gives the codes LLHL(lower) and HHLH(upper) for the degree symbol....
 

BeanieBots

Moderator
Decimal counts from 0 to 9 then rolls over to the next digit to give 10
In HEX it's similar but does not roll over until 16 because after 9 comes A then B,C,D,E,F and then 10 (one zero) which is 16 in decimal.
The table is a little confusing because it shows the numbers as two nibbles in binary (which is how HEX is written) but it uses H and L to indicate 0 and 1
If you put the two nibbles together (high first) you get HHLH LLHL. If written as 1's and 0's it becomes more obvious 1101 0010. (taken from AXE134 datasheet)
Convert each binary nibble to HEX gives D and 2 which gives you $D2.
OR, you could have done it in binary as %11010010 straight from the table without converting to HEX.
EEPROM $30, ("+000 -000 +000",%11010010,"C")
 

Technical

Technical Support
Staff member
Yes, we had it around the wrong way. Its also 14th column, not 13.

column 14 = value 13 (HHLH, %1101, $D)
row 3 = value 2 (LLHL, %0010, $2),

so put together as %1101 0010 = $D2
 

jims

Senior Member
Following this thread I put together this simple routine to watch characters on a Picaxe AXE133 OLD display. Routine uses PR6 simulate to show what's happening. Get Strange results with some of the characters. eg: @7D shows } as expected. $7E shows right arrow as expected. However $7F returns a strange character that I can't duplicate on my keyboard. Also $D2 returns a strange character and not a "degree" symbol.. Someone please try this and let me know what's happening.. Thank you, Jims
Code:
'** Use "serin" to enter data characters for this test routine.
'** Shows characters on AXE133 using PE6 simulate for 1 second,
'** then goes back to "serin" for next character.

symbol oled = C.1
#picaxe 08m2

main:
	serout oled,n2400, (254,1):pause 30	'Clear OLED
	serin C.3,n2400, b0	'Use serin to enter character for testing.
	serout oled,n2400, (254,128,b0)	'Send character to OLED
	pause 1000	'Pause long enough to see the character.
	goto main	'Go back for next character.
 

Technical

Technical Support
Staff member
Hippy meant the 'full' character set - the computer ASCII characters for 32-127 will be displayed in the simulation. This will be the same for most common LCD characters.
From 128-255 many different LCD/OLED displays vary in what they display, so will not always display as per your real life part either.
 
Last edited:

jims

Senior Member
Hippy meant the 'full' character set - the ASCII characters for 32-127 will be displayed in the simulation. This will be the same for most common characters.
From 128-255 many different LCD/OLED displays vary in what they display, so will not work always display as per your real life part in simulation either.
Thank you...Jims
 

jims

Senior Member
Hippy meant the 'full' character set - the computer ASCII characters for 32-127 will be displayed in the simulation. This will be the same for most common LCD characters.
From 128-255 many different LCD/OLED displays vary in what they display, so will not always display as per your real life part either.
I'm still confused...Both the AXE133Y OLED display and the AXE133 LCD display use the same data sheet. Appendix A in the data sheet is titled "OLED Character Table". However, it's not the same Character Table as in the AXE133Y OLED display. The AXE133Y OLED is neither the WESTERN EUROPEAN CHARACTER FONT TABLE 1, nor the WESTERN EUROPEAN CHARACTER FONT TABLE 2. What is the font table in the AXE133Y display? Jims
 

Technical

Technical Support
Staff member
The font table in the OLED is selectable, from 4 various tables, as shown in this datasheet.
http://www.picaxe.com/docs/oled.pdf
The example axe133y firmware includes code to show how to select the 4 different tables.

This is different to LCDs, which are generally fixed to 1 table. Unfortunately that LCD table does not always have the same higher characters (127+) in the same place , different brands will vary. However common letters and numbers (a-zA-Z0-9 etc.) are always in the same place. Various brands have been used in different batches of AXE133 kits over the years as availability changes, if you provide the exact LCD model from the sticker on its back we can provide the exact datasheet.
 

jims

Senior Member
Thank you....Technical. All of my OLED displays are mounted inside cases, and I don't have the time now to disassemble and reassemble them now. I'm going to drop this for now. Jims
 
Top