Hi Rhatidbwoy,
I've tried all sorts of delay times beween lines, nothing works. I've ordered a new display, as I suppose this one to be defect. Thanks anyway.
Greetings
Hi Rhatidbwoy,
I've tried all sorts of delay times beween lines, nothing works. I've ordered a new display, as I suppose this one to be defect. Thanks anyway.
Greetings
Hi, Boboco
Was it a 50% Discount ???
...
Seriously, you should ask a question about that on the Displaytech site ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
boboco, As Rhatidbwoy mentioned I have found in the past (8+ years) that most LCD displays require anywhere from 5 to 15 Milliseconds to execute a clear command "$FE,01" or a home command "$FE,02". I have found this to be true with displays from OPTREX,ITRON,and CRYSTALFONTZ. They are all compatable with HD44780 type lcd controllers found on most lcds. Also whenever I use a command to place the cursor to a different location on the lcd I always use "PAUSEUS 100" as I have found in the past some displays require this delay. I have had no problems with any LCD or VFD displays using delays in my software as I have mentioned. LOL
Dave Purola,
N8NTA
Initialization of a 16x2 LCD.
(4 bit Interface).
The first picture is the initialization of a Hitachi HD44780.
The second picture is the initialization of a Samsung KS0077.
Best regards,
Luciano
Code:Hitachi HD44780 initialization (The above picture) E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=0 E=1 D7=0 D6=0 D5=1 D4=0 E=1 D7=1 D6=0 D5=0 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=1 D6=1 D5=1 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=0 D6=1 D5=1 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=1 D6=1 D5=0 D4=0Code:Samsung KS0077 initialization (The above picture) E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=1 E=1 D7=0 D6=0 D5=1 D4=0 E=1 D7=0 D6=0 D5=1 D4=0 E=1 D7=0 D6=1 D5=0 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=1 D6=0 D5=0 D4=1 E=1 D7=0 D6=0 D5=1 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=1 D6=1 D5=1 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=0 D6=1 D5=1 D4=0 E=1 D7=0 D6=0 D5=0 D4=0 E=1 D7=1 D6=1 D5=0 D4=0
Last edited by Luciano; - 18th January 2006 at 21:47.
Hi all,
thanks for the help.
Curious is that the first line functions exactly as it should in every way, only the second line not. If I turn the contrast up to maximal all pixels turn black, though, so at least the line isn't dead.
I've temporarily replaced the Displaytech with another type of unit. (all that work...., sob!) It worked at once so I take it that the Displaytech is bugged in some way. I've ordered a new one and hope that that will work, otherwise I'll have to change the whole construction to use some other. I'll report when I've got the results.
Another short question on LCD control +PBP. If I want to control a 4 liner, which is essentially two complete LCDs in one, I've been doing it by switching both enable lines via resistors from one port and shorting each of the enable lines respectively with another two ports to disable it.
It must be possible to program the PIC so that the selection of two enables is directly possible. (DEFINEs?) I've looked on the board but haven't found anything. Any ideas?
Greetings
Rob
Hi all again,
sorry Luciano, I didn't mention your post. As it would seem, the KS0077 isn't directly compatable to the HD44780. If that is the case, it would be interesting to write code for it as it is similar. If time allows, I'll try it.
Greetings,
Rob
Hi all,
thanks for the help.
Curious is that the first line functions exactly as it should in every way, only the second line not. If I turn the contrast up to maximal all pixels turn black, though, so at least the line isn't dead.
I've temporarily replaced the Displaytech with another type of unit. (all that work...., sob!) It worked at once so I take it that the Displaytech is bugged in some way. I've ordered a new one and hope that that will work, otherwise I'll have to change the whole construction to use some other. I'll report when I've got the results.
Another short question on LCD control +PBP. If I want to control a 4 liner, which is essentially two complete LCDs in one, I've been doing it by switching both enable lines via resistors from one port and shorting each of the enable lines respectively with another two ports to disable it.
It must be possible to program the PIC so that the selection of two enables is directly possible. (DEFINEs?) I've looked on the board but haven't found anything. Any ideas?
Greetings
Rob
Hi,
Your display is not correctly initialized.
(This is why you get only one line).
In order to use your LCD (KS0070b), you will have
to manually initialize the KS0070b before you call the
first PicBasic LCDOUT.
Below you can find the pseudo code + a table.
Best regards,
Luciano
See PDF page 32 for the initialization of the KS0070B in 4 bit mode
http://www.ee.oulu.fi/research/tklab...river-3316.pdf
Code:KS0070b Initialization 2x16 LCD (KS0070b) 4 bit mode 2 lines Display=on Cursor=off Blink=off Increment mode Entire shif=off (Pseude-code, same as the table below). ============================================== Power on (PIC and LCD module). ============================================== Wait 40 ms ============================================== (Function Set) ------------------ Set the LCD pins: DB7,DB6,DB5,DB4 = 0010 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ------------------ Set the LCD pins: DB7,DB6,DB5,DB4 = 0010 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ------------------ Set the LCD pins: DB7,DB6,DB5,DB4 = 1000 (2 lines, 5x7 dots) Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ------------------ ============================================== Wait 100 µs ============================================== (Display On/Off Control) Set the LCD pins: DB7,DB6,DB5,DB4 = 0000 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) Set the LCD pins: DB7,DB6,DB5,DB4 = 1100 (Display on, cursor off, blink off). Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ============================================== Wait 100 µs ============================================== (Clear display) Set the LCD pins: DB7,DB6,DB5,DB4 = 0000 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) Set the LCD pins: DB7,DB6,DB5,DB4 = 0001 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ============================================== Wait 2 ms ============================================== (Entry Mode Set) Set the LCD pins: DB7,DB6,DB5,DB4 = 0000 Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) Set the LCD pins: DB7,DB6,DB5,DB4 = 0110 (Incremet mode, entire shif off). Toggle the Enable line: PULSOUT Enable_Pin,100 (min.100 µs) ============================================== Wait 2 ms ============================================== End of the KS0070b Initialization.![]()
Last edited by Luciano; - 19th January 2006 at 21:36.
Hello Luciano,
Thanks, Pal. Now it works. And I've learnt something new.
Best greetings,
Rob
Last edited by boboco; - 21st January 2006 at 13:15.
Bookmarks