AVRmega as I2C Slave

i2c eeprom emulation

Marco
Benutzer
Avatar
Gender: n/a
Location: Italy
Posts: 270
Registered: 10 / 2004
Subject:

AVRmega as I2C Slave

 · 
Posted: 24.01.2013 - 12:34  ·  #1
Hello,

I need know if I have well understood the way an AVRmega works as slave on an I2C bus.
I see two pipes available for tx and rx to serve the corresponding commands from the master.
I suppose a Master device can read and write into mega Slave addresses as normally done in a serial eeprom locations.
Am I right ?

regards,
Marco
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: AVRmega as I2C Slave

 · 
Posted: 26.01.2013 - 22:36  ·  #2
Hello Marco,
this is correct and also not correct.
An AVR slave has to respond immediately for every byte which is received.
A serial comm must not. I don't like any I2C slaves based an a CPU which
then is software driven. Very difficult to handle on both sides. The similar
is true with SPI slaves with AVRs. No buffering, interrupts may destroy the
data transfers etc. My opinion and experience.

rolf
Marco
Benutzer
Avatar
Gender: n/a
Location: Italy
Posts: 270
Registered: 10 / 2004
Subject:

Re: AVRmega as I2C Slave

 · 
Posted: 31.01.2013 - 11:41  ·  #3
Thank you Rolf,
I'll try to use COM port to avoid I2C...

Regards,
Marco
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   66   80 · Page-Gen-Time: 0.022614s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI