nimaaa
Newbie level 6
- Joined
- Jul 25, 2014
- Messages
- 14
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 3
- Location
- Tehran, Iran, Iran
- Activity points
- 122
Sending data in AVR's USART Receiver interrupt . Available or not ?
Hi
I need my MC to consume low power and I prefer no to put my code in any permanent While Loop.
so I want to write all of my code with Interrupts.
Now I need to give the user a response when MC receives a data .
Is it available to send data or character in USART receiver interrupt ?
If not , Do you have any alternative solution to solve my issue ?
How can I get out of receiver Interrupt to active another interrupt ? ( for example : MC's timer interrupt )
please consider my code, simple. like this :
Thanks In Advance : )
Hi
I need my MC to consume low power and I prefer no to put my code in any permanent While Loop.
so I want to write all of my code with Interrupts.
Now I need to give the user a response when MC receives a data .
Is it available to send data or character in USART receiver interrupt ?
If not , Do you have any alternative solution to solve my issue ?
How can I get out of receiver Interrupt to active another interrupt ? ( for example : MC's timer interrupt )
please consider my code, simple. like this :
Code:
// USART Receiver interrupt service routine
interrupt [USART_RXC] void usart_rx_isr(void)
{
char data;
data=UDR;
if ( data == 'A' )
putchar('B') ;
}
Thanks In Advance : )
Last edited: