As part of the CE Header project from the CE Skills course , we have a shift register on the SensorBoard. This chip allows us to light up 8 LEDs ( more with chip chaining ) with 3 pins. I used a Bus Pirate (Dangerous Prototypes) and probes, from Seeed Studio, to iteratively poke at it until I understood how to talk to it via SPI.
I used a DIP version of the chip in a breadboard and wired it up to the Bus Pirate. The LEDs are in the breadboard to see it working. Please note, the cable and connectors in the image below are from the Seeed probe cable. Some of the other probe cables have the colors in a different order on the connectors.
I used putty to connect to the Bus Pirate via a mini usb cable.
Note: If you decide to hook this up to an Arduino for testing, using an example sketch, here are the pins to use for your reference:
BP MOSI=pin 11
BP CLK=pin 12
BP CS=pin 8
Command | What it does |
M 5 1 1 2 1 2 2 |
Make sure the mode number you use is for SPI |
W | Turn on power, don’t forget this. If you try to access the FRAM chip before this, you will likely hang the Bus Pirate and have to unplug/plug,setup. |
Command | What it does | Output | ||||||||||||||||||||||||
[ 0b00000001 ] | Turn on LEDs. Bit 1 is QA and bit 8 is QH. |
|
||||||||||||||||||||||||
[ 0b10000000 ] | Turn on LEDs |
|
||||||||||||||||||||||||
[ 0b10101010 ] | Turn on LEDs |
|
||||||||||||||||||||||||
[ 0b00000000 ] | Turn all LEDs off |
|