Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hardware SPI+SPI or SPI + Software I2C?

Status
Not open for further replies.
I'm trying to decide which is a better approach. I'm using a 16F877A and either a SPI based UART (MAX3110E) or Ethernet (ENC28J60) IC.

I'd also like to use an EEPROM, Either a 25lc256 (SPI) or a 24LC256 (I2C). The EEPROMs don't need to be fast an could be hardware (SPI only) or software (I2C or SPI). The hardware solution requires a CS line for the Chipselect.

Problem I2C appears to have much larger EEPROM options and I could keep the SPI bus free for use with ENJ28J60.

Opinions?
 
On the AVR chips, the SCLK frequency can run at up to 1/2 the CPU clock, which makes the software much easier to write and debug (and scope out when something goes south). Plus it being a dedicated full-duplex connection means that the routines aren't nearly as complex as the whole I2C state mess.

Admittedly they eat up more pins, but when you use the chip select lines, it's pretty easy to abuse/multiplex more functions on to the SPI pins.

Problem I2C appears to have much larger EEPROM options
Are you referring to capacity? Both Atmel and ST have some pretty huge SPI flash parts... (unfortunately I don't think they're compatible in any way)

James
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top