RN42 Bluetooth + PIC 18F - hardware flow control RTS/CTS

Thread Starter

atferrari

Joined Jan 6, 2004
3,452
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, it cannot transmit and has to keep checking until it gets a low to start again.

Am I right?
 
Last edited:

Thread Starter

atferrari

Joined Jan 6, 2004
3,452
Sí SP. They are in the datasheet and explicitly mentioned in the description. After all it offers the option to work at a rate of 115 KB. I am sure the micro will throw the towel quite quickly.

The suggested article seems to contradict what I posted, which in turn, was based just on this: the datasheet shows the RTS pin as OUT and CTS as IN.
 

Thread Starter

atferrari

Joined Jan 6, 2004
3,452
Thanks for your interest SP.

I am afraid that I should have RTFM again for a fourth time. The excerpt seems to be enough to answer my question. :( :( :( My bad.


Excerpt from datasheet.png


Sorry.
 

spinnaker

Joined Oct 29, 2009
7,815
Yeah if I recall CTS is the input that detects RTS from the other device,


I don't think the EUSART peripheral allows for hardware flow control so you will have to roll your own.

What are you going to do with all of this data? What is the speed of your mcu? What is the intended baud rate? If you can process it fast enough then you may not need to worry about flow control.
 
Top