Shop OBEX P1 Docs P2 Docs Learn Events
simmetry lcd — Parallax Forums

simmetry lcd

AlAl Posts: 3
edited 2008-03-04 09:44 in BASIC Stamp
I am trying to use a simmetry lcd with my BS2-SX and I am having some problems.

My lcd works fine with my pc but when I try to use my stamp I get no where.
·Here is an example of code:


serout 15,240,[noparse][[/noparse]"W100",CR]
gosub wait_char
serout 15,240,[noparse][[/noparse]"C",CR]
gosub wait_char
serout 15,240,[noparse][[/noparse]"BC",CR]
gosub wait_char

wait_char:
serin 15,240,1000,wait_timeout,[noparse][[/noparse]WAIT(">")]
return
wait_timeout:
debug "Timed out"
return

·· When I run this the screen goes black and my debug screen gives me continuous timed out.

· Any help out there?

··· Thanks,········ Al

···







··



·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-30 21:56
    I have no idea what a "Simmetry" LCD is, but I can see one problem in your code: In your PBASIC code you use the same pin for SEROUT and SERIN -- but this is NOT the way you'd be connected on a PC (that has separate TX and RX lines). This would explain your constant timeout issue.

    Is your baud rate setting correct?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-30 22:19
    Could you post a connection diagram or schematic showing how you have it connected to the stamp?· I am going to assume this is a serial LCD, since you're sending serial commands, however, most serial LCDs that I·have used, or more appropriately, serial interface chips, do not have a wait signal return to the host processor.· I know that in Parallel mode you can check for the busy flag.· But since I am not familiar with your particular LCD, could you post the model, and perhaps a link to the datasheet online?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • danieldaniel Posts: 231
    edited 2004-08-31 00:20
    Likely he's talking of those from http://simmetry.com/. They're nice little touchscreen lcds.

    And Jon has identified the probable problem.

    Daniel
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 01:22
    I just downloaded the sample code for one of these displays.· Jon, you were right, this module requires 2 different lines for bi-directional communication.· Of course, it doesn't hurt to explore other possibilities when one doesn't have all the information.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • AlAl Posts: 3
    edited 2004-08-31 20:18
    Hey Guys:



    ·· Thanks for the help. The Serin 15 was a· typo.

    ·I am using serin 14. The lcd is operating at a baud

    ·of 9600. I am using a baud mode· of 240. I believe

    ·this to be correct for the SX. When I run the program

    ·the screen goes black.· This program is what simmetry

    ·recommended as a test. When I disconnect the wire from BS2

    ·pin 15 the screen goes to the lcd power on screen.jumpin.gif

    ································

    ····· Thanks again,········· AL
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 20:49
    In your example code...What do the instructions that you are sending out do?· It doesn't look like they print anything on the screen, and once the last one has completed you're running into a subroutine without calling it from a GOSUB command, unless that's not all of your code.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Tim MarksTim Marks Posts: 2
    edited 2004-09-01 02:25
    have a symmetry display too, but have not yet tried it with my stamp.

    Dumb question: did you remove the jumper between pins 4 and 6 of J1 to set the module up for use with a BASIC STAMP instead of a PC?

    From the simmetry download page, they provide some guidance for hooking up to a stamp in the "RS-232 Interface Connection" link.· Did you follow these?

    "For 8051, PIC, Basic Stamp and similar microprocessors a direct connection be connected as follows;
    A. Connect the external microprocessor's ground to pin 2 of J4.
    B. Connect the pin you are using to receive data from the display to pin 3 of J4.
    C. Connect the pin you are using to transmit data to the display to pin 4 of J4."

    Again, I have been too lazy to hook up the module to my stamp, although it works great with my PC.· I will be interested to hear your solution to the problem, so I can avoid all the hard work smilewinkgrin.gif·
    ·
  • AlAl Posts: 3
    edited 2004-09-01 17:46
    Hey Chris:





    ······· The "C" command clears the screen.

    ········ The "BC" command displays a template.

    ········· The template is part of the lcd software.



    ····················· Thanks,·············· Al
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-01 20:56
    Is that all of your code though?· If so, you should try putting and END or STOP command before the wait_char: routine.

    Also try a baudmode of 16624 in case it needs inverted mode.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 3/28/2006 3:14:19 PM GMT
  • HIBITDACHIBITDAC Posts: 40
    edited 2006-03-28 08:52
    Has anyone had any success with getting their CS-2B Simmetry display to work with a basic stamp. I've been trying but no luck. Here is the code that comes with the display. There sample programs dont work.
  • ForrestForrest Posts: 1,341
    edited 2006-03-28 11:50
    Try adding {$PBASIC 2.5} right under the {$STAMP BS2 }directive
  • kb2hapkb2hap Posts: 218
    edited 2006-03-28 12:55
    yes I have gotten the screen to work. I have only tried it with the bs2 and the bs2p40 with great success.

    I am at work right now so I dont have the code to post, but when I get home I with post it with some pictures.

    One thing I notice with those displays... They seem to need very small delays or they freeze up.

    like:

    serout bla bla bla

    pause 1 or pause 10 (try different value to see what works)

    serout bla bla bla ect...

    the bs2's value was different from the bs2p40's value

    if you dont use the small delay the screen freezes and you need to reset it

    also the delay is larger between serin and serout

    Dan



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-28 13:29
    HIBITDAC -

    I'm sure Dan's comments above are very pertinant, as they are with many LCD's, especially customized LCD's as this one is. There may be even more to it than what Dan has mentioned too.

    Did you notice that changes may have to be made in the last routine in the sample program you provided, depending on whether you have implemented flow control (pin port 13 apparently):

    wait_char:
    ' Use the following command if you do not have
    ' pin 13 connected to the flow control pin
    ' of the display module
    ' SERIN 15,84,1000,wait_timeout,[noparse][[/noparse]WAIT(">")]
    PAUSE 3
    IF IN13 = 0 THEN wait_char
    RETURN

    You also don't mention which PBASIC Stamp you're using?

    Just for the record, the Simmetry documentation leaves a LOT to be desired.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • HIBITDACHIBITDAC Posts: 40
    edited 2006-03-29 06:27
    Thanks for the help I will give it a try.
  • HIBITDACHIBITDAC Posts: 40
    edited 2006-03-31 15:46
    Ok tried with no sucsess. Here is the code i am using. I am using a BS2p40. Pin 15(BS) is connected to pin 3(display), pin 14(BS) connected to pin 4(display), pin 13(BS) is connected to pin 5(display). It times out so i am not getting any communication between the 2. I have alsp tried a BS2 with the same results.

    Post Edited (HIBITDAC) : 3/31/2006 3:49:01 PM GMT
  • HIBITDACHIBITDAC Posts: 40
    edited 2008-03-04 09:44
    Old thread but, the default baud rate of the CS-2B is 38.4K. It has to be set to a lower baud rate to match what a basic stamp is capable of. It has to be set when connected to a computer. There is an option in the menu is change the baud rate. Once that is ran the baud rate will stay at what you set it at until changed again. I forgot the exact command but will post them when I get home.

    Hibitdac
Sign In or Register to comment.