TXC
Please read about the three interrupt sources in the USART. They are
clearly defined. RXC, UDRE and TXC.
-----------
Larry Barello
www.barello.net
| -----Original Message-----
| From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
| Of aswinefy2003
| Sent: Monday, October 03, 2005 11:37 PM
| To: AVR-Chat@yahoogroups.com
| Subject: [AVR-Chat] uart txmission
|
| Hai all
|
| I am transmiting a series of 5 data through uart.
| How can i Know that the completion of transmission of all the
| data has finished .
|
|
|
|
|
|
|
|
|
| Yahoo! Groups Links
|
|
|
|
|
On 4 Oct 2005 at 6:36, aswinefy2003 wrote:
> I am transmiting a series of 5 data through uart.
> How can i Know that the completion of transmission of all the
> data has finished .
>
sbis UCSRA, UDRE ; UART buffer empty?
rjmp PC-1
sbi UCSRA, TXC ; Prepare TXC
out UDR, data ; Send the data
sbrs UCSRA, TXC ; TX complete?
rjmp PC-1
Perhaps the original sender was wondering how to tell if
the BLOCK of data is finished.
If this is the case, you have to design a "protocol". It
might be as simple as "A gap in the transmission lasting at
least one character time denotes the end of the data."
Otherwise, you might want to consider framing characters -
these are unique characters that never occur in the data
and that denote the beginning and end of the block (or
frame).
Jim
---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------