Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Lay man question on AVR serial communication.

Status
Not open for further replies.

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,143
Two simple queries

  1. Is there something like serial data buffer in AVR microcontrollers Atmega 16/32?
  2. If serial input is coming to MCU, the incoming data will not be accessible after the data stream is over?
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
523
Trophy points
1,393
Activity points
0
UDR is the register which holds the serial byte. You have to use Serial receive interrupt to read the bytes. If the serial transmission is complete then UDR holds the last byte that was transmitted to AVR.
 

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
858
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,143
Thanks
UDR holds the latest byte received.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,475
Helped
4,306
Reputation
8,617
Reaction score
4,262
Trophy points
1,393
Activity points
129,132
Hi,

THE given answer is true. It , relates on UART communication.
There are at least two other serial communication interfaces: SPI and TWI.

In either case you need to read the receive register before a new byte tranfer is complete, else you will loose data.

Klaus
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top