need serial 20x4 lcd code example
i use pic16f628a or pic16f877a with serial lcd 16x2 or 20x4 (picaxe oled).
serout PortA.0,0,["Hello"]
It works OK with 16x2 serial lcd.
Nothing with serial 20x4.... I see hieroglyphs...
Also the same with sumalation in ISIS profesional....- 16x2 OK - "Hello", 20x4 - x v f g 5 h :)))
Do i need to make any different settings for serial lcd 20x4 ???
Thank you for any example how to start serial 20x4.
Saulius
Re: need serial 20x4 lcd code example
I would be certain there are differences in code. Why not post yours so we can see what needs to be changed?
OBTW nothing is not same as hieroglyphs.
1 Attachment(s)
Re: need serial 20x4 lcd code example
Here is my code:
main:
pause 1000 ' wait for the LCD to startup
serout PortA.0,0,[$FE,$01] ' clear the screen
serout PortA.0,0,["Hello world !"] ' send string “Wherever you go”
serout PortA.0,0,[$FE,$C0] ' move the cursor to the 2nd line
serout PortA.0,0,[" Here we are "] ' send string “ there you are ”
pause 1000 ' pause for a second
goto main ' loop
Picture what i see is bellow.
Attachment 7099
Re: need serial 20x4 lcd code example
I don't see your configs or defines. That's usually where the issue lies.
This linkhttp://www.picaxe.com/docs/axe134.pdf has a test program. Did that work?
Re: need serial 20x4 lcd code example
Saulius,
That has been done before by Darrel. Check this link
http://www.picbasic.co.uk/forum/show...=2388#post2388
Re: need serial 20x4 lcd code example
It works fine with picaxe 08M2 and 20X2 i use. Also ok in parallel mode with pic. Only a problem conecting 20x4 to pic16f628a or 877a in serial.
For 16x2 i do not use any config or define settings and it works ok. Maybe you know what settings shoud i try??
Re: need serial 20x4 lcd code example
Have you tried
main:
pause 1000 ' wait for the LCD to startup
serout PortA.0,4,[$FE,$01] ' clear the screen
serout PortA.0,4,["Hello world !"] ' send string “Wherever you go”
serout PortA.0,4,[$FE,$C0] ' move the cursor to the 2nd line
serout PortA.0,4,[" Here we are "] ' send string “ there you are ”
pause 1000 ' pause for a second
goto main ' loop
Re: need serial 20x4 lcd code example
Just curious if that actually worked?
Re: need serial 20x4 lcd code example
Hello, works with this. Instead of communication speed "4" i used "2" - and ok, works.
Interesting, but it works only in simulation software i use.
I programed pic16f628a and pic16f877a with the same sample - still nothing.
Maybe i use wrong settings for programing pic (watchdog and others) or picaxe oled display inside has something protected....
A few days ago i ordered serial display from ebay, just to be sure, what is wrong.
main:
pause 1000 ' wait for the LCD to startup
serout PortA.0,2,[$FE,$01] ' clear the screen
serout PortA.0,2,["Hello world !"] ' send string
serout PortA.0,2,[$FE,$C0] ' move the cursor to the 2nd line
serout PortA.0,2,[" Here we are "] ' send string
pause 1000 ' pause for a second
goto main ' loop
Re: need serial 20x4 lcd code example
Well, what is nothing. Nothing is not hieroglyphs.
You do realize the 16f628 and the 16f877a have different footprints? Port a.0 on the 16f877a is pin 2 and on the 16f628 it's pin 17. They both are both analog so must be set to digital. I don't think serout setting it to output sets pin as digital.
It would be best if you posted entire code and not snippet.