SPI bus transactions

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

SPI bus transactions

Post by pythoncoder » Sun Jun 14, 2015 7:35 am

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
Peter Hinch
Index to my micropython libraries.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: SPI bus transactions

Post by Damien » Sun Jun 14, 2015 11:48 am

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.

Post Reply