Wednesday, April 10, 2013

Raspberry Pi flash memory SPI programmer

The goal

Write / read flash memory from Raspberry pi through SPI interface.

Usability

Big

Parts

  • at45db161d - 16Mbit flash memory
  • Raspberry pi rev.2
  • wires
  • universal board

Hardware


Use Case


Description

Raspberry PI has an SPI interface, and we can use it very easily to program our at45db161d 16 M-bit flash (16 / 8 = 2 Megabytes).

There is no special hardware required, only the pins must be connected correctly.

Our flash must be supplied by 3.3V, IO pins, are 3 and 5V compatible. Supply can be taken from Raspberry 3.3V pin and gpio voltage logic in Raspberry is ~3.3V so it will be ok for our device.

Pin connection table:


atd45db161d Raspberry pi rev.2 pin description
Pin 1   [SI] Pin 19   [MOSI] Master Output Slave Input
Pin 2   [SCK] Pin 23   [SCK] Serial data clock line
Pin 3   [RESET]     NC not connected (reset)
Pin 4   [CS] Pin 24 Chip Select
Pin 8   [SO] Pin 21   [MISO] Master Input Slave output
Pin 7   [GND] Pin 9     [GND] Ground
Pin 6   [VCC] Pin 1     [3v3] 3.3V Supply
Pin 5   [WP] NC not connected (write protect)  


AT45D161D adapter, pinout view.

AT45D161D adapter, chip view.

Connected to Raspberry pi with gpio adapter

No comments:

Post a Comment