Follow along with this
series! Joe’s book & kits
are available at
by Joe Pardue
Last month, we learned more about SPI
(Serial Peripheral Interface) and how to use
it with the AVR Butterfly’s 4 Mbit DataFlash.
I ended that article with the promise that
this month we would use the Butterfly
DataFlash in a data logger application.
However, then reality smacked me up side
the head and I realized that we were getting
into fairly complex stuff without having
discussed some of the background concepts
we will need to understand to keep from
getting too confused.
A data logger uses just about everything
that a microcontroller can do. We will be
using the DataFlash to log the data, the hardware SPI to
talk to the DataFlash, the USART to talk with a PC, one of
the timers for a real time clock, the ADC for light,
temperature, and voltage sensors, and other things that
escape me at the moment. The point is that without some
higher level of organization, this project will get out of
hand. So, this month we will begin to build resources that
we will use later to make that promised data logger.
■ FIGURE 1. AVR_Toolbox.
I Left It Around Here Somewhere ...
58 January 2011
Up to now, we’ve been pretty much dealing with only
a few things at a time. For instance, when we examined
AVR memory we divided it up into five articles where we
learned about each type of memory and wrote some
code that let us use each type. In the last two articles, we
learned to access external memory in the Butterfly’s Atmel
DataFlash using the SPI bus (with hardware and software
versions — and as a side benefit, we built a new light
chaser LED project that had nothing to do with memory).
So now, with all these great simple projects under your
belt, you can easily recall all that you learned and
immediately write the code — right? Well, if you can,
you’ve got a better memory than I do.
What we really need is a well organized toolbox for