avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Using TWI for communication between two ATMega128


From: Dave Hylands
Subject: RE: [avr-gcc-list] Using TWI for communication between two ATMega128
Date: Sun, 13 Feb 2005 16:47:29 -0800

Hi Martin,

I'm not familiar enough with the twi stuff to know what's wrong with your
code, but I was able to get one Mega32 in master mode to talk to another
Mega32 in slave mode by using the code found here:
http://hubbard.engr.scu.edu/embedded/avr/avrlib/

This includes both interrupt and non-interrupt driven versions of i2c.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/ 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On Behalf Of Martin Bammer
> Sent: Sunday, February 13, 2005 9:40 AM
> To: address@hidden
> Subject: [avr-gcc-list] Using TWI for communication between 
> two ATMega128
> 
> 
> Hi!
> 
> I'm trying to get TWI working on ATMega128. I've connected 
> two ATMega128 and 
> pulled up the SCL and SDA signals with 4k7.
> Master mode seems to work. Sending of data is no problem. But 
> I can't get 
> slave mode working.
> In my project normally all two ATMega should be slave. Each 
> ATMega can switch 
> to master mode and send data to the other controller. They 
> use different 
> bitrates to indicate bus access errors. For reception in 
> slave mode an 
> interrupt routine is installed and enabled.
> My problem is that reception doesn't work at all. The 
> interrupt routine is 
> only called when the controller is in master mode and sends 
> data to the bus.
> What could be the problem??


reply via email to

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