avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] Flow control with Butterfly


From: Graham Davies
Subject: Re: [avr-chat] Flow control with Butterfly
Date: Fri, 18 Mar 2005 07:56:08 -0500

Pertti Kellomäki wrote [in part]:

> ... I have used the application shipped with the Butterfly as
> a starting point, so when receiving from the uart my program
> also continually polls the pins connected to the joystic. The
> LCD driver is also working at the same time.
>
> ... should I need flow control ... what should it be?

If the Butterfly application does not use interrupt-driven input and output
from and to the UART, this is where I would start.  You say that you don't
know how much CPU time is soaked up by the other things going on, so you
can't reason about whether or not the ATmega169 should be able to keep up
with the serial data using polled I/O.  The clock rate of the MCU on the
Butterfly is probably well below the fastest that the ATmega169 can handle
to conserve power so it may not be going as fast as you think.  Once your
characters are received into a buffer by interrupts you can use XON/XOFF
flow control to hold off the PC when the buffer shows signs of filling up
(for example, XOFF when it filles to 75%) and XON when it empties to 25%).

The Butterfly has so little spare I/O that I would not spend a port bit on
hardware flow control.

**** Stop reading here if you object to advertising ****

Working with the AVR Butterfly might be easier with an ECROS Technology
Butterfly Carrier, which provides power, expansion space, a reset switch, a
DB9 and ISP/JTAG headers relocated to the rear.  See
http://www.ecrostech.com.

Graham.





reply via email to

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