Can Arduino support synchronous USART?

I am pretty confused between USART and UART because the 2 terms seem to be used interchangeably.

The Atmega328 supports USART. But how do we specify when to use USART or UART? What if the remote end supports only UART and not USART? My guess is that Arduino uses the asynchronous version by default and cannot use synchronous version. Is it because this is due to the Arduino libraries?

lightaiyee:
The Atmega328 supports USART.

No. The ATmega328 has a USART. The USART is a hardware module within the processor.

The USART module is capable of: synchronous data transfer, asynchronous data transfer, and SPI.

lightaiyee:
But how do we specify when to use USART or UART?

You only use the USART. There is no such thing as a UART module.

The AVR USART has a "synchronous" mode that you can set up in its configuration register (not directly supported by any Arduino firmware.)

However, it's a pretty poor "synchronous" device by (say) Datacomm standards.

  1. Only one external clock signal.
  2. Still (apparently) only supports "async" style byte formats (start bit, stop bit.)
  3. that means no idle character generation or recognition, no bit-stuffing, no HDLC-style packets, no CRC support...

I'm not sure exactly what it is supposed to be useful for :frowning:

westfw:
The AVR USART has a "synchronous" mode that you can set up in its configuration register (not directly supported by any Arduino firmware.)

However, it's a pretty poor "synchronous" device by (say) Datacomm standards.

  1. Only one external clock signal.
  2. Still (apparently) only supports "async" style byte formats (start bit, stop bit.)
  3. that means no idle character generation or recognition, no bit-stuffing, no HDLC-style packets, no CRC support...

I'm not sure exactly what it is supposed to be useful for :frowning:

Is it right to say that Arduino cannot do the synchronous aspect of USART. To do that, one has to use AVR Studio?

lightaiyee:

westfw:
The AVR USART has a "synchronous" mode that you can set up in its configuration register (not directly supported by any Arduino firmware.)

However, it's a pretty poor "synchronous" device by (say) Datacomm standards.

  1. Only one external clock signal.
  2. Still (apparently) only supports "async" style byte formats (start bit, stop bit.)
  3. that means no idle character generation or recognition, no bit-stuffing, no HDLC-style packets, no CRC support...

I'm not sure exactly what it is supposed to be useful for :frowning:

Is it right to say that Arduino cannot do the synchronous aspect of USART. To do that, one has to use AVR Studio?

No, one could do it using the arduino IDE, but it would require writing a synchronous serial library and installing it into the users libraries folder and using it's commands rather then the standard arduino Serial library. Even if moving to AVR Studio would still require writing or obtaining a synchronous serial functions.

Lefty

I need to interface Arduino to a module which uses synchronous UART. To my dismay, even with Arduino's rich support for libraries, I cannot find anything on Google regarding synchronous serial communication being done on Arduino. Also, although Atmega328 supports USART, I do not see any additional clock signal pin that can be used for synchronous communication. Can Atmega328 really support synchronous UART properly?

Moderator edit: over-quoting removed

lightaiyee:
I need to interface Arduino to a module which uses synchronous UART.

Please post a link to the module.

lightaiyee:
I need to interface Arduino to a module which uses synchronous UART. To my dismay, even with Arduino's rich support for libraries, I cannot find anything on Google regarding synchronous serial communication being done on Arduino. Also, although Atmega328 supports USART, I do not see any additional clock signal pin that can be used for synchronous communication. Can Atmega328 really support synchronous UART properly?

Yes it can. You really need to study the AVR datasheet to understand the capabilities and how to utilize the AVR USART hardware. There is a clock pin called XCK (device pin 6 in the DIP package) that is used for synchronous mode, as an input pin if in slave mode or as a output pin if in master mode. The hardware functionality is all there it's just up to you to write or locate a software library to support it.

Lefty

Moderator edit: over-quoting removed