Shop OBEX P1 Docs P2 Docs Learn Events
Transmitter, receiver, lcd — Parallax Forums

Transmitter, receiver, lcd

XanderXander Posts: 23
edited 2009-01-19 23:32 in BASIC Stamp
I got this thing that i wanted to ask.
How do i change this code so that they can be seen on a lcd?

TX.BS2
x VAR Word
y VAR Word
DO
PULSOUT 8, 1200 'Sync pulse for the receiver
SEROUT 8, 16468, [noparse][[/noparse] "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
x = x + 1
y = y + 1
PAUSE 10
LOOP

RX.BS2
x VAR Word
y VAR Word
DO
LOW 0
SERIN 7, 16468, [noparse][[/noparse]WAIT("!"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
HIGH 0
DEBUG ? x
DEBUG ? y
LOOP

Comments

  • DownsDowns Posts: 30
    edited 2008-11-04 15:24
    Set your SEROUT to your LCD screen.

    LCDInput CON 0 ' Set this to your LCD screen input pin.... 0 to whatever.
    LCDBaud CON 32 ' Set this to corrisponde with the LCD Baud mode

    Now make your SEROUT look something like this:

    SEROUT LCDInput, LCDBaud, [noparse][[/noparse]"!",x.HIGHBYTE,x.LOWBYTE,y.HIGHBYTE,y.LOWBYTE]

    Depends on your LCD screen, how many lines does it have?
  • XanderXander Posts: 23
    edited 2008-11-05 06:11
    Ty, i tried but i still dun get it. I have got this GPS and i wanted to send the information across to my Lcd via the transmitter and receiver. Can u show me an EXAMPLE on how to go about changing? I have tried for a veri veri long time but i still cant get it to work pls help ty.
    ========================================================================================
    BS2
    Main:

    GOSUB Get_Lat
    SEROUT TX,LcdBaud,[noparse][[/noparse]Lcdcls,LCDLine1,"Lat : ",DEC3 degrees," ", DEC2 minutes," ", DEC2 (workVal / 10), ".", DEC1 (workVal // 10), " ","N",CR]

    Get_Lat:
    SEROUT Sio, Baud, [noparse][[/noparse]"!GPS", GetLat]
    SERIN Sio, Baud, 1000, No_Response, [noparse][[/noparse]degrees, minutes, minutesD.HIGHBYTE, minutesD.LOWBYTE, dir]

    ' convert decimal minutes to tenths of seconds
    workVal = minutesD ** $0F5C ' minutesD * 0.06

    DEBUG MoveTo, FieldLen, 12, DEC3 degrees, DegSym, " ", DEC2 minutes, MinSym, " "
    DEBUG DEC2 (workVal / 10), ".", DEC1 (workVal // 10), SecSym, " "
    DEBUG "N" + (dir * 5)

    ' convert to decimal format, too
    workVal = (minutes * 1000 / 6) + (minutesD / 60)
    DEBUG " (", " " + (dir * 13), DEC degrees, ".", DEC4 workVal, " ) "
    RETURN

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-05 06:36
    Xander -

    Whose LCD are you using. Is it one of the Parallax Serial LCDs?

    The reason I ask is that some/many LCDs may require first-time initialization, which is not being done, unless there is more to your program that what you've shown us.

    If you are using one of the Parallax Serial LCDs, go to the product page for that particular LCD. There you will find sample programs which will indicate what (if anything) needs to be done to initialize that particular LCD.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • XanderXander Posts: 23
    edited 2009-01-09 07:06
    Hi, nid some help here

    Is it possible for a GPS module to send information to the Transmitter on a board and wirelessly send the information to Reciever on another board with a LCD on it and display the information??

    If possible how can it be done?? I nid some guidance here, appreciate it very much if you can help.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-01-09 12:00
    It is quite possible. I've done it, and it works just fine.

    You need to be MUCH more specific about what part of this you need help with. For example, notice that Bruce asked you what kind of LCD you have. If you don't answer that, you're not going to get any useful help. You also need to say what's not working for you. We don't know if you're unable to display information on an LCD, or if you've already got that working. We don't know if you're able to read the information from the GPS unit. We don't know if you've managed to send and receive information using the transmitter and receiver, and we don't know what kind of transmitter and receiver you're using.

    Describe your hardware first, and tell us which parts of it are already working and which parts you're having trouble with. Answer these three questions:

    1 - Are you able to get the GPS information to appear properly on your computer screen?
    2 - Are you able to send information wirelessly from one BS2 to another?
    3 - Are you able to display information on your LCD screen?

    After you do that, we can probably help you out.
  • XanderXander Posts: 23
    edited 2009-01-13 11:57
    Hi ,

    1) I am able to show the GPS values(longitude , altitude , time etc.) properly on LCD and computer screen without using transmitter and receiver. The GPS module and LCD are mounted on the same Basic Stamp. (attached code for review : GPSwireless.bs2)

    2) I am unable to show GPS values when using transmitter and receiver. Transmitter and GPS module are mounted on Basic Stamp A , while Receiver and LCD are mounted on Basic Stamp B. (attached code for advice : GPSwireless_Transmitter , GPSwireless_Receiver )

    I am using a 4x20 backlit serial LCD , a GPS module , a 433MHZ Transmitter , a 433MHZ Reciever and 2 Basic Stamp for this project. All items are bought from Parallax. Sorry for not providing enough information earlier. Please give me some advice. Thank you.

    Best regard

    Xander

    Post Edited (Xander) : 1/14/2009 5:35:16 AM GMT
  • XanderXander Posts: 23
    edited 2009-01-14 05:35
    Hi ,

    I had attached the wrong code for GPSwirelesstest_Receiver eariler on. I had attached the correct code now. Please give me some advice. Thanks you.

    Best regard
  • XanderXander Posts: 23
    edited 2009-01-19 23:32
    Hi ,

    i need help urgently cry.gif
Sign In or Register to comment.