Shop OBEX P1 Docs P2 Docs Learn Events
Stamp not found after connecting LCD — Parallax Forums

Stamp not found after connecting LCD

idleupidleup Posts: 46
edited 2005-10-16 20:01 in BASIC Stamp
I am not sure where to start trouble shooting this problem. If I go into the stamp editor and click to verify ID it finds the stamp and recognizes it as a BS2pe. However as soon as I hook up my LCD the stamp cannot be found. I lick to verify the ID and it shows echo as 'Yes' but it is blank where it usually shows the model of stamp, hence it will not write the code.

I have checked for shorts in the wiring and cannot find any. I have used the following cross connect chart for attaching the LCD: http://www.weethet.nl/english/basicstamp2_lcdcontrol.php.

Can anyone help me find where to start debugging to find the problem? Thanks.

UPDATE: I removed all pins accept power and ground (pin 1 and 2) and it still cant find the stamp. As soon as I remove one of them it finds it. So somehow that is shorting something? anyway, I did check and the pins are correct, the voltage is 5v.

- Matt

Post Edited (idleup) : 10/15/2005 11:45:34 PM GMT

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-15 23:28
    If you disconnect the LCD can the editor "see" the Stamp? If yes, you have a bad LCD connection (or bad LCD) somewhere. Look under LCDCMD, LCDIN, or LCDOUT in our manual or help file for LCD connections.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-15 23:51
    I just checked and I am getting infinite ohms across the power and ground (0 ohms, no resistance)... I dont know if htat is a valid test or not. Even putting the ohm meter acrossed pin 1 and pin 2 of the LCD with the ribbon cable disconnected I am getting almost 10K ohms so maybe that is normal?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 00:00
    I'm not sure where you're measuring.· If you are measuring between power and ground on the LCD when it's disconnected, I'd say it's bad.· Does the Stamp come back to life when you remove the LCD from the circuit?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 00:11
    Yes I was measuring it with everything disconnected and yes it comes back to life with the LCD disconnected...

    I did just move the power to the LCD to the switched 5v and now with the LCD connected it is recognizing the stamp. So that gets me past the problem. However, I put in the example code on·the HD44780 lcd on the stamp site and while it loads to the stamp okay, there is no response on the LCD screen... I cannot run the code that I found on the website I pasted earlier either where I got the pin connects becasue it gives an error, here is the code (http://www.weethet.nl/english/basicstamp2_lcdcontrol.php#example1). The error is "expected a label" and highlights this word "LCDCMD" on the GOTO line. I added the BS2pe directive.

    I am new to this so I am not as knowledgable to how to diagnose these things...

    - Matt
  • idleupidleup Posts: 46
    edited 2005-10-16 00:15
    i just noticed that the pin connection map does seem different from the stamp manual than on that site. I will try doing the one in the manual first.

    - Matt
  • idleupidleup Posts: 46
    edited 2005-10-16 00:29
    Okay, I used the pin map that was in the stamp manual and the sample LCDOUT program in the manual. The program loads and runs (you can see it looping through on the debug screen) but the display is not showing anything... any suggestions on how to debug it?


    One other thing... I have the LCD Enable pin going to pin 1. so pin 0 on the stamp is empty. Is this correct? I think I am reading the manual correctly that if you start at pin 1 on the stamp than all other pins used are 2-7.



    Also, does it matter that my display is a 2x20 and the sample code is writen for 2x16? I have attached the PDF for my display I am using.



    Post Edited (idleup) : 10/16/2005 12:37:47 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 00:38
    If you're using pin 1 for the Enable pin, make sure that's what's specified in your LCD commands. As far as not seeing the display, you may need to adjust the contrast pot. You did connect one as shown in the circuit, right? If you did and that stilld doesn't work, you may have a display that requires a negative bias on the contrast input -- this is a very big hassle....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 00:50
    I had just connected the display contrast pin to ground.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 00:52
    That's probably the issue -- the LCD docs show that you should connect the contrast pin to the wiper of a 10K pot, the pot legs are connected between Vdd and Vss.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 01:41
    I was looking at the required initialization sequence in the PDF document I attached earlier. I compared it to the LCDCMD in the stamp help file. They are written two different ways. How can I verify that the correct commands (as per the spec for the display) are being written using the LCDCMD command?

    Example:

    display docs say:
    RS·· R/W·· DB7·· DB6·· DB5·· DB4
    0····· 0······ 0····· 0······ 1····· 1

    and the LCDCMD looks like this:
    LCDCMD Lcd, %00110000

    How can I determine the equivellant LCDCMD command to do the command as displayed in the display docs?

    - Matt
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 03:06
    I had a quick look and it appears to be HD44780 compatible -- the code in our manual should work for you. That said, we write our demo code based on documentation like what you have, so after you've read how LCDCMD works you should be able to compare the demo code to the display docs.

    You might also look at our LCD AppMod docs, BS2p PlusPack docs, and StampWorks -- all have material on LCD use that will help. Be patient, it may take you a few days to absorb everything.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 04:03
    Well, I tried the POT and it doesnt work. I am not sure if I fried the LCD or something because I cant think of what else to try. I will be patient like you said, I just hope it is all not in vain if I fried the LCD. I have learned alot... one other thing I noticed on the stamp manual diagram that is not in the stamp manual table. It shows a 4.7k resister between pin 7 and 1. I do not have it set up that way. I am not sure why the descrepency...

    - Matt
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 04:10
    The resistors shown on DB0..DB3 are optional -- I have never used them myself as the LCD is never put in to a mode where it writes to its data buss until commanded to do so, and prior to that it has been switched to 4-bit mode.· LCDs are pretty cheap (they are where I get electronics, anyway), so hopefully you can get another and give it a go.· I've been using LCDs since I started with BASIC Stamps back in 1994 and have always had good luck with them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 15:29
    Well, I have now stayed up most the night trying several other wiring modifications and initilization code changes. Here are some things that I have questions about that could be causing the problem but I am not sure:

    1. I still find it odd that if I attach the LCD power to the stamp constant 5v instead of the switched 5v that the IDE cannot find the stamp. Not sure if this is indicitive of another problem. It works fine when on the switched 5v.

    2. At the end of the ribbon cable I measure 5v but as soon as I plug the ribbon cable into the LCD and take a voltage reading across the VSS and VDD pins I show .75 volts. Not sure if that is normal due to circuitry in the LCD or if that is indicitive of a problem.

    3. I am using an OWLogic board and top breakout board from tracy (http://www.emesystems.com/OWL2pepr.htm) and am not sure if it could be circuitry in that board preventing this from working.

    Any feedback on if those items are normal or should be a cause for concern would be appreciated. I also have an old·BS2 that I am thinking of trying. It doesnt support the LCDCMD or LCDOUT commands but that sample code I posted earlier doesnt require it. If it is something in Tracys board then I can narrow it down that way...



    - Matt
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 15:40
    1. If you're trying to power the LCD from the BASIC Stamp's 5v regulator -- stop, it can't supply enough current. If you pull too much current from that pin you'll cause the Stamp to go into reset (from power brown-out) and the Stamp won't be able to talk to the IDE

    2. What is the 5v supply when you see this condition? If you're using the BASIC Stamp's onboard regulator the problem is explained above. If you're using a separate supply, then you may have a bad LCD.

    3. I don't know -- hopefully Tracy can chime in and assist on that part.

    We have have bunches of LCD code for every one of our controllers -- I've been connecting LCDs to BASIC Stamps since the BS1 days. Download our LCD AppMod docs for code and connections with a standard BS2. Those connections are BS2p-compatible, so if you get it working you'll be able to change the commands that allow for native LCD support.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • idleupidleup Posts: 46
    edited 2005-10-16 19:21
    1. I originally was powering it off the stamps 5v supply when I was having the communication problems ID'ing the stamp. I started using another supply though in the posting above when I got it working. I am currently powering the LCD off a separate supply than the stamp.

    2. I am using a separate supply that shows 5v before I plug in the LCD. As soon as I do plug in the LCD it drops to .75v. the voltage is not only .75 at the LCD pins but also at the supply.

    3. I moved everything over to my old BS2 and am still having all the same problems so I dont think it has to do with tracys board.

    It sounds like the suspicious thing right now is the power going to .75 v at hooked up to the LCD. I have emailled the manufacturer of the LCD (one stop displays) to see what they say. I dont know if it means anything, but I am getting about 9.7 k ohms across pin 1 and 2 of the LCD (vss & vdd). Not sure if that should be like that...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 20:01
    The LCD is bad, or you have the power supply connections to it miswired somehow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.