--- In AVR-Chat@yahoogroups.com, "ereihani" <ereihani@y...> wrote: > Is it the right way of transmitting data via serial port? > I mean I put my data in UDR then in INT routine put the next data > and so on. Well, one problem is that you never enable the interrupt on UDRE (bit 5 of UCSRB). If you're going to use the UDRE interrupt, you need to turn the enable on and off as new data is ready to be sent and old data is sent. You probably should also implement a queue for data waiting to be sent and another one for data received. There is example code, both for polled and interrupt driven serial comm, in AppNote AVR306 available here: http://www.atmel.com/dyn/products/app_notes.asp?family_id=607
Message
Re: Serial data Communication problem!
2004-04-13 by Don Kinzer
Attachments
- No local attachments were found for this message.