Transmitter, receiver, lcd
Xander
Posts: 23
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
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
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?
========================================================================================
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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.
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.
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.
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
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
i need help urgently