Shop OBEX P1 Docs P2 Docs Learn Events
I am using BS2 and parallel LCD which is not from parallax — Parallax Forums

I am using BS2 and parallel LCD which is not from parallax

bograbogra Posts: 27
edited 2008-01-25 15:35 in BASIC Stamp
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
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-22 15:43
    The sample program you included should work with most Hitachi compatible LCD displays. If it doesn't work with your display, you will have to find a datasheet for your display that explains how it works. It would help if you could show a schematic of how your display is attached to your BS2. We can't help you without much more information.

    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.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-22 17:22
    bogra -

    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!
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-23 06:26
    The fact that the display has 14 pins and the pin configuration is the same as Parallax's doesn't mean that they're compatible. The Parallax code assumes that the display operates in a 4-bit bus mode with the proper initialization. This is to conserve I/O pins. Your display might only work in 8-bit mode. In any event, without a datasheet that describes the internal display controller and its registers and operation, there's nothing much we can do. You could try to contact the manufacturer to see if you can get further information.

    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
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-23 06:30
    Bogra -

    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!
  • bograbogra Posts: 27
    edited 2008-01-23 06:43
    hi,Thanks.This is not parallax LCD.It is from another company which has the same pin configurations as parallax.
    so i thought that parallax LCD code will work for the one i have.what you think?Is there a problem?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-23 07:12
    Bogra -

    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!
  • bograbogra Posts: 27
    edited 2008-01-23 07:30
    Thanks.I am trying with the another one which has 16 pins.I got the backlight on but no display.
    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.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-23 08:09
    Bogra -

    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!
  • bograbogra Posts: 27
    edited 2008-01-23 08:22
    Hi MR.Bruce;
    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.
  • bograbogra Posts: 27
    edited 2008-01-23 09:20
    Hi,
    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.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-23 09:55
    Borga -

    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
  • bograbogra Posts: 27
    edited 2008-01-23 09:59
    Thanks lot again.I did not get the attachement file which you have sent to me?Could you please send me
    the link if you cant upload the attachment.Thanks.

    Regard;
    bogra
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-23 10:08
    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!
  • bograbogra Posts: 27
    edited 2008-01-23 10:19
    Thanks Mr.Bruce,
    its ok i am waiting for you.once you get it u can send to me.Thanks lot.
  • bograbogra Posts: 27
    edited 2008-01-23 10:23
    As i got the DEBUG screen in my PC and i can see the debug data.
    Then what is the main problem i am facing to get the data in LCD?Do you have any idea?Thanks.
  • bograbogra Posts: 27
    edited 2008-01-23 10:30
    Thank you so much.I got the datasheet with 17 pages.i will try to follow your instructions.
    Thanks lot again.
  • bograbogra Posts: 27
    edited 2008-01-23 14:00
    hi
    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
  • FranklinFranklin Posts: 4,747
    edited 2008-01-23 16:09
    Just noticed you have three posts on the same topic. Please go to the other two and delete them by clicking the red X in the upper right corner.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-23 17:50
    Bogra,

    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
  • bograbogra Posts: 27
    edited 2008-01-24 03:39
    hi there,
    ok.I am sorry because quite new in this forum.Sorry for this.Could you please help me in this topic?Thanks.
    Regards;
    Ali
  • FranklinFranklin Posts: 4,747
    edited 2008-01-24 03:45
    bogra, there are 20 posts in this topic if you're not getting help ask better questions and give better information. If after all this you don't get a good answer it probably is because no one here knows it. People here don't hold information back.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • bograbogra Posts: 27
    edited 2008-01-24 04:07
    k,could you help me out about this?I am using BS2 with parallel LCD(Not from parallax),PIN configurations are same as parallax but i cant read the data from LCD screen.I have downloaded the program into the BS2 but it does not work.Any help?Thanks.
    Regards;
    Bogra
  • pwillardpwillard Posts: 321
    edited 2008-01-24 04:09
    I have found that I can nearly every 14 pin LCD display to work with one main exception... those LCD's designed to work in extreme temperatures. These nearly always display nothing, even when working properly. Why? Because the CONTRAST pin actually needed to be referenced to a NEGATIVE voltage compared to ground. Once I figured that out... no more blank display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    There's nothing like a new idea and a warm soldering iron.
  • FranklinFranklin Posts: 4,747
    edited 2008-01-24 04:12
    If you have it hooked up correctly and the LCD is the same and the code does not work then the LCD is not the same or the LCD is dead. We need to know what the part number is for the LCD, where you got it, exactly how you have it connected (a schematic would be best) and have you ATTACH your actual program to a post and we can try some more.
    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
  • Dave-WDave-W Posts: 94
    edited 2008-01-24 04:39
    Pwillard,
    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
  • bograbogra Posts: 27
    edited 2008-01-24 04:40
    Thanks lot.parts no is:1)SC162A 2)C216-01
    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
  • JonathanJonathan Posts: 1,023
    edited 2008-01-24 16:34
    Have you made sure that you have the contrast working? You should be able to adjust the contrast until the screen goes black. Then back it off until you can just barely see the black squares. Then at least you know that if the data is making it to the LCD you will be able to see it. I have been bit by this one before.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-24 16:36
    Please do not keep posting the same message. Several people have made suggestions which don't seem to have worked. You have not been able to provide much information. You probably will have to contact the people you got this display from and try to get more information about how it works internally. Clearly, it's either broken or isn't compatible with the Parallax display, so the example code doesn't work.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-24 22:52
    Additional duplicate posts have been removed. bogra, please re-read my previous post regarding this. And then please read the forum guidelines in the announcements forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bograbogra Posts: 27
    edited 2008-01-25 02:58
    Hi,Thank you Mr.Chris,
    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.
Sign In or Register to comment.