I intend to control an RN42 Bluetooth module with a 18F PIC micro expecting to receive big chunks of data from the RN42 / send big chunks of data to the RN42
Regarding the RTS / CTS signals, please tell if I got this right whether the module is in "command" or "data" mode.
Micro's RTS pin to be a permanent output going into the RN's CTS input.
Micro's CTS pin to be a permanent input receiving the RN's RTS output.
If the micro needs to process the data received up to now, has to output a high on its RTS pin so the RN stops.
If the micro can receive data, has to output a low on its RTS pin so the RN can resume transmision.
When the micro wants to transmit has to check if it gets a low on its own CTS pin.
If the micro reads a high in it own CTS pin, cannot transmit and keep checking until it gets a low to start again.
Request to Send/Clear to send.
I have not used the RN42 but have used the USART CTS/RTS and the relative transmission ends are the a RTS (out) goes to CTS (in) on each respective units.
IOW one is a request command output, the other a status as to readyness to recieve.
If a request to send is sent, the output takes place if the recieving module is ready (CTS), if the reciever's buffer becomes full or data requires processing, then a CTS is sent back to hold up transmission until more data can be recieved.
Not sure if that answers the question?
Max.
Request to Send/Clear to send.
I have not used the RN42 but have used the USART CTS/RTS and the relative transmission ends are the a RTS (out) goes to CTS (in) on each respective units.
If a request to send is sent, the output takes place if the recieving module is ready (CTS), if the reciever's buffer becomes full or data requires processing, then a CTS is sent back to hold up transmission until more data can be recieved.
Not sure if that answers the question?
Max.
Sorry Max, I cannot follow you here. The micro can set/clear its own RTS and read its own CTS. As I posted, I understand that the only thing it can do is set/clear its own RTS, but not sure.