axe134y OLED with 08M2 problem

the old fart

Senior Member
Hi Guys,

Can someone tell me what I'm doing wrong?

08M2 pin C.0 to OLED display. also tried on C.1, with same result.

location on oled is correct, the 'p' is displayed followed by the wrong characters.

clear screen command not always working.
add setfreq m4 but still the same.

If I connect the display to a 20x2 or a 40x2 it works as required.

voltage to oled measured at 5vdc.

Code:
; *******************************
; ***** Sample Header File  *****
; *******************************
;    Filename:         
;    Date:             
;    File Version:     
;    Written by:
;    Function:        
;    Last Revision:
;    Target PICAXE:    
; *******************************
setfreq m4
symbol baud=N2400_4
symbol OLED=c.0
; symbol OLED=c.1

main:
serout oled,baud,(254,1);Clear oled
pause 1000



serout oled,baud,(254,128,"power  on")



pause 5000

serout oled,baud,(254,193,"power  on")


pause 5000

serout oled,baud,(254,150,"power  on")
pause 5000

serout oled,baud,(254,215,"power  on")

goto main
thanks
TOF
 

hippy

Technical Support
Staff member
There are two potential problems -

The OLED is connected to C.0 which on the 08M2 is part of the serial download interface. Data may appear on that pin during download which can corrupt and confuse the OLED display.

You need a PAUSE to allow the OLED firmware to initialise before sending the clear screen. A PAUSE 500 should do the job.
 

the old fart

Senior Member
Hi Hippy,
Thanks for replying.

I get the same on pin C.1 as well. expected display rubbish when downloading.

tried PAUSE to allow OLED to startup, up to pause 10000, still the same.

checked lead to OLED, no shorts between, and good connections.

chip is marked 08M2+ TU41428
 

hippy

Technical Support
Staff member
Once an OLED gets confused it can stay that way until power-cycled.

You may need a longer PAUSE at start-up befor clear screen if the OLED puts up a welcome message. Have just tested an 08M2 and OLED 2x16 and this works for me -

Code:
#Picaxe 08M2
Pause 2000
SerOut C.1, N2400, ( 254, 1 )
Pause 1000
SerOut C.1, N2400, ( 254, $80, "Hello World" )
Do
  SerOut C.1, N2400, ( 254, $C0, #w0 )
  w0 = w0 + 1
  Pause 1000
Loop
 

the old fart

Senior Member
nope still the same.

replaced the 08M2 with a 20X2 on the test board.

worked perfect, after removing the #picaxe 08m2.

put 08M2 back into circuit, tried c.0, c.1 and c.2

still not working.

first character of Hello and first character of #W0 display.
tried 3 08M2 chips.

do I have an old chip?
 

hippy

Technical Support
Staff member
My 08M2 firmware is 4.A which was the first release of 08M2. Perhaps your 08M2 chip has been damaged ? Have you ever reprogrammed the firmware in the AXE134Y ?
 

the old fart

Senior Member
Tried on 3 08M2+ chips, all the same.
20x2 and 40x2 chips work perfect.
only firmware change was startup message to xxxxxxxxxxxxxxxxx

project I'm working on doesn't need display for final version, just for setting up.

could use debug or sertxt, but prefer oled.
 

hippy

Technical Support
Staff member
Not sure what the issue is. It sounds like it could be a baud rate issue but that would be odd if it accepts the first three bytes including the 254,x control codes and only fails after that. You could try splitting the data sequences up into separate SEROUT commands for each byte / character to see if that improves things.

What firmware versions are your 08M2, what power supply are you using, and are you working in any unusually high or low temperatures ?
 

the old fart

Senior Member
Hello World is displayed if output individually.

how do I check firmware version?

power supply, for project, is a new li-po battery and 7805, and test rig is on a 3A bench power supply. same results on both.

21degC temperature in my workshop.
 

hippy

Technical Support
Staff member
how do I check firmware version?
In PE6, in the Workspace Explorer section ( normally top left ), Settings tab ( at bottom of Workspace Explorer ), under Com Port section drop-down there's a "Check PICAXE type connected" link.
 

the old fart

Senior Member
califreq -8 displays message, but count above 10 give erratic characters .

decreasing to -15 doesn't make it any better.
 

hippy

Technical Support
Staff member
It does sound like there is some timing issue. Perhaps not so much with the operating speed or baud rate but with the inter-byte gap timing. There have been some issues on some early firmware releases of older PICAXE chips regarding inter-byte gap timing but no such issue listed for the 08M2 and it worked using the same firmware in my tests. In fact there has only ever been one 08M2 firmware release.

If the 08M2 is presumed okay, it could be the firmware in the AXE134Y which is not handling incoming bytes quickly enough. It would be worth reprogramming the AX134Y with the standard firmware to see what effect that has.

The default firmware is included with PE6: File -> Open Samples -> BASIC -> "AXE133 - Serial OLED Display" -> 18M2 -> "AXE133 - Serial OLED.bas".
 

the old fart

Senior Member
It does sound like there is some timing issue. Perhaps not so much with the operating speed or baud rate but with the inter-byte gap timing. There have been some issues on some early firmware releases of older PICAXE chips regarding inter-byte gap timing but no such issue listed for the 08M2 and it worked using the same firmware in my tests. In fact there has only ever been one 08M2 firmware release.

If the 08M2 is presumed okay, it could be the firmware in the AXE134Y which is not handling incoming bytes quickly enough. It would be worth reprogramming the AX134Y with the standard firmware to see what effect that has.

The default firmware is included with PE6: File -> Open Samples -> BASIC -> "AXE133 - Serial OLED Display" -> 18M2 -> "AXE133 - Serial OLED.bas".
Many thanks for the replies.

I'll try a fresh firmware install in the OLED, in the next few days.

I've ordered 25 08M2 chips, for my projects, will check with one of them first.

Regards
TOF
 

the old fart

Senior Member
It does sound like there is some timing issue. Perhaps not so much with the operating speed or baud rate but with the inter-byte gap timing. There have been some issues on some early firmware releases of older PICAXE chips regarding inter-byte gap timing but no such issue listed for the 08M2 and it worked using the same firmware in my tests. In fact there has only ever been one 08M2 firmware release.

If the 08M2 is presumed okay, it could be the firmware in the AXE134Y which is not handling incoming bytes quickly enough. It would be worth reprogramming the AX134Y with the standard firmware to see what effect that has.

The default firmware is included with PE6: File -> Open Samples -> BASIC -> "AXE133 - Serial OLED Display" -> 18M2 -> "AXE133 - Serial OLED.bas".

Hi Hippy,

tried new 08M2 chips, now displays message, but counter coruppted.

loaded firmware, into OLED, all working now.

Many thanks for your help.

Dave
 
Top