Shop OBEX P1 Docs P2 Docs Learn Events
Need help on Seetron's BPI-261 LCD — Parallax Forums

Need help on Seetron's BPI-261 LCD

musicboxmusicbox Posts: 5
edited 2006-05-09 17:33 in BASIC Stamp
I have the Basic Stamp II educational board and Seetron's BPI-216 LCD.· I·tried to program the·the·BS2 just to test out the LCD·but it didn't work.· I tried· Serial_LCD_Demo.BS2.TXT·to test out my LCD.· But all I am getting is garbage.
Please let me know what's going on.· Is my LCD not working or just my program?· Is there anything speical I need to do with this kind of LCD?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-24 22:57
    The demo you're using is for the Parallax serial LCD, hence the problem. You should probably get SEETRON demo code from www.seetron.com.

    Here's the manual (with code): http://www.seetron.com/pdf/bpi_bpk.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • musicboxmusicbox Posts: 5
    edited 2006-03-24 23:06
    I also tried the demo code from the manual you referred but still doesn't work.
    Here is the code that I used.

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    'Program: BPKDEMS2.BS2

    N9600 CON $4054
    I CON 254
    CLR CON 1
    LINE2 CON 192
    L1_C7 CON 135

    PAUSE 1000
    SEROUT 14, n9600, [noparse][[/noparse]I,CLR]
    PAUSE 1
    SEROUT 0, n9600, [noparse][[/noparse]"Hello World!"]

    SEROUT 14, n9600, [noparse][[/noparse]I,LINE2, "..line 2"]

    PAUSE 2000
    SEROUT 14, n9600, [noparse][[/noparse]I, CLR]
    PAUSE 1
    SEROUT 14, n9600, [noparse][[/noparse]"Count: "]
    Again:
    SEROUT 14, n9600, [noparse][[/noparse]I,L1_C7]
    SEROUT 14, n9600, [noparse][[/noparse]DEC B2," "]
    B2 = B2+1
    PAUSE 200
    GOTO Again

    Is there any problem with it?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-24 23:12
    There seems to be nothing wrong with it, though we don't recommend using internal variable names (B2 in this case). Double-check your connections (power, ground, signal) and try again. According to the demo you posted (in the future, please attach instead of paste) you should be using P14, are you?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-24 23:30
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    Testing:
      SEROUT 0, 16468, [noparse][[/noparse]$0C]
      PAUSE 1000
      SEROUT 0, 16468, [noparse][[/noparse]" ALARM!  ALARM!", $0D, " Intruder Alert"]
      PAUSE 5000
      GOTO Testing
    
    

    If you'll use P0, then this will work (I have ILM-216s.)· Does yours have the 2400bps jumper connected (this program is for 9600)?
    Should come out with:
    ·Line 1· ALARM!· ALARM!
    ·Line 2· INTRUDER ALERT
    ·

    Post Edited (PJ Allen) : 3/24/2006 11:35:27 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-25 01:35
    Also, are you using a BS2 or another BASIC Stamp Model?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • musicboxmusicbox Posts: 5
    edited 2006-05-08 23:35
    I am trying to print out some variable to the LCD that I have. For example, I am reading a distance from an ultrasonic sensor and I want to display that distance that I obtain from the sensor to the LCD. I HOw can I do that? Do I need to make a loop if I want to display every distance that I read? I am not good in BasicStamp program. PLease help.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-09 00:43
    The SEETRON documentation shows how to do this: what you'll likely want to do is use the DEC output modifier; move the cursor where you want the value and then do something like this:

    · SEROUT LcdPin, Baud, [noparse][[/noparse]DEC myValue]

    DEC converts a number to the equivalent string of ASCII characters, hence the value 123 is converted to the string "123"

    Update: Corected typo (SEROUT was [noparse][[/noparse]incorrectly] SERIN).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 5/9/2006 5:28:59 PM GMT
  • Tom WalkerTom Walker Posts: 509
    edited 2006-05-09 12:40
    Jon,
    Maybe SEROUT?

    :^)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • musicboxmusicbox Posts: 5
    edited 2006-05-09 16:49
    HI, I am trying to printout the distance1 onto the LCD but doesn't work.· Please review and see any problems with it.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-09 17:33
    Lots of problems -- you simply clobbered the SEETRON demo into the middle of the Ping demo and as you've found, this doesn't fly. Start with the Ping demo running through DEBUG. DEBUG has cursor positioning commands so you can emulate the use of an LCD. Once you get that working (on the Debug Terminal), then you can learn to use the SEETRON LCD (separately). Once you're comfortable with that (beyond running the demo, modify things so that you know how to make it work on your own), then you can port the DEBUG statements to similar SEROUT statements that will control the LCD.

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