title |
---|
spi_bit_bang: |
--8<-- "config_section.md"
Valid in | |
---|---|
machine config files | YES ✅ |
mode config files | NO 🚫 |
The spi_bit_bang:
section of your config is where you configure the
How to use SPI Bit Bang in MPF platform.
The following sections are required in the spi_bit_bang:
section of
your config:
Single value, type: string name of a digital_outputs: device. Defaults to empty.
This output is used to clock the SPI chip.
Single value, type: string name of a digital_outputs: device. Defaults to empty.
This output is used to chip select the SPI chip. It usually also triggers the parallel read of the chip.
Single value, type: string name of a switches: device. Defaults to empty.
This input is read serially to determine the state of your inputs.
The following sections are optional in the spi_bit_bang:
section of
your config. (If you don't include them, the default will be used).
Single value, type: time string (secs)
(Instructions for entering time strings). Default: 50ms
How long should the platform wait until reading the miso_pin
.
Depending on your platform it might need a while to settle. Especially
if your platform is connected via USB. If your inputs are local (i.e. on
a RPi) this might be very short compared.
Single value, type: time string (ms)
(Instructions for entering time strings). Default: 1ms
How long should the clock pulse be? 1ms is the lower limit for most platforms and more than long enough for any chip so this should be good.
Single value, type: boolean
(true
/false
). Default: false
Set to true to get more debug output.
Single value, type: integer
. Default: 8
How many inputs should the platform read? Reading less inputs will result in faster updates.