How to delete rx_buffer in UART of Atmega 128

General discussion on Libstock website & codes posted on this website.
Post Reply
Author
Message
boydtvt32
Posts: 7
Joined: 12 Apr 2013 03:13

How to delete rx_buffer in UART of Atmega 128

#1 Post by boydtvt32 » 22 Apr 2013 10:31

Hi everybody,i have a question: how to delete "rx_buffer" in UART of Atmega 128 after revice data done? in Mikro C not have this fuction.
please help me,thanks.

boydtvt32
Posts: 7
Joined: 12 Apr 2013 03:13

Re: How to delete rx_buffer in UART of Atmega 128

#2 Post by boydtvt32 » 23 Apr 2013 10:46

hello admin..........,can you help me??

veljko.pavlovic
Posts: 59
Joined: 15 Apr 2013 11:19

Re: How to delete rx_buffer in UART of Atmega 128

#3 Post by veljko.pavlovic » 23 Apr 2013 14:50

Hello boydtvt32,

My apology for waiting the answer.
For problem that you have, you must to clear registers UDR0 and UDR1:
UDR0 = 0;
UDR1 = 0;

First refer to UART1 and the second one are refer to UART2.

You can see more information about this microcontrollers and his registers on this site:
http://www.atmel.com/Images/doc2467.pdf

Best regards,
Veljko Pavlovic.

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: How to delete rx_buffer in UART of Atmega 128

#4 Post by p.erasmus » 23 Apr 2013 19:50

boydtvt32 wrote:hello admin..........,can you help me??
If you post in the correct forum then you would get help quicker ,I just do not now what an Atmega UART has to do with Libstock Forum
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

Post Reply

Return to “Libstock Discussion”