AXE133 display problem

tonymillar

New Member
For some reason, an AXE133 oled display has suddenly switched to displaying all data in mirror mode. I replaced the display with another, & that displays text in normal mode, so the issue is with this particular module. Does anyone know if there is a command to set/reset mirror mode for this display module? I have searched the docs high & low for a complete 254 command set that might include such an instruction, but both the docs recommended give only the 10 common commands or the WINSTAR module codes. TIA
 

inglewoodpete

Senior Member
I've not experienced the problem you report. A check of the WS0010 document (Dated October 2010), that I downloaded in 2013 says on page numbered 22 (Acrobat Reader says it is page 24), that the data entry direction can be controlled by the "Entry Mode Set" command I/D bit. Does that help at all?
 

tonymillar

New Member
I've not experienced the problem you report. A check of the WS0010 document (Dated October 2010), that I downloaded in 2013 says on page numbered 22 (Acrobat Reader says it is page 24), that the data entry direction can be controlled by the "Entry Mode Set" command I/D bit. Does that help at all?
Thanks for the pointer. I'll have a play with it.
 

AllyCat

Senior Member
Hi,

AFAIK, the Entry Mode determines whether the characters are entered in the regular Left to Right (cursor) mode, or "Side-Scrolled" in from the Right-Hand side. Normally, it is "impossible" to (completely) mirror a character-based display, so perhaps you have a graphics-based version. Can you give a few more details? How many characters has the display, is it mirrored Left-Right or Up-Down and is it the whole display or individual characters? A photograph of the displayed characters (and ideally also of the "normal" display) might be very helpful.

Can you read any part numbers from the back of the main display board? Again a (close-up) photograph could be helpful, but it does look as if the "Display Controller" chip is mounted directly "Chip On Board" and is covered with a blob of Epoxy.

Cheers, Alan.
 

tonymillar

New Member
Sorry, been AFK for a week. Allycat, it's not a "graphics" version. It was in service for some 2 years displaying normally. Pix attached. As you can see, the display is laterally inverting all text - ie mirror image. Pic 2 is what it should display at powerup- and at some time, for some unknown reason the display became flipped! Pic 1 shows the powerup message of the faulty display with the some of the leading characters offset to the right. I will try Goeytex's idea. I didn't know the code for the onboard 18M2 was available. Thanks for your input.25025Pic1.jpg25026
 

AllyCat

Senior Member
Hi,

Ah, a picture is worth 1000 words; I wouldn't describe that as "mirrored" because each character is still displayed correctly. I would describe the sequence of the (ASCII) characters on the display being "reversed" and there is another feature that the first four characters of each line (" Se" and " www") are "missing", probably off the Right Hand side of the display area (noting that the display controllers are usually compatible with both 16 and 20-character rows).

Therefore, I can now at least see how the "fault" might occur, either in the PICaxe driver Program or in the display (controller) itself. However, I am not aware of any "intended" controller commands that could produce that effect, so still suspect a "fault" in the display module. But at least there are tests that can be done and perhaps the PICaxe program(s) modified to tolerate the problem.

First, ensure that the fault is truly "repeatable" by disconnecting all the components from the power supply and from each other, for at least a few minutes. Then reconnect and power up (preferably several times) to ensure that it really is a "hardware" fault. Next, connect a PICaxe Programming cable and Program Editor to the programming socket on the OLED display and use "Check Picaxe Type.." (PE6) or "Firmware version.." (PE5 > Options). If that is successful (and the fault remains) then download the PICaxe 18M2 OLED firmware from the store, modify it as required and try to reprogram the chip.

If the issue persists (and you still want to use the display), then we can look at modifying either the OLED driver program itself, or whatever program you wish to use with this faulty display. The first stage would be to create a test program to identify and verify that every character position on the display can still be written (individually and repeatably) with valid characters. Finally, write some kind of "conversion" (sub-) routine to display the desired text format on this display.

Cheers, Alan.
 

matchbox

Senior Member
I didn't know the code for the onboard 18M2 was available.
I've experienced the lines flipping before.
I tied it down to initialization problems. This particular display had seen stacks of ON time.

