SPI - interface

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need info how to connect mega16 and serial eeprom with SPI (M95256). When I read from eeprom do I have to switch mega16 to slave mode after read command.
I tried to find example (sw&hw) from google but got about million links which told that avr has SPI for programming

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

[Edit] A very simplified description of SPI.

Master initiates the communication and supplies the clock signal thru out.
The slave is clocking out data the whole time, the data the slave sends usually is don’t cares till some number of clock after master is finished sending command.
Typically goes like this:
Master sends command,
master sends specified number of don’t care bits (set up time)
master sends don’t care bits to clock in (supply ck for slave), the slave’s response.
Clock polarity(master and slave) is also important.

Most datasheets (slave device) have a good example and show how to hook up.
Try checking in the Academy, button at top of screen.