Shop OBEX P1 Docs P2 Docs Learn Events
My lcd dont work — Parallax Forums

My lcd dont work

BasicStampedBasicStamped Posts: 12
edited 2012-01-10 12:00 in BASIC Stamp
Hi, i have Parallax experiment kit i want to connect my lcd but when i connect it and write a program it wont work plese help!!

Comments

  • bsnutbsnut Posts: 521
    edited 2011-12-31 00:39
    Welcome to the forums BasicStamped.

    Can you provide more details on this LCD display.
  • BasicStampedBasicStamped Posts: 12
    edited 2011-12-31 06:03
    Hi, no i cant do with this lcd anything
  • bsnutbsnut Posts: 521
    edited 2012-01-01 01:20
    Can you provide more details on this LCD display.
    What, I meant by this statement is. I haven't hear of Parallax experiment kit and Parallax sells two types of LCD displays, which can be on this kit that you have and they are.

    1) 2x16 Serial or 4x20 Serial displays have three pin header on the back of the display. This header provides RX (serial), +5VDC, GND (ground) which matches a standard servo cable

    2) The 2x16 Parallel LCD displays uses a 6-inch ribbon cable with 14-pin connector to provide the communication via 4-bit or 8-bit parallel interface and the +5VDC for power. This display goes well with the Parallax Professional Development Board (#28138), because it plugs directly into it. But, can be used with the other boards such as Parallax Board of Education or Parallax Homework board. This means that you have to use jumper wires to match the pins on the display to pins on the microcontroller using the prototyping board.

    These displays can be found here http://www.parallax.com/Store/Accessories/DisplayVideo/tabid/159/CategoryID/34/List/0/Level/a/SortField/0/Default.aspx which has links to the documents and demo code.

    The common problems with serial displays is plugging the servo cable into the 3 pin header wrong and this causes the display not to work. What happens is, when you do this it puts the RX (serial) on the GND (ground), which grounds out the serial pin or you can put 5VDC on the wrong pin which this can damage "blue smoke" the display.

    A common problem with Parallel displays is, when you don't match the pins on the display to the pins on the microcontroller and what can happen is you can have the pins on display like the power pin switched with a data line pin the display and it won't work at all or you can damage "blue smoke" the display itself or the microcontroller itself.

    Another problem with both type of displays Parallel and Serial is the contrast adjustment which can make it seam that the display isn't working at all.

    The best way for me to help you is to take a picture of Parallax experiment kit so I can see what you are talking about or tell us what the model number of this kit is. If, this Parallax experiment kit is Parallax Board of Education or Parallax Homework board then I will need to know the make and model of your LCD display you are working with.

    BTW, have a Happy New Year.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-01-01 06:46
    The Stampworks Experiment Kit does include an LCD, maybe this is the kit they refer to.

    If that's the case I can't imagine any reason why it wouldn't work, since the kit includes a power adapter and a pre-wired LCD cable with a polarized connector that will only plug in the correct way. Possibly the breadboard wiring is not been done correctly between the Basic Stamp header and the LCD header, or maybe there is a typo or some other error in the code.

    Without additional details, we would just be speculating.
  • bsnutbsnut Posts: 521
    edited 2012-01-01 10:35
    Rick,
    The Stampworks kit makes since to me now and thanks for posting. But, we haven't had another reply back from Basic Stamped. So, we will have to wait for answer before we can continue on.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-02 11:42
    RDL2004 wrote: »
    The Stampworks Experiment Kit does include an LCD, maybe this is the kit they refer to.

    If that's the case I can't imagine any reason why it wouldn't work, since the kit includes a power adapter and a pre-wired LCD cable with a polarized connector that will only plug in the correct way. Possibly the breadboard wiring is not been done correctly between the Basic Stamp header and the LCD header, or maybe there is a typo or some other error in the code.

    Without additional details, we would just be speculating.
    Rick
    Parallax experiment kit contains lcd http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/ProductID/329/List/1/Default.aspx?SortField=UnitCost,ProductName or this error in code.
  • PublisonPublison Posts: 12,366
    edited 2012-01-02 12:14

    The code is fine. I just checked it out on my StampWorks board.

    Make sure the CONTRAST knob under the X2 connector is turned fully ClockWise, (to the right when viewed from above).

    Not having the contrast adjusted correctly is a normal problem with LCD displays.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-06 09:20
    Hi i check out my contrast its fine lcd shows symbols but when i connect wires and install the code lcd show same symbols.
    Anyways thanks for help
  • PublisonPublison Posts: 12,366
    edited 2012-01-06 09:33
    Hi i check out my contrast its fine lcd shows symbols but when i connect wires and install the code lcd show same symbols.
    Anyways thanks for help

    Any chance you could provide a picture of your setup? That would help immensely.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-09 09:13
    Hi, I need to use a transistor to wire or everything I can connect directly?
  • PublisonPublison Posts: 12,366
    edited 2012-01-09 11:21
    Hi, I need to usea transistor to wireoreverythingI canconnectdirectly?

    Do you have any part numbers or pictures of your setup? If you have a Professional Development board, there should be a part number in the lower left, (28138)

    The LCD you are using should be a parallel interface if you got it with the kit.

    Please provide a picture and the code that you are using.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-09 11:52
    Hi, the code im using: And pictures i try send soon
    ' =========================================================================
    '
    ' File....... SW20-EX11-LCD_Demo.BS2
    ' Purpose.... Essential LCD control
    ' Author..... (C) 2000 - 2005, Parallax, Inc.
    ' E-mail..... support@parallax.com
    ' Started....
    ' Updated.... 01 SEP 2005
    '
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    ' =========================================================================




    '
    [ Program Description ]
    '
    ' This program demonstrates essential character LCD control.
    '
    ' The connections for this program conform to the BS2p-family LCDCMD,
    ' LCDIN, and LCDOUT instructions. Use this program for the BS2, BS2e,
    ' or BS2sx. There is a separate program for the BS2p, BS2pe, and BS2px.




    '
    [ I/O Definitions ]


    E PIN 1 ' Enable pin
    RW PIN 2 ' Read/Write
    RS CON 3 ' Register Select
    LcdBus VAR OUTB ' 4-bit LCD data bus




    '
    [ Constants ]


    LcdCls CON $01 ' clear the LCD
    LcdHome CON $02 ' move cursor home
    LcdCrsrL CON $10 ' move cursor left
    LcdCrsrR CON $14 ' move cursor right
    LcdDispL CON $18 ' shift chars left
    LcdDispR CON $1C ' shift chars right


    LcdDDRam CON $80 ' Display Data RAM control
    LcdCGRam CON $40 ' Character Generator RAM
    LcdLine1 CON $80 ' DDRAM address of line 1
    LcdLine2 CON $C0 ' DDRAM address of line 2




    #DEFINE _LcdReady = ($STAMP >= BS2P)




    '
    [ Variables ]


    char VAR Byte ' character sent to LCD
    idx VAR Byte ' loop counter




    '
    [ EEPROM Data ]


    Msg DATA "The BASIC STAMP!", 0 ' store message




    '
    [ Initialization ]


    Check_Stamp:
    #IF (_LcdReady) #THEN
    #ERROR "Please use BS2p version: SW20-EX11-LCD_Demo.BSP"
    #ENDIF


    DIRL = %11111110 ' setup pins for LCD
    PAUSE 100 ' let the LCD settle


    Lcd_Setup:
    LcdBus = %0011 ' 8-bit mode
    PULSOUT E, 3
    PAUSE 5
    PULSOUT E, 3
    PULSOUT E, 3
    LcdBus = %0010 ' 4-bit mode
    PULSOUT E, 1
    char = %00001100 ' on, no crsr, no blink
    GOSUB LCD_Cmd
    char = %00000110 ' inc crsr, no disp shift
    GOSUB LCD_Cmd




    '
    [ Program Code ]


    Main:
    char = LcdCls ' clear the LCD
    GOSUB LCD_Cmd
    PAUSE 500
    idx = Msg ' get EE address of message


    Write_Message:
    DO
    READ idx, char ' get character from EE
    IF (char = 0) THEN EXIT ' if 0, message is complete
    GOSUB LCD_Out ' write the character
    idx = idx + 1 ' point to next character
    LOOP
    PAUSE 2000 ' wait 2 seconds


    Cursor_Demo:
    char = LcdHome ' move the cursor home
    GOSUB LCD_Cmd
    char = %00001110 ' turn the cursor on
    GOSUB LCD_Cmd
    PAUSE 500


    char = LcdCrsrR
    FOR idx = 1 TO 15 ' move cursor l-to-r
    GOSUB LCD_Cmd
    PAUSE 150
    NEXT


    FOR idx = 14 TO 0 ' move cursor r-to-l by
    char = LcdDDRam + idx ' moving to a specific
    GOSUB LCD_Cmd ' column
    PAUSE 150
    NEXT


    char = %00001101 ' cursor off, blink on
    GOSUB LCD_Cmd
    PAUSE 2000


    char = %00001100 ' blink off
    GOSUB LCD_Cmd


    Flash_Demo:
    FOR idx = 1 TO 10 ' flash display
    char = char ^ %00000100 ' toggle display bit
    GOSUB LCD_Cmd
    PAUSE 250
    NEXT
    PAUSE 1000


    Shift_Demo:
    FOR idx = 1 TO 16 ' shift display
    char = LcdDispR
    GOSUB LCD_Cmd
    PAUSE 100
    NEXT
    PAUSE 1000


    FOR idx = 1 TO 16 ' shift display back
    char = LcdDispL
    GOSUB LCD_Cmd
    PAUSE 100
    NEXT
    PAUSE 1000


    GOTO Main ' do it all over




    '
    [ 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
    RETURN
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-01-09 12:10
    No, you do not need any transistors. Just connect the Stamp pins to the LCD header socket with jumper wires.

    SW_E11.gif


    This is where the connectors are:

    SW_E11.jpg
    248 x 197 - 9K
    483 x 186 - 28K
  • PublisonPublison Posts: 12,366
    edited 2012-01-09 12:44
    Looks like someone had modified the code to work with a BS2P. I could not get your code to run on my board with a BS2 or a BS2P.

    Pay close attention to wiring as Rick pointed out above. The right and left sockets are not the same.

    Try my code in post #8 as see if that works with a BS2.
  • PublisonPublison Posts: 12,366
    edited 2012-01-09 13:03
    Turns out my Professional Development Board has stopped putting out usable parallel LCD signals. Have to set of a BOE to continue.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-01-09 13:29
    I don't *think* their code is messed up. It looks like the original code from the book, but I didn't do a character by character comparison. I was able to copy and paste it into the Basic Stamp Editor and then download it to a BS2 with no errors. I don't actually have a parallel LCD I can test it with though.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 06:34
    Hi Rick, thanks for posting but i wire same that you shows and didint get any result.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 07:28
    What is this??

    [IMG]file:///C:/Users/One/Pictures/ss.gif[/IMG]
    ss.jpg
    1024 x 819 - 82K
    ss.jpg 82.1K
  • PublisonPublison Posts: 12,366
    edited 2012-01-10 07:52
    Simply a pull down resistor on the ENABLE line. It is to keep the line from floating. It keeps the input "low" until a "high" is issued from the BS2 to enable the LCD.

    This resistor is built on the the Development Board, as are the 220 ohm resistors shown in the picture.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 08:36
    But its stange in experiment kit you get 3x220 ohm resistors but you need 4?
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 08:46
    Thats how i wire the lcd:
    2012-01-10 18.39.44.jpg
    2012-01-10 18.40.06.jpg

    And lcd after and before same result.
    320 x 240 - 59K
    320 x 240 - 50K
  • PublisonPublison Posts: 12,366
    edited 2012-01-10 09:16
    But its stange in experiment kit you get 3x220 ohm resistors but you need 4?

    As noted, the 220 ohms resistors, and 47K resistor, shown in the picture, are already soldered on the the board, the tiny black Surface Mount chips just to the left of the LCD connector, (X1).

    A suggestion at this point. You may have a broken wire, (and can not see the break), or a wire is too short to make contact in the socket. I would pull out all the wiring, and re-wire using new wires. It's a simple seven wire connection and should work. The display on the your LCD shows up as if it doesn't have the correct inputs. I pulled the data line wires and it displayed as in your pictures.

    Is you BS2 working properly? Can you test it by blinking LED's on P1-P7 to see if the outputs are functional? Use SW21-EX01-Flash LED.BS2 and change the program to run P1, the P2, etc. This will verify if you BS2 is working properly.
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 11:11
    yes my bs2 working properly i tested it
  • BasicStampedBasicStamped Posts: 12
    edited 2012-01-10 11:26
    I replace new wires same result
  • PublisonPublison Posts: 12,366
    edited 2012-01-10 12:00
    I replace new wires same result

    I think we have exhausted all possible problems here.

    If you can provide one or two more photos with better resolution, that would help.

    Other than that, it's time to call Parallax Support. After all, that'ts what they are there for.
Sign In or Register to comment.