The Jim Patchell AVR Page
created September 30, 2001

    I only just started to really work with the AVR only a couple of weeks ago (from the created date you see above).  The ulitmate application for the AVR in my projects is for a MIDI interface for my synthesizer projects.  Some of the things I am writing may, however, be of some use to others, so, I am willing to share what I have learned.

    As of the create date, all code on this web page was created with the Image Craft ICC compiler.

    The code is run on an STK200 unless otherwise noted.



Example 1
    Interrupt Driven Uart Transmit routine.

    This is the first interrupt code I wrote for the AVR.  It is very simple.  It sends a stream of ascii data out of the serial port.  It does this by writting the data into a buffer, which is then emptied by a transmit interrupt routine.

    The data is transmitted at 9600 baud if the processor is using a 4 MHz clock (which is what is on the STK200 eval board).

     Source Code For Simple transmit interrupt routine



Example 2
    Interrupt Driven Uart Transmit and Recieve Routines

    This is the second interrupt code I wrote for the AVR.  It is the same as example 1, with the addition of the recieve routines.

    The data is transmitted and recieved at 9600 baud if the processor is using a 4 MHz clock.

     Source Code for Simple Transmit and Recieve interrupts