Shop OBEX P1 Docs P2 Docs Learn Events
My LCD is not working. — Parallax Forums

My LCD is not working.

P!-RoP!-Ro Posts: 1,189
edited 2008-05-04 00:41 in BASIC Stamp
My LCD is no longer displaying text when I want it to. If I put it on test mode, it works just fine, but for some reason when I tell it to display text, it just shows a small line at the top left corner. I'm setting it for a baud rate of 9,600 like the stamps in class book tells me to, but I'm using a BS2px. I don't know if I should get a new LCD, if the baud rate is not right for the microcontroller, or if there's something wrong with my electronics or programming. Please help me!· ·confused.gif

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-02 03:07
    The BS2px uses unique Baudmode values; they are called out in PBASIC Help, SEROUT.· (I assume you're using a serial LCD.)
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 03:13
    I'm using the serout command, and it isn't seeming to send the message to the LCD, which works perfectly fine in test mode.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-02 03:16
    Which Baudmode are you using?· You wrote that it worked before.· Are the connections solid?· Was it with a BS2px?· What changed?
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 03:40
    I did have a BS2 and it worked perfectly fine, but it broke so I got a BS2px to use in it's place on the board of education. Now, I don't know if something happened to the LCD when it was in storage, if it's just for this microcontroller or what that is causing it to not work. What I also think is strange is when I tried reprogramming it in different ways to try and make it work, after around 6 or 7 times of trying to fix it, it wouldn't read the microcontroller even though it was on. I'm not sure why it is doing this and how I can get it to work. The program should work, because it came out of the smart sensors book. The problem though is I don't know if the LCD is broken or if you must program it differently for the BS2px.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-02 03:45
    Yes, in my first post I·noted that the BS2px uses Baudmode values which are different from all of the other BS2 variants.· They are listed in PBASIC Help.

    You may also have a low battery, given your inconsistent performance in programming/re-programming.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-02 03:51
    The Smart Sensors book uses 9600 8N1 True, and·for the BS2px that's Baudmode 396.·
    SEROUT 14, 396, [noparse][[/noparse]"Read PBASIC Help"]
    ' {$STAMP BS2px}
    ' {$PBASIC 2.5}
     
    SEROUT 14, 396, [noparse][[/noparse]"Read PBASIC Help"]
    
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 03:54
    It shouldn't be low power, because I have 12v outlet power. I'll try re-programming it to see if it makes it work.

    Post Edited (I LIKE PI) : 5/2/2008 4:00:04 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-02 03:56
    You might want to read my last post.·
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 03:59
    Sorry, being slow.· Modified it now so it is much better.
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 04:26
    I tried it, and it, and it works better, but it looks strange.
    This is my simple program:

    ' {$STAMP BS2px}
    ' {$PBASIC 2.5}
    SEROUT 10, 369, [noparse][[/noparse]22, 12]
    PAUSE 5
    SEROUT 10, 369, [noparse][[/noparse]"see this?"]
    END

    This is how it is turning out on the LCD:

    see
    this? hs

    How can I get it to appear normally?
    What am I doing wrong?
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 04:30
    I also tried pressing the reset button, and it just made it even more random, sometimes showing only 3 letters, cutting everything else off.
  • Brad_HBrad_H Posts: 35
    edited 2008-05-02 05:35
    I LIKE PIE

    Looks like a little typo, your SEROUT value should be 396 not 369


    Brad
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-02 13:06
    I tried 396 too, and it seems to turn out more random than before. Do I need to change the baud rate on my LCD to get it to work properly?
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-05-02 15:45
    Try putting a PAUSE 100 line at the beginning of the program to·give the LCD controller time to initialize.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-04 00:20
    I finally got it to work. Thanks everyone!
  • Brad_HBrad_H Posts: 35
    edited 2008-05-04 00:24
    I LIKE PI,

    What was the problem?

    Brad
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-04 00:41
    I decided to try programming it a second time using 396, and it suddenly worked. I'm not sure, but I think when I changed the numbers, I only changed one of them to 396, leaving the other one a 369 messing up my programming.
Sign In or Register to comment.