I use it because i send temperature data from one my house to other house , and you say inverted ...?
i read the document 912mhz module use 9600 to send and reciever and eb500 the same , and i ground eb500 and 912mhz same ground connection.
What kind of data are you getting that is not correct? This hasn't been made clear to me.
My suggestion as far as making the same ground connection also involves you eliminating the RF transmitter and receiver and going with a direct connection. This is more of a sanity check to make sure that the code is actually functioning properly before we try to look for other problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
You need to have some sort of synchronization between the TX data and the RX data or else the order of which the bytes are received can become misaligned.
transmitter example:
SEROUT Tx,N9600,[noparse][[/noparse]"!T"] ' <---Sync characters can be anything as long as they match on the receiver
SEROUT Tx,N9600,[noparse][[/noparse]soT]
SEROUT Tx,N9600,[noparse][[/noparse]tC]
SEROUT Tx,N9600,[noparse][[/noparse]tF]
receiver example:
SERIN Rx, N9600, [noparse][[/noparse]WAIT("!T")] ' <---Sync characters can be anything as long as they match on the transmitter
SERIN Rx, N9600, [noparse][[/noparse]soT]
SERIN Rx, N9600, [noparse][[/noparse]tC]
SERIN Rx, N9600, [noparse][[/noparse]tF]
For basic Transmit and receive between two BS2's I have tested this code and setup in a direct connection configuration. For both the Transmitter(TX) and Receiver(RX), P0 is used in this example, but you can change it to whatever is applicable. When connected to your RF modules, if you are using the Parallax Transceivers(TRX) you will need to make sure that one TRX is setup as a transmitter and the other TRX is setup as a receiver. Otherwise, connect the appropriate TX or RX to the BS2 and make sure that you share a common ground connection between the RX or TX module connected to each BS2.
Transmitter
' {$STAMP BS2}
' {$PBASIC 2.5}
Tx CON 0
N9600 CON 84
soT VAR B0
tC VAR B1
tF VAR B2
soT = 50
tC = 100
tF = 150
MainLoop:
SEROUT Tx,N9600,[noparse][[/noparse]"!T"] ' <---Sync characters can be anything as long as they match On the receiver
SEROUT Tx,N9600,[noparse][[/noparse]soT]
SEROUT Tx,N9600,[noparse][[/noparse]tC]
SEROUT Tx,N9600,[noparse][[/noparse]tF]
GOTO MainLoop
Receiver
' {$STAMP BS2}
' {$PBASIC 2.5}
Rx CON 0
N9600 CON 84
soT VAR B0
tC VAR B1
tF VAR B2
MainLoop:
SERIN Rx, N9600, [noparse][[/noparse]WAIT("!T")] ' <---Sync characters can be anything as long as they match on the transmitter
SERIN Rx, N9600, [noparse][[/noparse]soT]
SERIN Rx, N9600, [noparse][[/noparse]tC]
SERIN Rx, N9600, [noparse][[/noparse]tF]
DEBUG HOME
DEBUG DEC soT,CR
DEBUG DEC tC,CR
DEBUG DEC tF,CR
GOTO MainLoop
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job.
"your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job." - Yes, I understand that. This code exercise is to make sure that the code is correct. The next step would be to connect the TRX modules making sure that one is configured as a Transmitter, while the other is configured as a Receiver and connected to their appropriate BS2.
Since the TRX is a line-of-sight device, building structures and external interference can play an role in the quality of the received signal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/7/2009 4:15:32 PM GMT
perhaps your getting interference between your transmitter and your receiver that doesn't allow it to operate at 600 feet. Can you move the Transmitter and Receiver closer to one another just to see if that might be part of the problem? Another thing you could try is to lower the baud rate. Sometimes that will help in a noisy environment.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
You should be able to lower the baud just fine. I'm curious how far apart the transmitter and receiver are from one another? Is there a chance that you have another device nearby operating on the same frequency that could be causing some interference?
Can you take a photo of your Transmitter and your Receiver setup? ... and possibly a schematic that you are using?
That might help nail this problem down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
do you think it make interference with the eb500 bluetooth module ? like i say before , i use two bs2 one in my house and one from my brother house , it about 200meter and i use two 912mhz module , send temp data from my house to my brother house and my brother house with the bs2, 912mhz to receiver temp data then the eb500 send temp data to PC all work great i even test to send character and it receiver correct character value, but temperature data variable not correct ,
yesterday i make a test to low the baud rate down but it didnt help.
In your original code... soT, tC, and tF are defined as WORDS
The serial function can only send BYTES ... so for your TX code it should look like this...
TX code
SEROUT Tx,N9600,[noparse][[/noparse]"!T"] ' <---Sync characters can be anything as long as they match On the receiver
SEROUT Tx,N9600,[noparse][[/noparse]soT.BYTE0]
SEROUT Tx,N9600,[noparse][[/noparse]soT.BYTE1]
SEROUT Tx,N9600,[noparse][[/noparse]tC.BYTE0]
SEROUT Tx,N9600,[noparse][[/noparse]tC.BYTE1]
SEROUT Tx,N9600,[noparse][[/noparse]tF.BYTE0]
SEROUT Tx,N9600,[noparse][[/noparse]tF.BYTE1]
...And the RX code should look something like this...
RX code
SERIN Rx, N9600, [noparse][[/noparse]WAIT("!T")] ' <---Sync characters can be anything as long as they match on the transmitter
SERIN Rx, N9600, [noparse][[/noparse]soT.BYTE0]
SERIN Rx, N9600, [noparse][[/noparse]soT.BYTE1]
SERIN Rx, N9600, [noparse][[/noparse]tC.BYTE0]
SERIN Rx, N9600, [noparse][[/noparse]tC.BYTE1]
SERIN Rx, N9600, [noparse][[/noparse]tF.BYTE0]
SERIN Rx, N9600, [noparse][[/noparse]tF.BYTE1]
Note:
Make sure that you define soT, tC, and tF as WORD variables. i.e.
soT VAR WORD
tC VAR WORD
tF VAR WORD
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Comments
Please post the code that you are using for your project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
· here transmitter
main:
DO
GOSUB SHT_Measure_Temp
DEBUG CRSRXY, 0, 3,
"soT...... ", DEC soT, CR,
"tC....... ", DEC (tC / 10), ".", DEC1 tC, DegSym, " ", CR,
"tF....... ", DEC (tF / 10), ".", DEC1 tF, DegSym, " "
SEROUT Tx,84,[noparse][[/noparse]tC]
SEROUT Tx,84,[noparse][[/noparse]soT]
SEROUT Tx,84,[noparse][[/noparse]tF]
GOSUB SHT_Measure_Humidity
DEBUG CRSRXY, 0, 7,
"soRH..... ", DEC soRH, CR,
"rhLin.... ", DEC (rhLin / 10), ".", DEC1 rhLin, "% ", CR,
"rhTrue... ", DEC (rhTrue / 10), ".", DEC1 rhTrue, "% "
PAUSE 1000
LOOP
END
RETURN
Here reciever.
receiver_temp_data:
SERIN rx, 84, [noparse][[/noparse]soT]
SERIN rx, 84, [noparse][[/noparse]tC]
SERIN rx, 84, [noparse][[/noparse]tF]
DEBUG CRSRXY, 0, 3,
"soT...... ", DEC soT, CR,
"tC....... ", DEC (tC / 10), ".", DEC1 tC, DegSym, " ", CR,
"tF....... ", DEC (tF / 10), ".", DEC1 tF, DegSym, " "
·SEROUT 1,84,[noparse][[/noparse]HOME,"tC....... ", DEC (tC / 10 + 4), ".", DEC1 tC, DegSym, " ",CR]
GOTO receiver_temp_data
i use two BS2 one send and one reciever via 912mhz the· one reciever use the bluetooth eb500 module to send to PC but the value to PC is not correct ?
Post Edited (Tomvn) : 10/3/2009 6:49:10 PM GMT
What happens if you omit the transmitter and receiver, and wire the two BS2's directly? <-- Make sure that you share the same ground connection.
My first thought is that the data might be inverted, or get inverted through the transmitter or receiver.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
i read the document 912mhz module use 9600 to send and reciever and eb500 the same , and i ground eb500 and 912mhz same ground connection.
Post Edited (Tomvn) : 10/3/2009 7:48:26 PM GMT
The only obvious thing that I can see is that you are sending the data in a different order than you are receiving it. The 'soT' and 'tC' are swapped.
TX code
TX code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
the preview code i alraedy fix it but the problem still , let me try to make the same ground connection
and let you know what happen.
My suggestion as far as making the same ground connection also involves you eliminating the RF transmitter and receiver and going with a direct connection. This is more of a sanity check to make sure that the code is actually functioning properly before we try to look for other problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You need to have some sort of synchronization between the TX data and the RX data or else the order of which the bytes are received can become misaligned.
transmitter example:
receiver example:
Please reference the Basic Stamp Manual for SERIN, SEROUT, and the WAIT command...
www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/6/2009 4:32:46 PM GMT
let my try different Pin .
For basic Transmit and receive between two BS2's I have tested this code and setup in a direct connection configuration. For both the Transmitter(TX) and Receiver(RX), P0 is used in this example, but you can change it to whatever is applicable. When connected to your RF modules, if you are using the Parallax Transceivers(TRX) you will need to make sure that one TRX is setup as a transmitter and the other TRX is setup as a receiver. Otherwise, connect the appropriate TX or RX to the BS2 and make sure that you share a common ground connection between the RX or TX module connected to each BS2.
Transmitter
Receiver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job.
"your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job." - Yes, I understand that. This code exercise is to make sure that the code is correct. The next step would be to connect the TRX modules making sure that one is configured as a Transmitter, while the other is configured as a Receiver and connected to their appropriate BS2.
Since the TRX is a line-of-sight device, building structures and external interference can play an role in the quality of the received signal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/7/2009 4:15:32 PM GMT
·I come back ,and i still·have with the same problem .
when i just send only one [noparse][[/noparse]tC] variable· to· RX the Rx·got confuse, sometime it recieve the right value sometime not.
perhaps your getting interference between your transmitter and your receiver that doesn't allow it to operate at 600 feet. Can you move the Transmitter and Receiver closer to one another just to see if that might be part of the problem? Another thing you could try is to lower the baud rate. Sometimes that will help in a noisy environment.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
You should be able to lower the baud just fine. I'm curious how far apart the transmitter and receiver are from one another? Is there a chance that you have another device nearby operating on the same frequency that could be causing some interference?
Can you take a photo of your Transmitter and your Receiver setup? ... and possibly a schematic that you are using?
That might help nail this problem down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
yesterday i make a test to low the baud rate down but it didnt help.
I think I just figured out your problem....
In your original code... soT, tC, and tF are defined as WORDS
The serial function can only send BYTES ... so for your TX code it should look like this...
TX code
...And the RX code should look something like this...
RX code
Note:
Make sure that you define soT, tC, and tF as WORD variables. i.e.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
it works great , thanks very much to take your time.
Great!, I'm glad that worked.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.