atmega8 as twi-slave

May 06, 2004 3 Replies

hi,



i try to use the atmega8 as a slave-device on the twi (i2c) bus. i can send the slave-adress and the atmel reacts on it, but then it sends SCL to low and the bus is blocked. i have no idea whats the next step.



does anyone have a working slave-implementation (example-code)?



thanks



regards



olli


Hi,

sorry, hier nochmal in Deutsch. Ich will einen Atmega8 als Slave- Device an einem I2C(TWI)-Bus betreiben. Wenn ich vom Master die Adresse schicke, kommt die auch beim Atmega an, der legt aber SCL auf low und dann geht gar nix mehr. Hat jemand einen Beispiel-code, oder eine Idee?

Gruss

Olli

Hi,

Ein Beispielcode ist zum Beispiel im avrlib enthalten:

formatting link

Eine eigene Implementierung für nur Master-Transmit und Slave-Receive kann ich an Interessierte per Mail zustellen.

Bye Daniel

.~. Daniel Schramm Phone: +49 231 6108112 Mail:daniel.schramm@gmx.de /V\ Bruehlweg 36 Mobile:+49 178 8839848 ICQ: 35816985 // \\ 44379 Dortmund Fax: +49 231 96989961 WWW: pinguin.sauerland.de /( )\ Germany ^`~'^

super, danke.

oh ja, waere genial. je mehr beispiele desto besser. danke

gruss olli

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required