Programming the OLED module

TinkerJim

Member
Once the firmware is downloaded, exactly how does one modify it to make the OLED show a different message when first starting up? Help appreciated!!!
 

russbow

Senior Member
I havn't played with the oled display but looking at the firmware code I think these are the relevant lines that you will need to change to personalise yourstored messages.

Code:
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
EEPROM $40, ("This is msg 4   ") 	; store msg in the EEPROM memory
EEPROM $50, ("This is msg 5   ") 	; store msg in the EEPROM memory
EEPROM $60, ("This is msg 6   ") 	; store msg in the EEPROM memory
EEPROM $70, ("This is msg 7   ") 	; store msg in the EEPROM memory
EEPROM $80, ("This is msg 8   ") 	; store msg in the EEPROM memory
EEPROM $90, ("This is msg 9   ") 	; store msg in the EEPROM memory
EEPROM $A0, ("This is msg 10  ") 	; store msg in the EEPROM memory
EEPROM $B0, ("This is msg 11  ") 	; store msg in the EEPROM memory
EEPROM $C0, ("This is msg 12  ") 	; store msg in the EEPROM memory
EEPROM $D0, ("This is msg 13  ") 	; store msg in the EEPROM memory
EEPROM $E0, ("This is msg 14  ") 	; store msg in the EEPROM memory
EEPROM $F0, ("This is msg 15  ") 	; store msg in the EEPROM memory
For instance, change "This is message 2 " to

"This is TinkerJim " and so on
 

westaust55

Moderator
@TinkerJim,

Firstly there is the assumption, based upon your comment about downloading the firmware, that you have an AXE133 based OLED display and not the AXE033Y based OLED display.
In this case as already mentioned you need to alter the message text and download the revised program into the 18M2 which controls the display.

Code:
#ifdef use_OLED		
EEPROM $00, ([COLOR="#FF0000"]"  Serial OLED   "[/COLOR]) 	; store msg in the EEPROM memory
#else
EEPROM $00, ("   Serial LCD   ") 	; store msg in the EEPROM memory
#endif
EEPROM $10, ([COLOR="#FF0000"]" www.picaxe.com "[/COLOR]) 	; store msg in the EEPROM memory
The two lines of program which by default show the messages in the OLED are highlighted above in red.

The other messages in the program code as "This is msg 2" through to "This is msg 15" are others you may refefine but not used by default at start-up.
 
Last edited:

TinkerJim

Member
I havn't played with the oled display but looking at the firmware code I think these are the relevant lines that you will need to change to personalise yourstored messages.

Code:
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
EEPROM $40, ("This is msg 4   ") 	; store msg in the EEPROM memory
EEPROM $50, ("This is msg 5   ") 	; store msg in the EEPROM memory
EEPROM $60, ("This is msg 6   ") 	; store msg in the EEPROM memory
EEPROM $70, ("This is msg 7   ") 	; store msg in the EEPROM memory
EEPROM $80, ("This is msg 8   ") 	; store msg in the EEPROM memory
EEPROM $90, ("This is msg 9   ") 	; store msg in the EEPROM memory
EEPROM $A0, ("This is msg 10  ") 	; store msg in the EEPROM memory
EEPROM $B0, ("This is msg 11  ") 	; store msg in the EEPROM memory
EEPROM $C0, ("This is msg 12  ") 	; store msg in the EEPROM memory
EEPROM $D0, ("This is msg 13  ") 	; store msg in the EEPROM memory
EEPROM $E0, ("This is msg 14  ") 	; store msg in the EEPROM memory
EEPROM $F0, ("This is msg 15  ") 	; store msg in the EEPROM memory
For instance, change "This is message 2 " to

"This is TinkerJim " and so on
Thanks Russbow. I got that part and changed the values of b0 and b1 at the Let commands following "#def use_welcome". But when I run a simulation, there is no output and the editor asks for some Serin data.

I even tried simulating the unmodified firmware program and the same thing happens.

I am reluctant to program the module 18M2 if the simulation doesn't work.
 

TinkerJim

Member
@TinkerJim,

Firstly there is the assumption, based upon your comment about downloading the firmware, that you have an AXE133 based OLED display and not the AXE033Y based OLED display.
In this case as already mentioned you need to alter the message test and download the revised program into the 18M2 which controls the display.

Code:
#ifdef use_OLED		
EEPROM $00, ([COLOR="#FF0000"]"  Serial OLED   "[/COLOR]) 	; store msg in the EEPROM memory
#else
EEPROM $00, ("   Serial LCD   ") 	; store msg in the EEPROM memory
#endif
EEPROM $10, ([COLOR="#FF0000"]" www.picaxe.com "[/COLOR]) 	; store msg in the EEPROM memory
The two lines of program which by default show the messages in the OLED are highlighted above in red.

The other messages in the program code as "This is msg 2" through to "This is msg 15" are others you may refefine but not used by default at start-up.
Thanks also Westaust55. Yes, I have the OLED and the 133 firmware downloaded and pasted into the Programming Editor.

As explained above in my reply to Russbow, the simulation doesn't seem to want to output or show the welcome messages.
 

westaust55

Moderator
Not sure how the simulator handles directives such as #IFDEF, etc

however for the OLED display for the program lines:

#picaxe 18M2
#define use_welcome ; display the welcome message upon power up
;define use_OLED ; enable this line for Winstar OLED modules

you need to remove the semicolon from the #define line as highlighted in red
 
Last edited:

hippy

Ex-Staff (retired)
Thanks Russbow. I got that part and changed the values of b0 and b1 at the Let commands following "#def use_welcome". But when I run a simulation, there is no output and the editor asks for some Serin data.

I even tried simulating the unmodified firmware program and the same thing happens.

I am reluctant to program the module 18M2 if the simulation doesn't work.
I'm not sure exactly what you have changed in the code but if you just want to stop the welcome message being displayed on startup simply comment out the "#define use_welcome" line as westaust55 suggests.

The simulator will handle #DEFINE and #IFDEF just like using a real PICAXE so the likely scenario is that you're expecting something in the Serial Output buffer but that won't happen because it's not serial output to the LCD / OLED.
 

TinkerJim

Member
;define use_OLED ; enable this line for Winstar OLED modules

you need to remove the semicolon from the #define line as highlighted in red
Thanks westaust55! Enabling the define use_OLED line did the trick; I didn't see the "Winstar" name on the module, so wasn't sure what to do with that line.
 

TinkerJim

Member
I'm not sure exactly what you have changed in the code but if you just want to stop the welcome message being displayed on startup simply comment out the "#define use_welcome" line as westaust55 suggests.

The simulator will handle #DEFINE and #IFDEF just like using a real PICAXE so the likely scenario is that you're expecting something in the Serial Output buffer but that won't happen because it's not serial output to the LCD / OLED.
Thanks, hippy ! Your comment about why the welcome mssgs do not appear in the simulator's Serial Output buffer window registered clearly! I have the OLED working just fine now !!
 

TinkerJim

Member
It is a Winstar OLED module but it should have came with a sticker saying 'Winstar' on the back of the module.
Oops! Yes, WINSTAR is right there in big bold letters on the sticker! I was focused on the model # etc. in the fine print!! Yet another lesson in humility today!!!

Thanks again for your help...TinkerJim
 
Top