Graphics Mode on Oled display

DanielH

Member
Hi Guys

Ive been playing around alot with the 133y oled display, both in serial and using it as a stand alone display.

I know its only a character display but is also has the option of a graphics mode, i was wondering if there are any examples of using it in this mode? ive had a quick look but could not find much at all. I know the pixels between characters would not be able to be addressed but i think it still would be able to produce some nice effects even with this limitation..

Any pointers or examples would be appreciated.

Thanks
Daniel
 

hippy

Ex-Staff (retired)
Note quite doing all that I would expect, some columns seem to be missing ( and not between the character blocks ), but it's a start ...

Code:
#Picaxe 08M2
Pause 2000
SerOut C.2, N2400, ( 254, %00000001 ) ' Clear Screen
Pause 1000

SerOut C.2, N2400, ( 254, %00011111 ) ' Graphics Mode
SerOut C.2, N2400, ( 254, %10000000 ) ' GXA 0
SerOut C.2, N2400, ( 254, %01000000 ) ' GYA 0

For b0 = 1 To 4

SerOut C.2, N2400, ( %10000000 )
SerOut C.2, N2400, ( %01000000 )
SerOut C.2, N2400, ( %00100000 )
SerOut C.2, N2400, ( %00010000 )
SerOut C.2, N2400, ( %00001000 )
SerOut C.2, N2400, ( %00000100 )
SerOut C.2, N2400, ( %00000010 )
SerOut C.2, N2400, ( %00000001 )
SerOut C.2, N2400, ( %00000011 )
SerOut C.2, N2400, ( %00000111 )
SerOut C.2, N2400, ( %00001111 )
SerOut C.2, N2400, ( %00011111 )
SerOut C.2, N2400, ( %00111111 )
SerOut C.2, N2400, ( %01111111 )
SerOut C.2, N2400, ( %11111111 )
SerOut C.2, N2400, ( %11111110 )
SerOut C.2, N2400, ( %11111100 )
SerOut C.2, N2400, ( %11111000 )
SerOut C.2, N2400, ( %11110000 )
SerOut C.2, N2400, ( %11100000 )
SerOut C.2, N2400, ( %11000000 )
SerOut C.2, N2400, ( %10000000 )

Next

Do : Loop
 

nick12ab

Senior Member
Note quite doing all that I would expect, some columns seem to be missing ( and not between the character blocks ), but it's a start ...
Be aware that this line:
Code:
SerOut C.2, N2400, ( %11111110 )
is the same as sending 254 to the serial LCD controller which means the next byte will be sent from the serial controller to the OLED display as an instruction.

I've tested your code and the result is that every column between the character blocks is skipped and the column of data shown above (254) is completely missing from the display but surprisingly the column of data afterwards is still shown on the display as data rather than interpreted as an instruction.

This means that the serial controller is not suitable for driving the OLED in graphic mode if %11111110 ever needs to be displayed and the parallel interface should be used.
 

hippy

Ex-Staff (retired)
Be aware that this line:
Code:
SerOut C.2, N2400, ( %11111110 )
is the same as sending 254 to the serial LCD controller which means the next byte will be sent from the serial controller to the OLED display as an instruction.
Well done on spotting that.

It wouldn't be a problem in the OLED driving 18M2 but does point to a need to change the AXE132 serial firmware to add a pass-through command if wanting to send 8-bit pixel data via serial.
 

nick12ab

Senior Member
A conversion of Hippy's code for the 8-bit parallel interface - (the AXE133 IC is programmed directly with this)
Code:
#picaxe 18m2
#no_data
#no_end
symbol lcddata = pinsB
symbol rs = C.7
symbol enable = C.6

