Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

UART and RS232

Altera_Forum
Honored Contributor II
1,587 Views

hi. Is UART have to be used with RS232 only or vice versa?  

 

I am using hyper terminal to test the communication. The data received is in weird symbol before changing to ascii code. Actually the weird symbol is what kind of standard or anything? 

 

Thanks
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
898 Views

RS232 is the physical interface describing its electrical specification. 

There is also RS422 or RS485 as an example. (the is also a 20mA current loop very common) 

The UART is controling the transmission of information over the physical interface. 

 

If you receive weired stuff befor you see ascii then one thing could be that at the beginning both sides are not syncron in transmission. your pc with hyper terminal thinks that databits are the startbit / stopbit until the synchronize into the correct start stop bits of the data stream. 

thats why there are protocols over such data streams are used to enshure the receipt of a complete transmission.
0 Kudos
Altera_Forum
Honored Contributor II
898 Views

Just to confirm that RS422 or RS485 can be used with UART? 

 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
898 Views

yes 

Like your musik system at home, the UART is the amplifier and if you use a headset (RS232) or loudspeaker (RS485) doesn't matter how the information is transmitted by using different interfaces
0 Kudos
Altera_Forum
Honored Contributor II
898 Views

O i c. Actually what determine the communication in specific format(string, boolean etc) since UART is just a handling on serial and parellel 8-bit data manipulation? 

 

In other words, how to receive the data is in string format? 

 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
898 Views

The UART is converting from parallel to seriell und vice vera by controling the transmission, but no interpretation of the information that is transmitted or received if we forget the break condition for a moment. 

 

the interpretation is done in software.
0 Kudos
Altera_Forum
Honored Contributor II
898 Views

An UART usually transmits 8-Bit data. The meaning of the data has to be defined by the application, it can use binary as well as ASCII formatted ("string") data. Typically, printf() and scanf() functions of a C compiler are used for ASCII encoding and decoding of data. Compiler user guides and programming language text books should answer all respective questions.

0 Kudos
Reply