The following example programs, which I have developed, are written in C for use with
the AVR-GCC compiler.
Tested with AVR-GCC 3.4.3 (WinAVR 20050214)
using a AT90S8515-8PC at 4 Mhz and ATmega8 with 1Mhz..
For easy downloading, all these examples are available in a single archive:
avrgcc-examples.zip
- helloled
basic port input/output techniques
- walkingled
Turns on one LED on port B which walks from bit 0 to bit 7 in intervals of 0.5
sec
Uses AVR Timer/Counter1 interrupt to generate the 0.5 sec delay.
- flashled
Uses Timer/Counter Output Compare Mode to flash a LED with 1 Hz.
- externint
Read input port using external Interrupt
- pwmdemo
Dims a LED using Pulse Width Modulation
- test_eeprom
Accessing variables stored in internal EEPROM
- RC5decode
Decodes RC5 remote control codes
- test_starterkit
Test program for my AVR starter kit
- externalsram
Example using the External Memory Interface available on some AVR.
- debounce_keys
Demonstrates debouncing eight keys using a timer interrupt.
- adc
Analog to digital conversion using the built-in ADC of the ATmega8
I have developed the following libraries which can be used with the AVR-GCC compiler:
Tested with AVR-GCC 3.4.3 (WinAVR 20050214) using a AT90S8515-8PC at 4
Mhz and ATmega8 at 1Mhz and 4 Mhz.
- I2C Master Interface
This library consists of a C include file i2cmaster.h and an assembler
module i2cmaster.S.
It can be used to communicate with I2C devices (serial eeprom, serial RTC etc) from
any AVR device.
i2cmaster.zip
Online Manual
HTML Help Manual
Test program for my AVR Starter Kit
For testing my AVR starter kit, I have developed the
following test program, which is already compiled/linked for direct downloading with a
programmer. (test_starterkit.zip).
� Copyright 2004 Peter Fleury e-mail [email protected]
home page: http://jump.to/fleury