SPI/SPI2 Commands
The SPI (Serial Peripheral Interface) commands provide access to the PicoMite's SPI hardware for communication with external devices. The PicoMite supports two SPI channels (SPI and SPI2) with identical functionality.
SPI Commands
SPI OPEN speed, mode, bits
Communications via the first SPI channel. See Appendix D for the details.
SPI READ nbr, array()
array must be a single dimension float or integer array and nbr elements will be received.
SPI WRITE nbr, data1, data2, data3, … etc
data1, data2, ... can be float or integer and in the case of WRITE can be a constant or expression.
SPI WRITE nbr, string$
If string$ is used nbr characters will be sent.
SPI WRITE nbr, array()
array must be a single dimension float or integer array and nbr elements will be sent.
SPI CLOSE
Close the first SPI connection
SPI2 Commands
SPI2 commands work identically to SPI commands but operate on the second SPI channel. Simply replace "SPI" with "SPI2" in any command (e.g., SPI2 OPEN instead of SPI OPEN).