AXE134Y in Graphic mode

cpedw

Senior Member
I have succeeded in driving the AXE134Y 4 line by 20 character display in graphic mode using these:
SEROUT oled, speed, (254,31) 'Graphic mode, bright
SEROUT oled, speed, (254, 1) 'Clear Display

Then I can address the top 2 rows of the display, using SEROUT oled, speed, (254,64) and SEROUT oled, speed, (254,65).

But I can't find a way to access lines 3 and 4. I tried writing more than 100 bytes to line 1 (20 characters by 5 pixels) but it rolled over to line 2. Similarly, writing >100 to line 2 rolls back to line 1.

I've also tried positioning the cursor e.g. SEROUT oled, speed, (254,148) but that seems to move the cursor pixel-wise beyond 128 at row 1, pixel 1. Even SEROUT oled, speed, (254,240) started writing part way along line 1.

And increasing 64 and 65 in oled, speed, (254,64) doesn't work, at least 66 and 67 didn't do it.

Can anyone advise a way to access the 3rd and 4th rows in graphic mode?

Derek
 

hippy

Technical Support
Staff member
From the Winstar OLED datasheet I have -

When switched to graphics mode each column of the display is a sequential byte in memory. Each line is set by sending control code %01000000 ($40, 64, first row) or %01000001 ($41, 65, second row). Then control code %1nnnnnnnn ($80-$E3) where 'n' is column 0 to 99.

Each line is 20 characters by 5 pixels wide, 100 pixels in total, which is what the command set allows to be addressed.

That seems to match with what you are seeing.

That's for the 16x2/20x2 OLED driver and I don't have a 20x4 datasheet nor a 20x4 to try.

I would also have tried control codes %01000010 ($42,66) and %01000011 ($67) to access the third and fourth rows. Maybe try all of them to see if anything does flash up on the display, untested -

Code:
Do
  For b0 = $42 To $7F
     SerOut ... ( 254, b0 )
     SerOut ... ( 254, $80 )
     For b1 = 0 To 99
       SerOut ... ( $7F )
    Next
    Pause 100
  Next
Loop
Of course, if it's the same controller in the 20x4 as 16x2/20x2 or uses the same command set, it may be that the controller simply doesn't support four line graphics mode.

I suspect the controller was designed as an up to 80 character controller or as an up to 200x8 pixel control. It's just fortunate rather than intended that an up to 20x2 can also be used in graphics mode.
 
Last edited:

cpedw

Senior Member
I tried sending control codes (graphic y address) from 66 to 127 decimal and nothing appears on the display. So it seems that in graphic mode, only the top 2 lines are useable.

During my tests, even that operation has seemed to be hit and miss; I was putting it down to dodgy breadboard wiring and/or not enough pauses but I think Technical might be right; this device really isn't intended for use in graphic mode.
 

hippy

Technical Support
Staff member
The graphics mode has always worked when I have used it with text displays, though I only tested 8x2 and 16x2 displays -

http://www.picaxeforum.co.uk/showthread.php?29776-OLED-Analogue-Thermometer

It's not ideal because there's a gap every fifth pixel for the inter-character gap on the physical display, but other than that it did seem to work as expected.

The code I used ran on the the display board itself. When using stock AXE133 firmware and sending via serial commands you do need to take care that data bytes aren't misinterpreted as command codes.

It would probably make sense if using it for graphics mode to add an additional control code which allows it to have a command code sent which then expects a line value and 100(ish) column values, or a command code which says 'whatever the value is write the next byte as data'.

If you do add extra command codes at the end of the list then you may need to split lines or add pauses between sending the pairs of data ...

SerOut ....(252) : SerOut ... ($FF) ; Would normally be SerOut ... (252,$FF)
 
Top