How about this, I believe that the $C0 is the beginning of the second line.
PAUSE 500
lcdout $FE,1,"THIS IS A TEST LINE1" 'LINE 1
pause 500
lcdout $FE,$C0,"This should be line2"
MAIN:
pause 4000
GOTO MAIN
How about this, I believe that the $C0 is the beginning of the second line.
PAUSE 500
lcdout $FE,1,"THIS IS A TEST LINE1" 'LINE 1
pause 500
lcdout $FE,$C0,"This should be line2"
MAIN:
pause 4000
GOTO MAIN
This is what shows on lines 1&2 on the display:
THIS IS A TEST LINE1
ST LINE1
Using the lcdout $FE,$C0,"This should be line2" shows on lines 3&4 on the display just like this:
This should be line2
be line2
Ive use other 20x4 lcd displays in the past with no problems.
Thanks Sphere.
Last edited by Sphere; - 11th May 2008 at 23:26.
Hi Sphere,
Here is what I would do to troubleshoot: Change the comment on line 1 so you can tell if
it is scrambling the comment and printing it or if it is simply printing the last 8 characters
of line 1 on line 2. It maybe you will have to define commandus and Dataus for this particular LCD
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Ive altered LCD_COMMANDUS & LCD_DATAUS from one extreme to another and I either get nothing on the display, corrupt display or the same result as before.
Would wiring all of the data pins on the lcd make a difference or have I just got a duff lcd.
Thanks Sphere.
Have you included a defines list like below?
Note the lines define in the 10th line should be for 4 lines
Define LCD_DREG PORTb ' Port for LCD Data
Define LCD_DBIT 4 ' Use upper 4 bits of Port
Define LCD_RSREG PORTb ' Port for RegisterSelect (RS) bit
Define LCD_RSBIT 0 ' Port Pin for RS bit
Define LCD_EREG PORTb ' Port for Enable (E) bit
Define LCD_EBIT 2 ' Port Pin for E bit
DEFINE LCD_RWREG PORTb 'port for the R/W bit
DEFINE LCD_RWBIT 1 'port pin for R/W bit
Define LCD_BITS 2 ' Using 4-bit bus
Define LCD_LINES 4 ' Using 4 line Display **************************
Define LCD_COMMANDUS 2000 ' Command Delay (uS)
Define LCD_DATAUS 50 ' Data Delay (uS)
Peter Moritz.
Up the bush, Western Plains,
New South Wales,
Australia.
Tried adding the defines but no joy, still the same result. Ill just wire all the data pins up and see if that works. If no joy ill just resign it to the scrap bin of life.
Thanks all Sphere.
Keep in mind that LCD_DATAUS is a byte value. Max is 255. 256 would be treated just like a 0. LCD_COMMANDUS is still a word value.
Of course wiring would make a difference.Would wiring all of the data pins on the lcd make a difference or have I just got a duff lcd.
Looks to me like you've got some crossed wires and/or solder joints.
Wired all data lines but still have the same issue, but it looks like it treats lines 1 & 2 as line one and lines 3 & 4 as line two. Is there any limitation in picbasic pro's lcdout command for this type of display. The display type is Batron BTHQ42003AV, ive ordered a replacement anyway just in case this one is faulty.
Thanks Sphere.
Last edited by Sphere; - 14th May 2008 at 23:41.
Would've been a lot more helpful to have the model information a lot earlier.
The model you've got has a controller that isn't 100% Hitachi 44780 compatible.
Seems it likes to work in blocks of 12...which would probably explain your issues.
In the case of this LCD, the standard 1st line ($80), 2nd line ($C0), 3rd line ($94), 4th line ($D4) addresses aren't going to work.
Here's the link to the datasheet:
http://www.datasheetcatalog.com/data...6712UA02.shtml
Read thru it a bit. You may/may not see what I mean...specifically page 364, 384, and 419.
Last edited by skimask; - 15th May 2008 at 00:37.
Bookmarks