View previous topic :: View next topic |
Author |
Message |
Spirulin
Joined: 22 Apr 2015 Posts: 4
|
Posted: Wed Apr 22, 2015 3:38 pm Post subject: OLED Display |
|
|
Hello,
I'm a beginner with Bascom and I attempt to replace a LCD 2x8 in my application(HD44780 Controller) again a OLED Display 2x16.
Does anyone know how to get a OLED display 2y16 from Electronic assembyl/German to work properly? The Display Typ is EA W082-XLG
In the Datasheet is written" Controller is similar to HD44780. It is not mentioned HD44780 compatible.
Is there any lib. or update ?
With kind regards
Hubert
(BASCOM-AVR version : 2.0.7.4 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Apr 22, 2015 8:33 pm Post subject: |
|
|
you replace a 8x2 by 16x2?
this new OLED is also 8x2, not 16x2
anyway, the display is compatible with 1 exception : it has a power on/off flag which is put in the cursor/display shift command.
use the LCDCMD to send custom data :
LCDCMD &H17 'set text mode, power on
use that after the initlcd. _________________ Mark |
|
Back to top |
|
|
Spirulin
Joined: 22 Apr 2015 Posts: 4
|
Posted: Thu Apr 23, 2015 5:24 pm Post subject: Oled Display |
|
|
Hi,
Yes,it was a print mistake. 8x2 LCD --->8x2 Oled. I tried to modify my code. Added Initlcd and LCDCMD &H17 (before Do ...loop)but the result is always the same,no improvement. Oled display is showing something mostly strange characters and not stable charcters,always changing. Sometimes the correct characters displaying. Code is working proper with LC Display.
Here an exerpt of my code:
..........
[/code]
Config Adc = Single , Prescaler = Auto , Reference = Avcc
Start Adc
'Config Lcd = 16 * 2
Config Lcd = 16x2 ,
Config Lcdpin = Pin , Db4 = Portb.0 , Db5 = Portb.1 , Db6 = Portb.2 , Db7 = Portb.3 , E = Portb.4 , Rs = Portb.5
Config Lcdbus = 4
Initlcd
Lcdcmd &H17
Many Thanks for your good support.
Kind Regards
Hubert |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Apr 23, 2015 8:25 pm Post subject: |
|
|
ok, this is 8x2. it is not clear from the datasheet (i found one here : http://www.lcd-module.com/fileadmin/eng/pdf/doma/olede.pdf ) what the address is for the data lines.
So selecting 16x2 is a good idea.
I found they use &H17 too. After that you need to use a CLS. And also DISPLAY ON.
I assume you checked if you connected properly? When you say a normal lcd works, i assume you use exact the same pins and hardware?
V0 is not connected.
it is probably a small issue but hard to 'debug' from here. _________________ Mark |
|
Back to top |
|
|
Spirulin
Joined: 22 Apr 2015 Posts: 4
|
Posted: Wed Apr 29, 2015 7:16 pm Post subject: Oled Display |
|
|
hello
I found out if I configure Display type KS077 it works basicly. Disadvantage- Display is flickering. I implement some waitms instructions,this decreased the
flichering. If the code without waitms instructions,flickering is faster. My idea: modify the code,include the Lcd Lib because I will use the R/W instruction
to reduce the flickering. Good idea?
Thanks in advance
Best regards
Hubert |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Apr 29, 2015 9:12 pm Post subject: |
|
|
but when do you get this flicker? when you write in a loop?
When you have code like:
CLS
LCD "TEST"
END
will it also flicker?
code like :
do
locate 1,1: lcd "test"
loop
will always flicker.
You can test with the WR pin defined (and connected). In that case, a different lib is used that uses the busy flag.
When using KS077 the extended function set is used. I did not found info about that in the PDF of the LCD. _________________ Mark |
|
Back to top |
|
|
Spirulin
Joined: 22 Apr 2015 Posts: 4
|
Posted: Sun May 03, 2015 3:00 pm Post subject: |
|
|
Hello Marc
First of all, thanks for the good and fast support. Anyway, it seems my Oled Display went defective. No,Display or random characters and so on.
so, I could not check your sugestions.
I will purchase a new one and then we will see.
With kind regards
Hubert
P.S. I received the OLED with a broken SMD coil, so repaired it temporarly(as you can see at the picture) I suppose the defective coil cause a prelimary damage. |
|
Back to top |
|
|
ddlazzaro
Joined: 01 Oct 2015 Posts: 6 Location: Minas Gerais
|
Posted: Fri Mar 11, 2016 6:36 pm Post subject: Oled Display |
|
|
Hi Albert,
i'm beginer with bascom too, and i'm having the same problem with oled display. I was using the lcd display 16x2, and now i'm using the oled 16x2 with ws0010. sametimes, when i turn on my device, sametimes the display not work, like the picture below and sametimes the line 1 change with line 2.
Do you now any solutions?
Thanks a lot.
Danilo Di Lazzaro[/img] |
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Fri Mar 11, 2016 7:06 pm Post subject: |
|
|
I found some more info for the OLED driver (WS0010)
Hope this helps you to make the OLED work
Quote: | Sample init of Winstar 16x2 OLED, ran into the same problems (incorrect line order, complete garbage, etc)
When I look at the initialisation code, it was not actually following the HD448780 specification exactly,
and therefore, it appears that the OLED driver (WS0010) is rather more fussy.
1) You must power off the display during initialisation and then power it back on later.
This is achieved by writing &H08 to power off, and &H0C to power back on.
The original code was just writing &H0C, which appears to cause the display to malfunction if repeatedly initialised in this manner.
2) The time delay required after the display clear is specified as 6.2ms, instead of just 1.4ms for a HD44780 display.
Waits for 10ms to be on the safe side.
3) There is an extra initialisation step for the character/graphic mode and power control,
set by writing &H17 to the display; it has no effect on HD44780 LCDs.
Though not usually required (because the OLED display powers on in the correct mode),
it is necessary if the display has previously become misconfigured in this area (for example it it received a garbled command). |
_________________ / Kim |
|
Back to top |
|
|
ddlazzaro
Joined: 01 Oct 2015 Posts: 6 Location: Minas Gerais
|
Posted: Fri Mar 11, 2016 8:00 pm Post subject: |
|
|
Thanks a lot Kimmi. I will try to do it and after i will write the results.
Danilo
Bascom 2.0.7.8 |
|
Back to top |
|
|
ddlazzaro
Joined: 01 Oct 2015 Posts: 6 Location: Minas Gerais
|
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Mon Mar 14, 2016 2:41 pm Post subject: |
|
|
Hi, yes it was code snipps from this forum
with the timing set as in this code + the extra "display OFF" if you use a OLED Ver2 and Cursor Home (02)
just try edit the Oled_ver to 1 or 2 to see if this works better
Code: | ' OLED driver (WS0010)
Const Oled_ver = 2 ' if 2 then its a newer displays ver 2
' Initialise display into 4 bit mode, using recommended delays
Waitms 10
Lcdcmd &H33
Waitms 10
#if Oled_ver = 2 ' only run extra command for newer displays
Lcdcmd &H08
Waitus 500
#endif
Lcdcmd &H32
Waitus 200
'Timing for initialisation steps - IMPORTANT!
' Now perform remainder of display init in 4 bit mode - IMPORTANT!
' These steps MUST be exactly as follows, as OLEDs in particular are rather fussy
Lcdcmd &H28 ' two lines and correct font
waitus 200
Lcdcmd &H08 ' display OFF, cursor/blink off ,
Waitus 200
Lcdcmd &H01 ' clear display, waiting for longer delay IMPORTANT!
waitms 10
Lcdcmd &H06 ' entry mode set
waitus 200
Lcdcmd &H02 ' Home Cursor
waitus 200
' extra steps required for OLED initialisation (no effect on LCD)
Lcdcmd &H17 ' character mode, power on
waitus 200
' now turn on the display, ready for use - IMPORTANT!
Lcdcmd &H0C ' display on, cursor/blink off
waitus 200 |
_________________ / Kim |
|
Back to top |
|
|
|