I found that I had to increase the Power stabilization time as high as 900mS.
And found it was beneficial to even increase the Pause time after sending the Clear Display command, during initialization.


Code:
#ifdef use_OLED
    ; Winstar OLED Module Initialisation
    ; according to WS0010 datasheet (8 bit mode)

    pause 500             ; Power stabilistation = 500ms

    ; Function set - select only one of these 4 character table modes
    ;let pinsB = %00111000     ; 8 bit, 2 line, 5x8 , English_Japanese table
    let pinsB = %00111001     ; 8 bit, 2 line, 5x8 , Western_European table1
    ;let pinsB = %00111010     ; 8 bit, 2 line, 5x8 , English_Russian  table
    ;let pinsB = %00111011     ; 8 bit, 2 line, 5x8 , Western_European table2

    pulsout enable,1      ;
    
    let pinsB = %00001100    ; Display on, no cursor, no blink
    pulsout enable,1 

    let pinsB = %00000001     ; Display Clear
    pulsout enable,1
    pause 7            ; Allow 6.2ms to clear display

    setfreq m16            ; now change to 16Mhz

    let pinsB = %00000010     ; Return Home
    pulsout enable,1

    let pinsB = %00000110     ; Entry Mode, ID=1, SH=0
    pulsout enable, 1
 

Jack Burns

New Member
I also had to increase Power stabilization time, and found that anything under 1000ms would give me intermittent results as to whether the OLED would correctly accept commands.

The Winstar OLED datasheet has a setting called "Entry Mode Set" which allows you to write backwards (as you are seeing) by changing bit 1 from a 1 to a 0.

This is where it is set in the firmware for normal operation:
let pinsB = %00000110 ; Entry Mode, ID=1, SH=0
Try reloading the firmware as AllyCat suggested. You call also try a "serout OLED,n2400,(254,6)" on your external PICAXE, and then send some text to the display to see which direction it displays. When bit 0 ("S") is set to 0, then only the cursor moves, however when it is set to 1 the text currently displayed will shift sideways as each new charter is sent to the display.

25027

25028
 

hippy

Technical Support
Staff member
It is weird. Note that for the Increment/Decrement on Write, the chip description says that happens after the data is written. So, if that were in play I would expect the initial character to still be the first character of the line, the next to be the last, character 20, and off-screen for a 16-character display.

It's hard to tell because the first character written is a space, so it might be worth changing the welcome message in the AXE133 firmware from "<SP><SP>Serial OLED<SP><SP>" to "0123456789ABCDEF", reporting what that shows.

But it's probably easier and sensible to try clearing the screen, homing the display, and writing from the PICAXE side first -

Code:
Pause 1000
SerOut ... ( 254, 1 ) ; Clear
Pause 100
SerOut ... ( 254, 2 ) ; Home
Pause 100
SerOut ... ( "0123456789ABCDEF" )
End
If Decrement on Write is in effect I would expect to see "0<SP><SP><SP><SP>FEDCBA98765", or "<SP><SP><SP><SP>FEDCBA987654" if it doesn't write the first to the first character of the line.

That might be curable, as Jack Burns suggests, with -
Code:
Pause 1000
SerOut ... ( 254, 1 ) ; Clear
Pause 100
SerOut ... ( 254, 2 ) ; Home
Pause 100
SerOut ... ( 254, 6 ) ; Entry Set Increment, No Shift
Pause 100
SerOut ... ( "0123456789ABCDEF" )
End
 

Flenser

Senior Member
The Winstar OLED datasheet has a setting called "Entry Mode Set" which allows you to write backwards
My understanding is that the 16x2 LCDs have a 40 char buffer where positions 1-16 are what you see displayed on line 1 and positions 21-40 are what you see displayed on line 2.
- If you set to line 1 and send a stream of 40 characters "abcdefghijklmnopqrstuvwxyz0123" you will see characters 1-16 displayed on line 1 and characters 21-36 displayed on line 2
- The AXE133 software writes the first 16 characters of the message to line 1 and then explicity switches to line 2 to write the 2nd 16 characters. Both message lines in the code include the leading and trailing spaces.

I'm assuming that the OLED displays have the same buffer for compatibility.

