AVRmega as I2C Slave

i2c eeprom emulation

Marco
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

AVRmega as I2C Slave

 · 
Gepostet: 24.01.2013 - 12:34 Uhr  ·  #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
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: AVRmega as I2C Slave

 · 
Gepostet: 26.01.2013 - 22:36 Uhr  ·  #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
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

Re: AVRmega as I2C Slave

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

Regards,
Marco
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 8 · Cache Hits: 14   67   81 · Page-Gen-Time: 0.01588s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI