I am using BS2 and parallel LCD which is not from parallax
hi all,
Could anybody help me to display data in LCD?I am using BS2 and parallel LCD which is not from parallax.
I have tried to work with the attached code but failed to display data.any idea?Thanks.
Post Edited By Moderator (Chris Savage (Parallax)) : 1/23/2008 5:50:41 PM GMT
Could anybody help me to display data in LCD?I am using BS2 and parallel LCD which is not from parallax.
I have tried to work with the attached code but failed to display data.any idea?Thanks.
Post Edited By Moderator (Chris Savage (Parallax)) : 1/23/2008 5:50:41 PM GMT
Comments
Please do not post the same message twice. You can delete or edit a posting by going back to it and "clicking" the "X" or the pencil icon respectively in the upper right corner.
Does you LCD have 14 contacts, or more than 14 contacts? If it has more than 14 contacts, then it is probably a backlit LCD. If that's the case you may need to provide a voltage for the backlighting and/or a contrast control. If the contrast is set incorrectly, or is absent the display may be working fine, but you just can't see what's being displayed.
Note: Sometimes the voltage to the contrast circuit is a NEGATIVE voltage, so be aware of that.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
This illustrates the difference between using a display from Parallax or other vendors like Matrix Orbital vs. someone else that sells only in very large quantities to other manufacturers. The display may be more expensive, but part of what you're paying for is support. Parallax has extensive documentation and sample programs and they will work with you individually if needed to be sure the product works as expected.
Post Edited (Mike Green) : 1/23/2008 6:32:05 AM GMT
Is this the Parallax parallel LCD of which you are speaking?
http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/49/Default.aspx?SortField=ProductName,ProductName
If so, download the LCD Manual and find the picture of the wiring for the LCD within that PDF. Underneath the picture of the LCD itself, you will see a 10K potentiometer. I suspect that is the contrast control, although it isn't labelled as such.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
so i thought that parallax LCD code will work for the one i have.what you think?Is there a problem?
When you say "It is from another company which has the same pin configurations", that implies that you have a datasheet for this LCD. If so, could we take a look at it? That's the quickest way to get help.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
i have tried to attach the datasheet but i cant attach it ,dont know why?if you just
search with the "LCD SC162A" i am sure you can see the datasheet there.Sorry for this.Thanks lot again.
Since I can see no where in the PDF that they claim this LCD is compatible with the Hitachi HD44780 (an industry standard) I would presume it's not, and I would also then presume it's not the same as the Parallax Serial LCD which IS HD44780 compatible. Thus, the Parallax sample programs may not work, as published, but they can probably be used as a basis for this and/or other similar LCD's.
On Page 10 of the datasheet, under the heading "C.6 Function Set" you will need to set the appropriate pins, during initialization to set the Data Length (4 or 8 bit transfer), the number of lines (1 or 2), and font you require. If this is not set correctly I doubt that anything will display properly.
Other salient characteristics follow, which may or may not be the same as the Parallax LCD:
DDRAM ADDRESSES ($=HEX, [noparse][[/noparse]nn]= decimal):
Line One - $00-$27 [noparse][[/noparse]0-39]
Line Two - $40-$67 [noparse][[/noparse]64-103]
A complete, sample initialization sequence, as well a samples for using the LCD may be found on Page 14 of the PDF. Follow it closely, and the timings (pauses if required, noted there or elsewhere) and you should be on your way to displaying data.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
Thank you so much for your quick response.I really appreciate it.The datasheet i got its only 2 pages.
Would you mind to send me the link u just read?At least i can follow whatever you have suggested.Thanks lot again.
regards;
Bogra.
Just to let you know that i can get the debug screen in my computer for the program which is done in BS2
but i dont get the Data in The LCD display.what kind of problem i am facing?Could you help me on it?Thanks lot.
If what you have is only two pages long, what you have is just the mechanical drawing. The actual datasheet (attached) is 17 pages long. It should contain everything you need to know to make this LCD operate properly with your BS-2.
Regards,
Bruce Bates
(I hope the attachment made it)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
Post Edited (Bruce Bates) : 1/23/2008 10:08:30 AM GMT
the link if you cant upload the attachment.Thanks.
Regard;
bogra
I had to change browsers to upload the file, but it appears to be there now. Apparently the Attachment Manager has a problem with Internet Explorer all of a sudden. Sorry for the delay.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Veni, Vidi, Velcro! - I came, I saw, I stuck around!
its ok i am waiting for you.once you get it u can send to me.Thanks lot.
Then what is the main problem i am facing to get the data in LCD?Do you have any idea?Thanks.
Thanks lot again.
I have read the data sheet and i thing the pin connection was correct.now what to do in the next step?
Thanks.
regards;
bogra
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Your duplicate threads were removed again (third time). Please do not cross-post or duplicate this thread. Follow up on the information in this thread please.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
ok.I am sorry because quite new in this forum.Sorry for this.Could you please help me in this topic?Thanks.
Regards;
Ali
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Regards;
Bogra
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.
Sorry I went back and (heaven forbid) read the posts. The pinout is the same so that does not seem to be an issue and you attached the test program. Is that the exact code you are using? The wiring would still be helpful.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Post Edited (Franklin) : 1/24/2008 4:26:03 AM GMT
Using the app notes from Parallax I have not had a problem with the contrast control in normal applications with at least a dozen LCD displays. Extreme temperatures has not caused a problem. Unless you live in Alaska.
I would think there is other problem in your hookup or program.
I think Chris could help you with your code or connections, if you post it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski
I am trying with the both but result is nothing.
The program is:
' =========================================================================
' File...... Parallel_LCD_2X16.bs2
' Purpose... Parallel LCD Display Demo
' Author.... Parallax, Inc.
' E-mail.... support@parallax.com
' {$STAMP BS2}
' {$PBASIC 2.5}
'
[noparse][[/noparse] Program Description ]
' This program demonstrates using a Hitachi-compatible Parallel LCD Display
' This code works with the BS2, BS2e and BS2sx
'
[noparse][[/noparse] I/O Definitions ]
E PIN 0 ' Enable Pin For LCD
RW PIN 2 ' R/W Pin For LCD
RS PIN 3 ' LCD Register Select
' 0 = Instruction, 1 = Text
'
[noparse][[/noparse] Variables ]
char VAR Byte ' Character To Send To LCD
inst VAR char ' Induction To Send To LCD
index VAR Word ' Character Pointer
temp VAR Byte ' Temp Variable
'
[noparse][[/noparse] EEPROM Data ]
DATA "Hello, this is the LCD demo." ' Message To Send To LCD
'
[noparse][[/noparse] Initialization ]
© Parallax, Inc. • 2X16 Parallel LCD (#603-00006) 7/2005 Version 1.3 Page 4
Initialize:
LOW RW ' Set LCD To Write Mode
OUTS = %0000000000000000 ' Set All Output Low
DIRS = %0000000011111111 ' Set I/O Direction
GOSUB Init_Lcd ' Initialize The LCD Display
'
[noparse][[/noparse] Program Code ]
Main:
FOR temp = 0 TO 27 ' 28 Characters
IF temp = 15 THEN ' Check For End Of Line
GOSUB Next_Line ' Jump To Next Line
ENDIF
READ temp, char ' Read Next Character From EEPROM
GOSUB Send_Text ' Send Character To LCD Display
NEXT
END
'
[noparse][[/noparse] Subroutines ]
Init_Lcd:
PAUSE 200
OUTS = %00110000 ' Reset The LCD
PULSOUT E,1 ' Send Command Three Times
PAUSE 10
PULSOUT E,1
PAUSE 10
PULSOUT E,1
PAUSE 10
OUTS = %00100000 ' Set To 4-bit Operation
PULSOUT E,1
Inst = %00101000 ' Function Set (2-Line Mode)
GOSUB Send_Inst
Inst = %00001110 ' Turn On Cursor
GOSUB Send_Inst
Inst = %00000110 ' Set Auto-Increment
GOSUB Send_Inst
Inst = %00000001 ' Clears LCD
GOSUB Send_Inst
Inst = 14 ' Set Cursor To Underline
GOSUB Send_Inst
RETURN
Send_Inst:
LOW RS ' Set Instruction Mode
OUTB = Inst.HIGHNIB ' Send High Nibble
PULSOUT E,1
OUTB = Inst.LOWNIB ' Send Low Nibble
PULSOUT E,1
HIGH RS ' Set LCD Back To Text Mode
RETURN
Send_Text:
OUTB = Char.HIGHNIB ' Send High Nibble
PULSOUT E,1
OUTB = char.LOWNIB ' Send Low Nibble
PULSOUT E,1
PAUSE 100
RETURN
Next_Line:
Inst = 128+64 ' Move Cursor To Line 2
GOSUB Send_Inst
RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I got the black square on my LCD but cant read or see any message on it.what i need to check now?do i need to hook the 4 bit data bus pin or not to get the message on LCD?I have hooked it with BS2 PIN4-7·and LCD PIN 11-14.am i going correct?what is next step to follow?i really appreciate your suggestion.Thanks lot again to all of you.
regards;
bogra.