PDA

View Full Version : Winstar OLED Display Problem with lcdout comands



bubbleless
- 3rd May 2013, 20:13
Has anyone used one of these units with picbsic pro?

I have connected the display the same way that I would with a standard LCD as per manual.

Then using lcdout "hello World" I can get a standard display to work.

Then replacing the standard lcd with the winstar 20x4 oled

http://http://www.rapidonline.com/electronic-components/20x4-oled-display-yellow-57-2302

The oled is blank.

I have managed to get something out of the display Greek and Chinese letters so the unit is working there seems to be a problem with initalizing the oled.

I have a 18f452 as mentioned wired as per manual and rw wired to ground, not a pic pin as not using lcdin.

I have tried changing lcd pause command etc.

Just a little stumped, as it will work perfectly on a standard lcd then plug in the oled and its either chneese or nothing.

Any help much appreciated.

timmers
- 3rd May 2013, 22:17
Make sure you leave enough time at power up for the LCD to initialise, typically atleast 500mS. The Oled displays are alot quicker to react and I found the following defines worked ok
DEFINE LCD_COMMANDUS 10
DEFINE LCD_DATAUS 10

We use a similar display and they work very well. Be careful of static, they seem very sensitive.
Tim.

bubbleless
- 4th May 2013, 02:24
Thanks for the tip


Make sure you leave enough time at power up for the LCD to initialise, typically atleast 500mS. The Oled displays are alot quicker to react and I found the following defines worked ok
DEFINE LCD_COMMANDUS 10
DEFINE LCD_DATAUS 10

We use a similar display and they work very well. Be careful of static, they seem very sensitive.
Tim.

Thats very short timings.

Tried that and a few others, no joy :(

Do you ground the RW pin or connect to the pic??

Any pull ups??

This is my simple test prog and the connections
' Compiler : PICBASIC PRO Compiler 2.6
' Assembler : MPASM
' Target PIC : 18F 452
' Hardware : LCD display
' Oscillator : 4M external
' Keywords :
' Description : LCD in 4-bit mode.

' DB4 PortA.0
' DB5 PortA.1
' DB6 PortA.2
' DB7 PortA.3
' RS PortA.4
' E PortB.3
' RW Ground
' Vdd 5 volts
' Vss Ground
' Vo 20K potentiometer (or ground)
' DB0-3 No connect
DEFINE OSC 4

PAUSE 1000 'LCD Ready
LCDOUT $FE,1 'Erase Screen
BASLA
lcdout "Hello"
PAUSE 500 'Wait 5 Sec.

LCDOUT $FE,1 'Erase Screen

LCDOUT "World"

PAUSE 500
LCDOUT $FE,1
GOTO BASLA
End

Sherbrook
- 4th May 2013, 11:09
As I understand it, when you do an 'Erase screen' a blank is written to all 80 possible locations of the display even if you only have 2 x 16. Writing 80 characters takes time so try a pause after 'Erase screen'.
Phil

wdmagic
- 4th May 2013, 12:06
hopeing you didnt overlook

"PAUSE 500 'Wait 5 Sec."
5000 = 5 seconds not 500

I dont see any tris statements, did you turn off analog, did you turn off comparitors,

If you have a standard lcd, I would try to hook that up first and make sure your program is working first,
then use the OLED, there should be no differeance, but you never know.

Ill be willing to bet its the TRIS statements missing, I did that last week forgot to set my tris and my display didnt do jack poop

bubbleless
- 4th May 2013, 12:23
Thanks.

Yes just tried pauses between the clr and the lcd out.

No Joy

bubbleless
- 4th May 2013, 13:11
hopeing you didnt overlook

"PAUSE 500 'Wait 5 Sec."
5000 = 5 seconds not 500

I dont see any tris statements, did you turn off analog, did you turn off comparitors,

If you have a standard lcd, I would try to hook that up first and make sure your program is working first,
then use the OLED, there should be no differeance, but you never know.

Ill be willing to bet its the TRIS statements missing, I did that last week forgot to set my tris and my display didnt do jack poop

Thanks just anotation error .5 not 5sec the pauses as long as they are long the time isnt critical.

Doesnt lcdout set the tris by default on the use of lcdout still tried TRIS for Port A and B.

No change.

Still works perfect on lcd not oled

CuriousOne
- 25th November 2019, 17:31
Since some info gone due to database crash, below is my personal experience with Winstar WS0010 based 1602 oled screen.

The following commands using LCDOUT $FE,digit do the following:

19 low brightness
27 graphic mode / low brightness
31 graphic mode / normal brightness
32 high brightness
33 high brightness / EN/WEST characters
34 high brightness / EN/RUS characters
35 high brightness / EN/EU characters
36 normal brightness / default char?
41 normal brightness / EN/WEST
42 normal brightness / en/rus
43 normal brightness / en/eu

There are some other codes too, below 19, which do less useful things, like shift display right or left, enable-disable cursor and so on. Also, there might be some statements above 43, which do something, but had no time to check in details.

These commands can be used in mid-code, any time, but if you had something to display, you need to do it again. I mean, say you have "hello world" on the screen, and you decided to change brightness, by sending LCDOUT $FE, 19, you need to send command to display "hello world" again, to see the effect.

For the brightness, there are several ways to adjust it.

1. Solder pot to the specific area on PCB (google for details).
2. Adjust brightness as I've shown, but when you set low brightness, you can see that pixel brightness is not even, not so pleasant effect.
3. Enable/disable display quite fast via the dedicated pin - it is reasonably fast, so you can hook it to HPWM output of your chip.

Ioannis
- 26th November 2019, 07:42
Thank you for the useful info on the Winstar displays.

Ioannis

ChuckR
- 26th November 2019, 17:50
I can confirm the manual potentiometer brightness adjustment capability as is described in the Winstar OLED App Note Ver. 3.4 (2015/01/27). Page 8 illustrates wiring, but it notes that an option jumper on the PCB needs to be moved from position "JV" to position "JV0". I can confirm that this jumper relocation is necessary in order for the manual brightness adjustment to work. I cannot yet confirm command based brightness control with the WS0010. Would you please specify the manufacturer and model number of the 2x16 display you are using, and are the commands that set brightness as you specified in hex? That is, for example, is your line of code "LCDOUT $FE, $32" to set maximum brightness?

I am using a Vishay 2x8 OLED display (which uses the WS0010 controller) in the serial SPI connection mode, and will post a code example for this in the Forum's Code Example section.

CuriousOne
- 26th November 2019, 20:25
I've purchased that display from here: https://item.taobao.com/item.htm?id=552981000839
Bought parallel interface model, yellow color display. If you decide to order from here, please note, seller has no stock of green and red displays, but other colors are available. The yellow color of particular model actually has quite wide spectrum, which leans towards red more, than to green, so with proper color filter, without much loss of the brightness, it is possible to get either orange-red or lime-green display color from that module. If anyone into Rosco/Cinegel stuff, I can give numbers which give the best results.

These statements were obtained via "set this and try, let's see if it works" and they are in decimal, I'm using them without $ prefix.

ChuckR
- 27th November 2019, 15:13
I think I found the display you are using at http://www.yab-lcm.com/en/yb1602/113-415.html. If this your display, it appears not to be an OLED with a Winstar 0010 controller, but a backlit LCD with a SPLC780D1 controller (data sheet available at https://www.crystalfontz.com/controllers/OriseTech/SPLC780D1/. Can you confirm?

CuriousOne
- 27th November 2019, 19:39
LOL are you joking? :)

