Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: Hardware i2c with atmega 32

2005-02-06 by Brian Dean

Hi Lee,

On Sun, Feb 06, 2005 at 02:36:14PM -0500, Lee Leathers wrote:

> I really needed C code.

I think I've come to this thread late, so I'm not sure exactly what
you are doing, Lee, but I have some sample code on my web site for
talking to several different I2C devices using my MAVRIC boards.  My
MAVRIC uses an ATmega128, but the I2C stuff should be very similar to
the ATmega32.

     http://www.bdmicro.com/code

Specifically, look at the following examples:

     * i2cscan - simple I2C bus scanning tool

     * srf08 - ping and read responses from Devantech SRF08 - and
       ultrasonic ranger that communicates using I2C

     * cmps03 - operating with a Devantech CMPS03 compass that uses
       I2C

     * sp03 - operating with a Devantech SP03 text to speech board
       that also uses I2C for communications

In all of these cases, the MAVRIC board is the master device which I
think you mentioned is what you need to do.  All are written using
GCC.

Hope this helps.

-Brian
-- 
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.