[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Problems with ATMEGA8 USART

From: Hugo González Monteverde
Subject: Re: [avr-gcc-list] Problems with ATMEGA8 USART
Date: Sat, 13 Aug 2005 19:39:20 -0500
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

You have to be consistent with your frame format. How do you know when a "command" begins and ends? In any case you should use a terminating character for your command, such as CR, that triggers command interpretation and buffer clearing.

Can you post your initialization code and your ISR as well??? There may be something I'm not getting here. The actual hardware buffer is only 1 byte, if I'm not mistaken...


juan antonio jimenez martinez wrote:
Hi, Im experimenting some details setting the ATMEGA8 usart, for example, I have an interrupt driven routine for receiving data, may problem is how can I clean the buffer in orther to let it ready for the next reception, I mean, when I send two chars from my computer to the ATMEGA, the interrupt routine do what I want , but when I send 10 chars, the buffer that I use to read the incomming data, reads the two chars that I have send before plus the new data and as a result I got the 10 chars message incomplete due the two chars that I have sent before

I hope some one know an answer, because I have tryed with the RXC flag and it seems not work, or how can I select the sise in bytes to read at one time, and again flush all the RX usart buffers



Platica con tus amigos en linea con T1msn Messenger http://messenger.t1msn.com.mx/

AVR-GCC-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]