This is amazingly fast OLED with WS0010 controller - it has switchable fonts, etc. all work just fine :)

8790

Ioannis
- 27th November 2019, 20:48
I've purchased that display from here: https://item.taobao.com/item.htm?id=552981000839


Do you know chinese??

Ioannis

CuriousOne
- 28th November 2019, 05:08
A bit, why you asking?

Ioannis
- 28th November 2019, 06:52
because I could not find any english in that page you posted. Could not understand a word!

Ioannis

CuriousOne
- 28th November 2019, 10:23
You can use google translate to get the idea what is said there. But nothing much:

"Fully replaces 1602 LCD", operating temperature range -40+80C, module dimensions 80x36x10mm, display area 64.5 x 16 mm, available in different colors, can be SPI or traditional interface type, can be used either with 3.3 or 5V supplies, uses Winstar WS0010 compatible controller. and so on

ChuckR
- 28th November 2019, 16:04
I was similarly perplexed by the Chinese-only taobao website. The photo at taobao showed the part number as "YB1602-OLED" and referenced a website yab-lcm.com, which is where there was a non-OLED display shown for this part number. Inspecting the taobao photos of the display (front and back), and your photo, convince me that you do indeed have an OLED display, and likely it uses the WS0010 controller. However, I cannot find in the WS0010 data sheet command table any inputs that adjust brightness as you indicate. I have used WS0010 displays made by Vishay in both parallel and SPI modes, and have had no problems with PBP's LCDOUT instructions sending commands or text to the displays.
Your inquiry asked why after changing brightness, you have to re-write to the display in order to see the effect. My guess is that this is just the way the display works. In my experience, I've found that display configurations are non-volatile, and the only way to ensure that old settings have been purged, and new settings take effect is to power cycle the display. Resetting a microcontroller and re-initializing the display while it remains powered can leave initialization artifacts.
I cannot find any reference to the command controlled brightness settings you provided in your earlier post. Do you have a Winstar app note that describes these? I have an OLED test program for WS0010 displays, and I would like to evaluate brightness settings.

