ATMega48 I2C bus issues

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Hi all!

I'm building a small project, involving I2C communication. One side of the
communicating partners is an ATMega48, the other is a PC, using the printer
port to bit-bang the bus. The PC is the master, the ATMega is the slave.
After much fiddling around with the TWI interface in that chip (rant saved
for another time ;-)) I got it working in almost all cases. However I have a
problem:

If I end the communication on the PC side with a stop-bit, I'll have to wait
around 50ms before I can start the next transmission. If I don't do that,
the AVR just wouldn't recognize its address and would not respond. If I
remove the stop bit (thus starting the next packet with a restart condition)
all is fine. If I wait long enough between packets, all is fine.

Has anyone send this? Any pointer what do I do wrong?

Thanks,
Andras Tantos



Site Timeline