Parallax Transceivers coding help
Archiver
Posts: 46,084
Hello,
I have a pair of parallax transceivers. I have been able to have each send to
the other. However when I try to have one echo back what it receives it stops
receiving. I may not have the right coding. Any ideas? Below is my code...
'Master Transceiver
' 1200 inverted 17197
' 1200 noninverted 813
a var byte
Data_Rate con 813
i var byte
again:
for i = 65 to 90
toggle 0
SEROUT 14,data_rate,[noparse][[/noparse]i]
debug "Sent ",i,cr
Gosub get_it
pause 1000
next
goto again
'================
Get_It:
SERIN 15,Data_Rate,2000,No_Echo,[noparse][[/noparse]a]
Return
'================
No_Echo:
Debug "No Echo",cr
return
And this is the Slave coding...
' 1200 noninverted 813
Data_Rate con 813
a var byte
input 14
again:
debug "Waiting",cr
SERIN 15,Data_Rate,[noparse][[/noparse]a]
gosub Got_It
goto again
'==============
Got_It:
debug "Got ",a,cr
pulsout 8,300
pause 500
SEROUT 14,Data_Rate,[noparse][[/noparse]a]
return
'==============
Jerry
[noparse][[/noparse]Non-text portions of this message have been removed]
I have a pair of parallax transceivers. I have been able to have each send to
the other. However when I try to have one echo back what it receives it stops
receiving. I may not have the right coding. Any ideas? Below is my code...
'Master Transceiver
' 1200 inverted 17197
' 1200 noninverted 813
a var byte
Data_Rate con 813
i var byte
again:
for i = 65 to 90
toggle 0
SEROUT 14,data_rate,[noparse][[/noparse]i]
debug "Sent ",i,cr
Gosub get_it
pause 1000
next
goto again
'================
Get_It:
SERIN 15,Data_Rate,2000,No_Echo,[noparse][[/noparse]a]
Return
'================
No_Echo:
Debug "No Echo",cr
return
And this is the Slave coding...
' 1200 noninverted 813
Data_Rate con 813
a var byte
input 14
again:
debug "Waiting",cr
SERIN 15,Data_Rate,[noparse][[/noparse]a]
gosub Got_It
goto again
'==============
Got_It:
debug "Got ",a,cr
pulsout 8,300
pause 500
SEROUT 14,Data_Rate,[noparse][[/noparse]a]
return
'==============
Jerry
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
it works.
Jerry
>'Master Transceiver
>' 1200 inverted 17197
>' 1200 noninverted 813
>a var byte
>Data_Rate con 813
>i var byte
>again:
>for i = 65 to 90
> toggle 0
> SEROUT 14,data_rate,[noparse][[/noparse]i]
[noparse][[/noparse]Non-text portions of this message have been removed]
Original Message
> From: Chris Loiacono [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_iKLDy9iG_YJo_sML9JUpopvM4VomGSvYdaWZSsy9QAaqYu5qpuYWk5rUxuN_NN2nw-ZdWvlpS5K]chris@m...[/url
> Sent: Monday, January 14, 2002 11:40 AM
> To: 'basicstamps@yahoogroups.com'
> Subject: RE: [noparse][[/noparse]basicstamps] Parallax Transceivers coding help
>
>
> If what you mean is that you want the slave to send the
> received data back to the master, but it gets locked up
> before replying, try using a validation byte, preceded by a
> "junk" byte, because the first bit or two may not be grabbed
> on the way in. If the stamp does not see a byte as defined,
> it will still sit and wait....
>
> Without really scrutinizing your code, might the master be in
> a "pause" at the time the slave is TX'ing? That would kill it also.
>
> Also, realize that, even while running this TX/RX routine so
> slowly, you will have to make sure that the master and slave
> are never transmitting a single bit concurrently.
> Unfortunately, with transceivers on one frequency and such
> low bandwidth as is afforded with Stamps, worsened by the
> super-slow baud rates of these transceivers, you will have to
> employ a lot more grey-matter to get this to work reliably,
> even after getting it to work at all.
>
> Try Peter Anderson's page for some good lessons. I think it's
> www.phanderson.com
>
>
> Chris
>
> >
> > Hello,
> > I have a pair of parallax transceivers. I have been able to
> > have each send to
> > the other. However when I try to have one echo back what it
> > receives it stops
> > receiving. I may not have the right coding. Any ideas? Below
> > is my code...
> >
> > 'Master Transceiver
> > ' 1200 inverted 17197
> > ' 1200 noninverted 813
> > a var byte
> > Data_Rate con 813
> > i var byte
> > again:
> > for i = 65 to 90
> > toggle 0
> > SEROUT 14,data_rate,[noparse][[/noparse]i]
> > debug "Sent ",i,cr
> > Gosub get_it
> > pause 1000
> > next
> > goto again
> > '================
> > Get_It:
> > SERIN 15,Data_Rate,2000,No_Echo,[noparse][[/noparse]a]
> > Return
> > '================
> > No_Echo:
> > Debug "No Echo",cr
> > return
> >
> > And this is the Slave coding...
> > ' 1200 noninverted 813
> > Data_Rate con 813
> > a var byte
> > input 14
> > again:
> > debug "Waiting",cr
> > SERIN 15,Data_Rate,[noparse][[/noparse]a]
> > gosub Got_It
> > goto again
> > '==============
> > Got_It:
> > debug "Got ",a,cr
> > pulsout 8,300
> > pause 500
> > SEROUT 14,Data_Rate,[noparse][[/noparse]a]
> > return
> > '==============
> >
> > Jerry
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
> > Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
>