CuriousOne
- 28th November 2019, 16:43
As I've said, I've obtained this brightness control via "let's send incremental sequence of bytes and watch what will happen?" btw, this module says it uses WS0010 compatible controller, which does not means it uses exactly same controller. By the way, why you just not simply try to send incremental bits to controller? maybe this is an undocumented feature?

Here's small video, showing brightness change.
https://youtu.be/x7qc5iSjE4o

ChuckR
- 28th November 2019, 16:44
Further to my earlier post, I can confirm brightness can be controlled by turning the display's internal power on and off. Specifically, the command $FE, $13 uses the "Cursor/Display Shift/Mode/Power" command to turn off the internal power and dims the display, and the command $FE, $17 turns on the internal power and sets maximum brightness. Once either command is sent, there is no effect on existing brightness until a subsequent character write occurs and changes the brightness of the entire display.
However, there is nothing in the WS0010 spec sheet that specifically states that the purpose of turning internal power on and off is to provide brightness control, and there is not any brightness gradient control that I'm currently aware of. I've not yet checked to see if internal power on/off can serve as a reset command for the display. Turning off internal power (whatever that really means) might just result in powering the display parasitically from the signal inputs, and if this the case, it can't be beneficial to the display's health in the long term.

CuriousOne
- 28th November 2019, 16:49
There are 3 brightness settings as I've figured out. minimal (really bad, brightness difference of individual pixels becomes very noticeable), normal (difference between pixels is still noticeable, but you have to check it very carefully) and max brightness, which is really neat - it is almost as bright as fresh Futaba 1602 VFD....

ChuckR
- 28th November 2019, 16:50
Employing undocumented commands with a "WS0010 equivalent" controller would cause me many sleepless nights. I've learned to stay well within the boundaries of product specification sheets.

CuriousOne
- 28th November 2019, 17:06
Well it depends. In mass production environment, this can be tricky, but for experiments - it is just fine. Btw, I've bought this OLED to replace burn out VFD in my satellite box, which is also 1602 compatible. But before I did the swap, I decided to do some experiments :)

CuriousOne
- 3rd December 2019, 18:28
I ordered two more models. Both use same WS0010 controller and are compatible with standard LCDOUT, but one of them being 1602, has no intermediate pixels removed between the chars, so it can display full screen graphics in 100x16 pixel resolution without any cut-outs. Another one is standard 2004 display size...

Ioannis
- 3rd December 2019, 19:29
Are you sure you can control the intermediate pixel? Wow this is impressive!

Ioannis

CuriousOne
- 3rd December 2019, 19:51
Yes in graphic mode it is possible. Even now with this one I can control it, just there is no physical pixel :D

Here is the picture. Too bad, they are not making standard LCD's with that WS0010 controller, it would be mega practical :)

8792

CuriousOne
- 3rd December 2019, 20:09
I have an interesting idea. These displays as you know, are PWM driven. The PWM signal can be easily obtained from the back of the module. What if we use it as interrupt generator and redraw controller? I mean, to use it to send data only when pixels are off, so when PWM enables them, they are static, PWM turned them off - we enable next set and so on. This should lead to flicker free, much smoother screen update.

Ioannis
- 3rd December 2019, 20:26
Nice idea. It reminds me the old time with sprites on ZX Spectrum and Commodore!

Ioannis

CuriousOne
- 4th December 2019, 04:50
Indeed, I've used such approach on Spectrum a lot :) we don't had "Enable V-Sync" feature these days..... :D

CuriousOne
- 30th December 2019, 12:12
My "gapless" 1602 OLED finally arrived, and it is finally gapless - now letters in text mode have no more spacing between each other, so they overlap. Have no idea how to fix this. Btw, module is 20 character per line, not 16, but has exact same dimensions as 1602 modules.

8795

CuriousOne
- 30th December 2019, 12:39
As I'm guessing, there should be some kind of command, to switch to "normal" mode, so letters won't be glued to each other, and screen will become standard 1602. Will use some bruterforce hacking later ;)

Dave
- 30th December 2019, 14:07
When using Graphic displays to generate characters, It's up to you when generating the character pattern to allow for the space between the characters ie 5x7 format now becomes 6x7 format.

CuriousOne
- 31st December 2019, 05:53
This is NOT only graphic display, this is standard, LCDOUT compatible module, with built-in fonts, which can be switched in graphics mode also. Will try to get the datasheet.