adafruit / Adafruit-MAX31855-library

Library for the Adafruit Thermocouple breakout with MAX31855K
http://www.adafruit.com/products/269
Other
99 stars 94 forks source link

SPI transaction not working on M0 #33

Closed caternuson closed 4 years ago

caternuson commented 4 years ago

Re these threads: https://forums.adafruit.com/viewtopic.php?f=57&t=160689 https://forums.adafruit.com/viewtopic.php?f=57&t=137134

Recreated.

Appears to be related to toggling of the clock line from SPI.beginTransaction() which causes the MAX31855 to start clocking out data. Shows up in data as an off-by-one. Feather M0: image

Not present on an UNO: image

ladyada commented 4 years ago

we could move this library to use BusIO - will solve any side-effects?

caternuson commented 4 years ago

Moving SPI.beginTransaction() before the CS assert seems to work as well. But might as well move to BusIO? watcha think?

caternuson commented 4 years ago

nvm. wasn't too hard to swap to busio, totes the way to go. pr'd.

ladyada commented 4 years ago

i think lets just move it - will fix various issues and make code a lot more future proof! also good practice for ya :)