What kinds of UART Flow Control are available ?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

What kinds of UART Flow Control are available ?

Post by HansH »

Hi communication specialists, I'm a beginner ;-)

I need to project the communication of an Adafruit ItsyBitsy M4 Express featuring ATSAMD51 through the UART pins (continued over a RS232 adapter board)

What kind of UART flow control at the UART pins is expected for the Adafruit ItsyBitsy M4 Express featuring ATSAMD51 ?

On Adafruit ItsyBitsy M4 Express featuring ATSAMD51 , I only see the UART pins for RX, TX and Ground.
I don't see pins for RTS/CTS or DSR/DTR. So my impression is, there is no hardware flow control expected, correct? Or is it intended that some other pins are used for it?

What kind of flow control is availble with this board?
Is there hardware flow control? (which)
Is there software flow control ? (which can be set?) Is it X-On/Off or is there none?
I guess it's just "none" as that would be sufficient for ASCII data transmission, correct?

best regards
Hans

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: What kinds of UART Flow Control are available ?

Post by dastels »

There's none explicitly. For simple ASCII you don't need it. Flow control is mainly only useful for data transfers to avoid overfilling receive buffers.

Dave

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

Ok, I understand, so there is no option for flow control, neither hardware nor software with this board, other than with the Bluefruits.

Yes, You are right. Flow control is not required in my case, as the only task os data transmission at 1 Hz.

More general question or presumption:
I think there is no option to use the serial line for interaction with the board, or even programming?

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: What kinds of UART Flow Control are available ?

Post by dastels »

You can implement your own flow control if the device on the other end uses hardware handshaking.
I think there is no option to use the serial line for interaction with the board, or even programming?
I'm not sure what you mean.

Dave

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

Ok, You mean, I could write a program that makes two of the analogue ports control the flow. Right now this is beyond my capabilities :-)

What else I mean:
The circuits will be inacessible to manual interaction or to USB connection finally. In case one would want to modify simething in the orogram, I guess, there is no way wirh the serial connection?

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: What kinds of UART Flow Control are available ?

Post by dastels »

Two digital pins, but yes. UNder control of some code. But again, only useful if you are doing mass data transfers.

Oh, to connect a terminal and do programming? You couldn't do that without firmware/runtime that supported it. What exists is USB focused.

Dave

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

@dastels

I guessed so, programming via RS232 is not available this way.

I'm curious, there are RS232-USB adapters.
If I connect the USB port of the Itsybitsy with an RS232 Adapter instead of the UART pins and on the PC side connect RS232 to USB adapter:
Does this make a difference regarding the possibility to transfer a modified to the Itsybitsy?
Or what kind of connectivity is missing for that. (Sorry, You see I'm still in the beginning of learning.)

thank You !

best regards
Hans

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: What kinds of UART Flow Control are available ?

Post by dastels »

I'm not 100% certain but I don't think that will work. USB-serial adaptors are generally designed to give you serial on a computer that just as USB host capabilities so you can work with something like https://www.adafruit.com/product/2377. I haven't seen ones to convert a serial connection to USB for a device. That doesn't mean they can't be found, though.

A fine point: what you are talking about are UART/serial connections. RS-232 is a standard that defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. See https://en.wikipedia.org/wiki/RS-232 for more details than you probably want.

Dave

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

@dastels

I haven't sufficient knowledge to understand, what component of the USB signals might be required for changing the program on the microcontroller, but will get lost after two back and force RS232 conversions.

Yes, I hope I understood everything correctly:
My last impression was, that RS232 defines the 12V voltage level, TTL seems to be the original logical output level of the microcontroller and UART is the protocol of the level changes?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: What kinds of UART Flow Control are available ?

Post by adafruit_support_bill »

RS232 voltage specs are +3v to +15v for a '0' and -3v to -15v for a '1'. +/- 12v is just one of the more common implementations.

TTL serial operates at TTL logic levels. Typically the same as the logic level of the processor - 0v to 3.3v or 0v to 5v. So conversion to RS232 standards requires both a logic inversion and a voltage shift.

The UART is the component (usually hardware, but can be emulated in software) which serializes buffers of byte values into bits 'on the wire'. And de-serializes bits on the wire back into byte buffers. A UART is typically configured to start each byte transmission with a 'start bit' and end it with one or more 'stop bits' and sometimes a 'parity bit' for error detection.

In the olden-days, hardware UART chips also implemented hardware flow-control. This was important back when processor speeds were lower and buffer-space was precious. Flow-control has all but disappeared from most modern UART implementations in microcontroller chips.

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

Hi @adafruit_support_bill and @dastels, thank You for Your enlightening comments.

Regarding the Pololu RS232 adapter, I guess the I need to connect the
RX of the adapter on both sides respectively to the TX of its partner i.e.
  • the adapter D9 side's RX connect to the optical fiber modem's TX and
  • the adapter TTL side's RX connect to the ItsyBitsy's TX
etc.
correct?

I perceive it confusing, that some parts are labelled with port names like TXin and RXout (i.e. at WaveShare products), but with Pololu it seems clear

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: What kinds of UART Flow Control are available ?

Post by westfw »

In theory, I believe you could enable hardware flow control using D10 and D11.
But it's not supported by the default software, and adding support would be a matter of relatively advanced programming.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: What kinds of UART Flow Control are available ?

Post by adafruit_support_bill »

Your proposed connections sound correct. The meaning of Tx and Rx is sometimes ambiguous. But looking at the Pololu description:
The TX line and RX lines are labeled from the computer’s perspective, so the TX pin has data transmitted by the computer that should be connected to your project’s receive input.

User avatar
HansH
 
Posts: 117
Joined: Wed Apr 14, 2021 2:49 pm

Re: What kinds of UART Flow Control are available ?

Post by HansH »

@adafruit_support_bill
Your proposed connections sound correct.
... that is helpful

But this Pololu-text
The TX line and RX lines are labeled from the computer’s perspective, so the TX pin has data transmitted by the computer
is really confusing me, as it is not sufficiently specific in the details.

I tend to wrongly understand this as:
The TX line (of the Pololu's D9-port side) takes the data from the PC and transmits it with on the TTL side's TX port to the microcontroller.

But problably this text should be understood differently as: The complete cabling of an arrangement with PC and Pololulu adapter and microcontroller is starting with the labeling of the PC. So the data from the PC leave the PC on its TX port, reach the Pololu's D9 port's RX and are forwarded from the adapter at the TTL's TX port.

Could You verify my final conclusion?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: What kinds of UART Flow Control are available ?

Post by adafruit_support_bill »

The description is very clear about the meaning of the TTL level Tx and Rx signals. The text also says:
The first nine pins on the deluxe serial adapter correspond to the same nine pins on a COM port DB9 connector.
Though the last sentence in that same paragraph would seem to imply that pins 2 and 3 are crossed. Without a schematic, I can only speculate. For a definitive answer, you should contact Pololu directly.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”