Continue to Site

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.

Uart Interrupt for data Reading

Status
Not open for further replies.

NeethuVP

Member level 2
Joined
Jul 20, 2018
Messages
45
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
352
Hi,
I would like to read data from UART when an interrupt hits UART.. Using atemga256rfr2.. Help me to solve it
 

Hi,

And where exactly is the problem?

You surely have done some internet research, found some code and tested it.

Show us this code, show us your test conditions, show us your expectations and show us what you see instead.

Klaus
 

Interrupts don't 'hit' the uart. Instead uart generates an interrupt (if it is so configured) when it receives a complete character in it's buffer, and the mcu just has to read contents of the RX buffer.

- - - Updated - - -

So config your uart to generate interrupt on full receive, setup the ISR for the isr.
In the isr, read the rx port and store in appropriate ram buffer. Set a flag for main routine to pick up/ read buffer and take action.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top