Page 1 of 1

SPI bus transactions

Posted: Sun Jun 14, 2015 7:35 am
by pythoncoder
The Arduino implementation of SPI supports transactions, facilitating the connection of multiple devices with different SPI characteristics. Is it worth considering this for the Pyboard? The first reference has a good explanation of it (step 3).
http://www.dorkbotpdx.org/blog/paul/bet ... in_3_steps
http://www.arduino.cc/en/Tutorial/SPITransaction

Re: SPI bus transactions

Posted: Sun Jun 14, 2015 11:48 am
by Damien
As far as I can tell from reading the Arduino docs it seems that beginTransaction is just a shorthand for setting the clock divider, the clock phase and polarity, and the bit order (so saves you calling 3 separate functions). In uPy you can do this using spi.init.