BS2P40 baud rates
I know there is a document that gives the codes for setting up serial data and I cannot find it.
I have a couple of RF modules and have had them going previously but today all I get is garbage.
Currently just trying to receive the data in a windows application that came with the transmitters. (Technically they are transceivers)
Think I have proved everything else is working:
remove TX pin from stamp = no data received
change data to a small string and small string of data is received
data in a loop so same garbage repeating.
I can only think I have accidentally messed up the serial command.
The only other thing to change is I went from ver 2.3.0 to 2.3.9 of Parallax software
Also I am using the same computer to setup Stamp, disconnect software and open monitoring application on receiver. So having to shut software between attempts. Com port seems to be coping with this however I haven't ruled out Com port confusion.
Well I am confused anyway.
Extract from program below:
' {$STAMP BS2p}
' {$PBASIC 2.5}
Turbine1_Rot VAR Word ' could be more than 255rpm so used word and can be 0 to 65535
Radio_Tx CON 14 'Radio on pin
Radio_Baud CON 240 'Radio baud 9600 8-N-1
x VAR Byte
y VAR Byte
Main:
x = 10
y = 20
DO
x = x+1
y = y+2
GOSUB Radio_update
LOOP
END
' Subroutines
Radio_update:
PULSOUT Radio_Tx, 1200 'set pin high to be a serial port
SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse]"hello richard "]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse] DEC(x), " " ]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse] DEC (y), " " ]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse]"hello saskia "]
PAUSE 1250
RETURN
As you can see i have commented out several lines anyway from the data to be transmitted.
I have a couple of RF modules and have had them going previously but today all I get is garbage.
Currently just trying to receive the data in a windows application that came with the transmitters. (Technically they are transceivers)
Think I have proved everything else is working:
remove TX pin from stamp = no data received
change data to a small string and small string of data is received
data in a loop so same garbage repeating.
I can only think I have accidentally messed up the serial command.
The only other thing to change is I went from ver 2.3.0 to 2.3.9 of Parallax software
Also I am using the same computer to setup Stamp, disconnect software and open monitoring application on receiver. So having to shut software between attempts. Com port seems to be coping with this however I haven't ruled out Com port confusion.
Well I am confused anyway.
Extract from program below:
' {$STAMP BS2p}
' {$PBASIC 2.5}
Turbine1_Rot VAR Word ' could be more than 255rpm so used word and can be 0 to 65535
Radio_Tx CON 14 'Radio on pin
Radio_Baud CON 240 'Radio baud 9600 8-N-1
x VAR Byte
y VAR Byte
Main:
x = 10
y = 20
DO
x = x+1
y = y+2
GOSUB Radio_update
LOOP
END
' Subroutines
Radio_update:
PULSOUT Radio_Tx, 1200 'set pin high to be a serial port
SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse]"hello richard "]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse] DEC(x), " " ]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse] DEC (y), " " ]
'SEROUT Radio_Tx, Radio_Baud, [noparse][[/noparse]"hello saskia "]
PAUSE 1250
RETURN
As you can see i have commented out several lines anyway from the data to be transmitted.
Comments
The Baud constant you gave should be correct for 9600 Baud on a BS2p. If you're not using Parallax's modules, there may be other issues.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Hopefully I'll have sorted soon.