This means that pictures posted by tonymillar are completely consistent with the text being written starting at the end of the line.
i.e. If you were to write " Serial OLED " backwards starting from position 20 you would end up with the string " DELO lair" displayed in the first 16 positions on line 1. Similarly if you were to write "" www.picaxe.com " backwards starting from position 20 you would end up with the string " moc.exacip." displayed in the first 16 positions on line 2.
 

AllyCat

Senior Member
Hi,
The Winstar OLED datasheet has a setting called "Entry Mode Set" which allows you to write backwards (as you are seeing) by changing bit 1 from a 1 to a 0.
The "intended" configuration is to write a character in the right-most column and then to "auto- (left) scroll" (the display) so that the text still reads in a left-right direction. However, the controller actually has two flags, variously named "I/D" , "S" and "S/D" , sometimes with reference to the "Cursor" and sometimes to the "Display" or DDRAM (Display Data RAM), so the exact behaviour is unclear from the Data Sheet. But with 4 combinations (of 2 flags) and a potential desire for an automatic "Backspace / Delete / Overwrite / Correct Entry" type of function, it is possible that a "write backwards" function does exist. Probably a practical test of commands (254 , ) 4 to 7 is necessary.

For (physical) two-row displays, I believe the first row always starts at (Display RAM) address 128 (decimal) and the second row at 196 (i.e. $C0), but (for 4-row physical displays) the Display Controller chips map "Row 3" as a continuation of Row 1 and "Row 4" after Row 2. But to accept 20-characters (per row) displays, I believe some controllers start the additional Rows at addresses 148 / 216 , but others at 160 / 224 (i.e. $A0 / $E0), sometimes with the intervening RAM also implemented. However, I believe these values are set (only) by the "host" PICaxe program (not the 18M2 driver program) via the Serial Output "254 , x" command. As I suggested in para 1 of #7, the "faulty" text entry appears to be starting at "Column19" (counting from zero); it is not clear where this is being intialised but presumably it must be by the display controller itself.

Cheers, Alan.
 

tonymillar

New Member
Thanks guys. A heap of ideas to try, Unfortunately, I'm now away from home for about 2 weeks, but I'll start on the various suggestions as soon as I get home. Again, many thanks for the input.
Regards, Tony
 

hippy

Technical Support
Staff member
Just for information, testing Decrement on Write -
Code:
Symbol OLED = C.1
Symbol BAUD = N2400

Pause 1000 : SerOut OLED, BAUD, ( 254, 1 ) ; Clear
Pause  100 : SerOut OLED, BAUD, ( 254, 2 ) ; Home
Pause  100 : SerOut OLED, BAUD, ( 254, 4 ) ; Entry Set Decrement, No Shift
Pause  100 : SerOut OLED, BAUD, ( "0123456789ABCDEF" )
That shows -
Code:
 123456789-123456
.----------------.
|0               |
|                |
`----------------'
Changing the output to 64 bytes -
Code:
Pause  100 : SerOut OLED, BAUD, ( "0123456789ABCDEF" )
             SerOut OLED, BAUD, ( "0123456789ABCDEF" )
             SerOut OLED, BAUD, ( "0123456789ABCDEF" )
             SerOut OLED, BAUD, ( "abcdefghijklmnop" )
Shows -
Code:
 123456789-123456
.----------------.
|0               |
| ponmlkjihgfedcb|
`----------------'
First thing to note is it is the same whether the Entry Set is done before or after the Clear and Home.

The first character does go to DDRAM $80, 1st char of line 1. The address then decrements and wraps to $FF. The characters are then written backwards into DDRAM so, after 64 bytes, it ends with address as $C0, the last character 'p' having been written at $C1, 2nd char of line 2.

So what is being observed with the problem display doesn't seem to merely be a Decrement on Write issue.

It seems to me there is something causing the DDRAM character column addressing to be reversed, something outputting DDRAM $80-$93 as $93-$80, $C0-$D3 as $D3-$C0, 20 characters per line. I can tenuously see it as functionality a display driver might have, though pixel column drive reversal would make more sense, but I haven't seen either described in the WinStar datasheets and there's no indication of how that could be enabled or disabled using its version of the HD44780 command set.
 
Top