OLED with Axe133y firmware how to Print to the OLED the stored messages?

kando

Senior Member
I wonder if you could help.. I have a 08m2 and that is connecting to the OLED LCD 2 line screen.
I would like to know how to program the 08m2 to tell the 18m2 to display the stored eeprom messages in it's memory.

these ones...

EEPROM $00, (" Serial OLED ") ; store msg in the EEPROM memory
#else
EEPROM $00, (" Serial LCD ") ; store msg in the EEPROM memory
#endif
EEPROM $10, (" www.picaxe.com ") ; store msg in the EEPROM memory

EEPROM $20, ("This is msg 2 ") ; store msg in the EEPROM memory
EEPROM $30, ("This is msg 3 ") ; store msg in the EEPROM memory

etc. I know the serial OLED and www.picaxe.com message prints out on the screen but how do you get the others to print out when started up?

Thank you
 

srnet

Senior Member
Did you try what the AXY133Y manual suggests for stored messages;

Message Commands (253)
Predefined messages are all prefixed by the number 253. There are up to 16 (0-15)
predefined messages, all stored within the AXE133 firmware program. To reprogram
the messages simply reprogram the PICAXE-18M2 chip.
serout B.7,N2400,(254,128) ; move to start of first line
serout B.7,N2400,(253,1) ; display predefined message 1
pause 10 ; allow message to updat
 

kando

Senior Member
Wow that was quick at a reply thanks.
Yes I have tried that. It's not what I meant though. I want to leave the 18m2 chip to do the input from my 08m2 chip and output to the OLED screen.
I would like to be able to say to the 18m2 chip.. Display the message from one of the 'slots' which are stored in eeprom (coming from in the axe133y basic program). I want to be able to do this from the 08m2 chip.
I hope that makes sense.
 

russbow

Senior Member
That's what srnet was saying.

Your 08m2 programe would serout pin,baud,(253,1) to the OLED 18m2 and the first message would display.

Try it, you can't break anything. :D
 

srnet

Senior Member
Wow that was quick at a reply thanks.
Yes I have tried that. It's not what I meant though. I want to leave the 18m2 chip to do the input from my 08m2 chip and output to the OLED screen.
I would like to be able to say to the 18m2 chip.. Display the message from one of the 'slots' which are stored in eeprom (coming from in the axe133y basic program). I want to be able to do this from the 08m2 chip.
I hope that makes sense.
The example in the manual is typical;

serout B.7,N2400,(253,1) ; display predefined message 1


The 'B.7' would need to be replaced with the serout pin you are using on your 08M2
 

kando

Senior Member
Thank you Srnet for your replies.
I have tried this but it doesn't work. Here is my test code.

Code:
symbol oled=c.2;pinout from 08m2
symbol baud=N2400;baud rate
symbol home=128;leftmost position of line 1
symbol base=192;leftmost position of line 2

main:
pause 5000
serout oled,baud,(254,1);clear display
pause 500
serout oled,baud,(253,3);display message from eeprom in 18m2
pause 500
serout oled,baud,(254,base," line 2 output  ")
pause 500

end
Is it wrong?
Line 2 prints out no problem but the message from the eeprom is not seen.
 

kando

Senior Member
The OLED comes up on power up and displays the two line message then the test program kicks in and clears the screen after 5 seconds. After that I get the line 2 message. I do not get the 253,3 message from the eeprom memory in the 18M2 chip.

So to answer your point these two lines don't appear to work....

serout oled,baud,(253,3);display message from eeprom in 18m2
pause 500

any thoughts?
 

kando

Senior Member
Srnet, you're a genius... It worked.
I thought that the clear screen command (254,1) put the cursor back at the home position. I guess it doesn't? is that correct?
So here is the test code again which now works and thank you again.
Code:
symbol oled=c.2;pinout from 08m2
symbol baud=N2400;baud rate
symbol home=128;leftmost position of line 1
symbol base=192;leftmost position of line 2

main:
pause 5000
serout oled,baud,(254,1);clear display
pause 500
serout oled,baud,(254,home)
pause 30
serout oled,baud,(253,3);display message from eeprom in 18m2
pause 500
serout oled,baud,(254,base," line 2 output  ")
pause 500

end
 

srnet

Senior Member
I thought that the clear screen command (254,1) put the cursor back at the home position. I guess it doesn't? is that correct?
It varies, some controllers do, some dont. By that I mean the actual controller that drives the display itself, not the 18M2.

However the AXE133Y manual does just say (254,1) clears the screen ...............
 

kando

Senior Member
That explains why I have been having problems with displaying on the OLED.
The command (254,2) works as well that puts the cursor in the home position.

Thanks for the help. Much appreciated.
 
Top