LCD Confusion
Dr. Vetter
Posts: 34
Hello again fellas,
I'm playing around with serial LCD and·I cant seem to get it to work.
I have tryed to use the code that Parallax gives and all·I get is Solid blocks
I·looked at the data sheet for the LCD controller and setup my INT.
but from there it gets fuzzy
sending the information to the lcd
I'm looking for a tutorial or a good explination to what exactly is going on.
in the parallax sample code it talks about sending high and low nibbles
this is what im getting lost by
any direction of help would be much apreciated
thanks guys,
Dr.Vetter
I'm playing around with serial LCD and·I cant seem to get it to work.
I have tryed to use the code that Parallax gives and all·I get is Solid blocks
I·looked at the data sheet for the LCD controller and setup my INT.
but from there it gets fuzzy
sending the information to the lcd
I'm looking for a tutorial or a good explination to what exactly is going on.
in the parallax sample code it talks about sending high and low nibbles
this is what im getting lost by
any direction of help would be much apreciated
thanks guys,
Dr.Vetter
Comments
http://www.phanderson.com/PIC/ser_lcd_routines.html
Jeff T.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I did not buy the lcd kit from parallax
I have two types of lcds and both do the exact same thing
DV-16100 (Backlight, 2 Line, KS0066U Driver)
and
TM161ADA (No BackLight, 1 line, HD44780 Driver)
Now I did find a site that has a simulator for the HD44780 driver chip
http://www.geocities.com/dinceraydin/djlcdsim/djlcdsim.html
I can get that to work so I step by step did the same thing as the simulator to the real thing
and I get the same result.
my Pin outs INCLUDE:
P0-P3··NC
P4······ RS
P5······ RW
P6······ E
P7-P14·Data
I think The LCD is not getting out of INT.
Post Edited By Moderator (Chris Savage (Parallax)) : 9/15/2008 9:13:15 PM GMT
No offense, but you know that makes a difference, right? If you're using the Serial code (SEROUT LCDpin, LCDbaud, ("This is a test", CR) with a parallel LCD, you're not going to get much.
Edit: Okay, looked at your code, and it's not the serial code. Sorry.
Post Edited (sylvie369) : 9/14/2008 5:37:32 PM GMT
IF I am not making any sence what so ever its because Im lost like a blind man on a bus
I do understand the diff between serial and parallel ( Pretty Sure)
You should check out the Parallel LCD info in the StampWorks manual - which shows a hookup diagram and BS2 program examples.
Download it here www.parallax.com/Store/Books/BASICStamp/tabid/168/CategoryID/42/List/0/Level/a/ProductID/144/Default.aspx?SortField=ProductName%2cProductName
it only displays half of the text
In the example code
'
[noparse][[/noparse] Variables ]
char VAR Byte ' character sent to LCD
idx VAR Byte ' loop counter
'
[noparse][[/noparse] EEPROM Data ]
Msg DATA "The BASIC STAMP!", 0 ' store message
my LCD only displays The BASI
so I thought that the variable was not large enough for the text and changed the char from byte to word and now it's alll Crazy pixels all over
Where is it going wrong....
PS Thank you Forrest This is just what i was looking for
Dr.Vetter
This is why you should buy your equipment from a vendor that supports it. If you really know what you're doing and become familiar with the existing documentation for the other products you're interested in, then buying from some other supplier makes sense. Good luck.
But since my work scrapped out 100 of both of the displays I went and took a Smile load
and its pretty close to the one in the kit.
I get all my stuff from there cause its free and they just throw it away since its cheaper then sending it back
I'll look more closely to the data sheet
thanks
it seems that the problem lies in the busy flag check
and also its electricaly a 2 x 8 line display but physically a 1 x 16 line
so i need to check the BF which is on data line 7 so my question is where would i do the check after this
'
[noparse][[/noparse] Subroutines ]
LCD_Cmd:
LOW RS ' enter command mode
LCD_Out:
LcdBus = char.HIGHNIB ' output high nibble
PULSOUT E, 3 ' strobe the Enable line
LcdBus = char.LOWNIB ' output low nibble
PULSOUT E, 3
HIGH RS ' return to character mode
<===================[noparse][[/noparse]Insert BF Check]
RETURN
and if my understanding is correct that would just be a IF THEN like
If IN14 = 0 then
RETURN
else pause 200
In checking for the busy flag, you may be better off sitting in a loop waiting for busy to become false. It would be something like:
LCD_Loop:
IF IN14 = 1 THEN LCD_Loop