start:
	dirsB = 255								'Set pinsB as outputs
	low rs								'instruction mode
	output enable							'set enable pin as output
	
	lcddata = %00111011 : pulsout enable,16			'Function Set: 8-bit, 2 lines, font 11
	lcddata = %00000001 : pulsout enable,608			'Clear display
	lcddata = %00001100 : pulsout enable,608			'Display on/off control: Display on, cursor off, blink off
	lcddata = %00000110 : pulsout enable,16			'Entry mode set: Increment, cursor shift
	
	lcddata = %00011111 : pulsout enable,1			'graphics mode
	lcddata = %10000000 : pulsout enable,1			'GXA 0
	lcddata = %01000000 : pulsout enable,1			'GXY 0
	
	high rs
	for b0 = 1 to 4
		lcddata = %10000000 : pulsout enable,1
		lcddata = %01000000 : pulsout enable,1
		lcddata = %00100000 : pulsout enable,1
		lcddata = %00010000 : pulsout enable,1
		lcddata = %00001000 : pulsout enable,1
		lcddata = %00000100 : pulsout enable,1
		lcddata = %00000010 : pulsout enable,1
		lcddata = %00000001 : pulsout enable,1
		lcddata = %00000011 : pulsout enable,1
		lcddata = %00000111 : pulsout enable,1
		lcddata = %00001111 : pulsout enable,1
		lcddata = %00011111 : pulsout enable,1
		lcddata = %00111111 : pulsout enable,1
		lcddata = %01111111 : pulsout enable,1
		lcddata = %11111111 : pulsout enable,1
		lcddata = %11111110 : pulsout enable,1
		lcddata = %11111100 : pulsout enable,1
		lcddata = %11111000 : pulsout enable,1
		lcddata = %11110000 : pulsout enable,1
		lcddata = %11100000 : pulsout enable,1
		lcddata = %11000000 : pulsout enable,1
		lcddata = %10000000 : pulsout enable,1
	next
	do : loop
This (and the AXE133 serial version also) show that clearing of the display should be performed after the display has been switched into graphic mode as on the first execution garbage is shown on the second line but on subsequent executions (without power cycling), the bottom row is blank as it should be.

We've asked Winstar about the graphics mode in the past and their technical support replied that it is not of use/implemented for 'character' type displays, it should only be used for 'graphics' type displays.

http://www.winstar.com.tw/products_detail.php?CID=45
According to the single sheet datasheets, both character and graphic variants use the same controller/semiconductor die.

There is the possibility that Winstar reduce die production costs and increase yield by allocating dies that have faulty graphic mode circuitry for character displays and dies with faulty CGROM/character mode circuitry for graphic displays in which case graphic mode may not work correctly on all character displays, hence Winstar saying it should only be used on the graphic OLEDs. This is similar to how some CPU manufacturers lower their costs by selling CPUs with defective cores as different models with less cores where the defective ones are disabled and does not in any way suggest that Winstar products are inferior.

Presumably attempting to use text mode on a graphic OLED will result in characters that have no separation between them.
 

DanielH

Member
Thank you Hippy and Nick for the quick examples, much appreciated.. I knew it could be done as ive seen it done before witha bouncing ball being displayed.

I'll have to study your examples and see what i can get going.

Thanks again
 

DanielH

Member
Hi All

So i have been playing around with the graphics mode, all is good except for one thing. Using the example above and any other way ive tried to do it i cannot get the display itself out of graphics mode once it has been put into it. I can set character mode, display some text and then change the mode during the program to graphics mode and the display will quite happily change modes and display whatever graphics i send it, but when i change back to character mode in the program the oled display stays in graphics mode and will not go back to character mode until i power the display off.. because of this any text i send it is just a garbled mess..

Does anyone have any ideas on this?


i send the below to change modes as in the above example but the display will always stay in graphics mode for some reason and not change to character mode.

lcddata = %00111011 : pulsout enable,16

this for graphics mode:
lcddata = %00011111 : pulsout enable,1 'graphics mode
lcddata = %10000000 : pulsout enable,1
lcddata = %01000000 : pulsout enable,1
 

DanielH

Member
Maybe you can stay in graphic mode and display text as dot matrix...
OLED-96x96 graphic
Thanks but i really want to get this working, and i dont want to have to create an entire font set and waste space im quickly running out of.

If someone has the time to try this on their ax133y i would appreciate it.

I really wouldnt think it was an issue with the oled display not going back to character mode from graphics mode when commanded to but its starting to look like that might be the issue, and if so nothing could be done about it so i hope not.

i have tried two different displays with the same result..
 
Top