1
\$\begingroup\$

I am trying to use the FT232R chip in order to allow for Serial communication between a board based on the ATMEL SAMD21 chip and a PC. I need this in order to obtain input from the user, and display some sensor output to the terminal to alert the user.

In the FT232R datasheet, it connects RTS and CTS of the FT232R to RTS and CTS of the microcontroller for it's UART example, but there are contradicting opinions about whether RTS and CTS are essential for proper communication. How do I know if RTS and CTS are used in this case, and whether my application would function properly without them?

Thanks

\$\endgroup\$
4
  • 3
    \$\begingroup\$ RTS/CTS is needed when a hardware flow control is used. It is dependent on the protocol specification rather than on the nature of the endpoints. \$\endgroup\$
    – Eugene Sh.
    Nov 17, 2017 at 18:24
  • \$\begingroup\$ it basically depends on if either end cannot keep up. try it without and see if you start losing characters and the deal with that either by making the code more efficient or use fifos in the uart(s). rts/cts is going to consume more of your mcu pins... \$\endgroup\$
    – old_timer
    Nov 17, 2017 at 18:27
  • \$\begingroup\$ @old_timer - more correctly, it depends on if usage of the pins is expected. A reason for making it expected would be the possibility of something not keeping up with a flood of data if it did not have that mechanism to throttle it. \$\endgroup\$ Nov 17, 2017 at 18:28
  • \$\begingroup\$ right if either side cannot keep up then you need flow control and these pins plus settings in the uarts enable that. if you can keep up, then you dont need flow control and you dont need four mcu pins for uart but instead just two. \$\endgroup\$
    – old_timer
    Nov 17, 2017 at 22:04

2 Answers 2

2
\$\begingroup\$

This is unanswerable based on the hardware alone.

Rather it depends on the software on each end. If the software expects (or configures operating system serial drivers or buffered UART modes to expect) the use of hardware flow control, then you must either connect these or wire them into a permissive state.

If the software doesn't try to use them (or configure for their use), then it doesn't matter if you connect them.

(In rare legacy cases, the "software" in question could be a state machine implemented in a more hardware-like fashion, but apart from UART-level buffer management this is extremely unusual - and regardless, the concept is the same, that it is the usage of the port that possibly cares about hardware flow control, not the low level of the port itself).

\$\endgroup\$
1
\$\begingroup\$

Chris has already given you a perfect answer, but I'd like to add..

It also depends on the nature of what you are connecting to what and how you plan on exchanging information.

If the transfer is solicited from the host, that is, the PC "commands" or "asks" your interface to do something or to return a block of information of a know size, then you effectively have a built in handshake system and use of the hardware lines is usually not required.

If however, your interface sends uncontrolled, and unsolicited data, perhaps thousands of sensor readings continuously, then there is the possibility that the PC, or whatever is buffering the serial data, will not be able to keep up and data will be lost. In that situation, I would strongly recommend using the control lines.

Even though PC's themselves are really fast these days, the operating system often isn't. If some high priority task hi-jacks your process time, it does not take long to over-run the serial buffer at high baud rates.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.