Need help with 2 Basic Stamps Handshaking with Transceivers
ceasar
Posts: 9
I’m able to send transmission in one direction using the following code:
·
FOR RX:
·
baud CON 16572·
mainloop:
SERIN· Rx,baud,[noparse][[/noparse] zoom]
DEBUG CR,DEC zoom
IF (zoom = 119) THEN
GOSUB buzz
ENDIF
GOTO mainloop
·
buzz:
HIGH 1
PAUSE 600
LOW 1
RETURN
·
Code TX:
again:
SEROUT Tx,baud,[noparse][[/noparse]"w"]·· ' "w"=119GOTO again
·
The problem is I can t send an acknowledgement back. I think its my code. The Transceiver has an RTS pin which is an input to the transceiver. It is a logic 0 when host is ready to send/receive data. Also it has a CTS pin which is a output and is a logic 0 when its clear to send.
Does anybody have any ideas on how to accomplish this? This is for my senior project and I only have two weeks left. Please help.··
·
FOR RX:
·
baud CON 16572·
mainloop:
SERIN· Rx,baud,[noparse][[/noparse] zoom]
DEBUG CR,DEC zoom
IF (zoom = 119) THEN
GOSUB buzz
ENDIF
GOTO mainloop
·
buzz:
HIGH 1
PAUSE 600
LOW 1
RETURN
·
Code TX:
again:
SEROUT Tx,baud,[noparse][[/noparse]"w"]·· ' "w"=119GOTO again
·
The problem is I can t send an acknowledgement back. I think its my code. The Transceiver has an RTS pin which is an input to the transceiver. It is a logic 0 when host is ready to send/receive data. Also it has a CTS pin which is a output and is a logic 0 when its clear to send.
Does anybody have any ideas on how to accomplish this? This is for my senior project and I only have two weeks left. Please help.··
Comments
2) I'm not clear about the actual use of RTS and CTS for your transceivers. What kind are they? Usually RTS is a signal from the controller that the controller wants to transmit and, when not transmitting, the unit is always receiving. CTS is a signal from the transceiver that it's ok to transmit. That's not how you're using them. You seem to be using RTS as a "turn on the transceiver" signal.
Could you post a simple schematic that shows how you have your controllers connected? Which pin to which pin, and any components you might be using, like resitors, etc.
Ray
·
I think you’re correct. The RTS is an input to the transceiver. Take low when host is ready to send or receive data from the module. Logic 0 is request to send. Also CTS is an output from the transceiver. Logic 0 is clear to send, taken high when the module is busy. So I might be using them wrong. Are there any recommendations on how I could change my code?
·
Ceasar
Ray
I attached one of the modules
·
RTS is not normally used to signal "transceiver turn on". It is used to "turn transmitter on". Without more information on your transceiver, I don't have any particular suggestions.
If RTS is used to turn on the transmitter, it has to be false (logic 1) to receive. There's probably another signal from the transceiver used to indicate that valid received data is present (carrier detect). Ideally, you should look for that before doing the SERIN.
I was willing to download Proteus Lite so i could view your file, but proteus seems to have some website problems with download. So, I can't see your file either.
Also the interconnectivity will be important to see.
Ray