P
P
plr2013-02-22 23:11:55
linux
plr, 2013-02-22 23:11:55

Confused in three pines: UART, GPIO, RS232

There is a project on a PC that interacts with an external device. The external device has a TTL interface with the characteristics of 9600.8,n,1. Using the MAX level converter, we connect to RS232.

Now we need to port the project to ARM926, in particular to the .

Everything is done under linux.

And now I can not figure it out, or rather confused.

1. What does 4 pcs UART actually mean in the specifications? What does 1 UART consist of? How can it be used?

2. GPIO is not UART? GPIO consists of RX/TX Can't they be used instead of RX/TX RS232?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
theaspin, 2013-02-22
@plr

The simplest UART is two pins: RX / TX. A level converter (eg MAX232) is required to connect to RS232. In most cases, the pins on the processor have several functions, that is, one pin can be either a UART TX or a regular GPIO. If the board already has ready-made Linux, then everything should already be configured there, you just need to connect the external device to the correct pins.

J
jcmvbkbc, 2013-02-22
@jcmvbkbc

1. What does 4 pcs UART actually mean in the specifications? What does 1 UART consist of? How can it be used?

UART is an asynchronous transceiver that converts bytes written to it from the host side in the sequence “start bit, data bits, parity bits, stop bit” on the TX pin and vice versa, from the RX pin into bytes. It usually has a group of registers that define transmission / reception parameters, such as speed, number of bits per byte, parity, etc. This group of registers is the "logical UART" for the host. With the appropriate UART level converter can be used with RS interfaces.
2. GPIO is not UART? GPIO consists of RX/TX Can't they be used instead of RX/TX RS232?

GPIO is generic I/O. It is usually represented by several registers, the bits of which correspond to the interface pins: the direction register (its bits are responsible for whether the pin is input or output), the input register (the bits correspond to the states of the input pins), the output register (the bits control the state of the output pins). A change in the state of the pins is usually immediately reflected in the input register, and a change in the output register usually immediately changes the state of the output pins. If desired, you can programmatically implement UART on the GPIO.

S
Suse, 2014-04-17
@Suse

Good afternoon, I also got confused in them, does the usual com-port in a personal computer communicate with hardware via uart?
For example, a bunch of scales + personal on Windows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question