SPI bus
Posted: Fri Dec 06, 2013 1:22 am
Let's discuss our approach to SPI bus.
SPI has three signal wires (clock, master out, master in) and, if we want to have multiple devices on sharing the same bus, a Chip Select wire - which is just a GPIO wire which tells the slave chip that it 'owns' the bus at the moment. So, three shared wires plus one wire per device.
stm32f4discovery has all there SPI buses exposed but I personally prefer SPI2 which is PB13-PB14-PB15. TODO: figure out why PB4 does not work for me and maybe use PB3-PB4-PB5 instead. I suggest we use a 10x2 flat ribbon cable which would carry three SPI signals and as many CS wires as possible.
Open question: should we have GND or +5v in the same 20 wire flat ribbon cable?
First of all, we need to figure out what are the SPI devices we might need.
1) SD card in SPI mode (pretty much mandatory)
2) HIP DD chip (pretty much mandatory)
3) programmable amplifier for software detonation detection (optional)
4) x2 digital potentiometer for stimulation mode (totally optional)
5) 'smart' drivers like TLE6240 (pretty optional)
6) thermocouple drivers (pretty optional)
7) tiny LCD screen (very optional)
What else?
SPI has three signal wires (clock, master out, master in) and, if we want to have multiple devices on sharing the same bus, a Chip Select wire - which is just a GPIO wire which tells the slave chip that it 'owns' the bus at the moment. So, three shared wires plus one wire per device.
stm32f4discovery has all there SPI buses exposed but I personally prefer SPI2 which is PB13-PB14-PB15. TODO: figure out why PB4 does not work for me and maybe use PB3-PB4-PB5 instead. I suggest we use a 10x2 flat ribbon cable which would carry three SPI signals and as many CS wires as possible.
Open question: should we have GND or +5v in the same 20 wire flat ribbon cable?
First of all, we need to figure out what are the SPI devices we might need.
1) SD card in SPI mode (pretty much mandatory)
2) HIP DD chip (pretty much mandatory)
3) programmable amplifier for software detonation detection (optional)
4) x2 digital potentiometer for stimulation mode (totally optional)
5) 'smart' drivers like TLE6240 (pretty optional)
6) thermocouple drivers (pretty optional)
7) tiny LCD screen (very optional)
What else?