This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for Maxim's MAX31856 SPI Thermocouple amplifier IC.
IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.
- 4-wire SPI connection at up to 1MHz (P1), 5MHz (P2)
- Reads on-chip cold-junction temperature sensor
- Reads thermocouple
- Supports automatic or one-shot conversion modes
- Supports built-in cold-junction offset compensation
- Supports 50/60Hz mains power frequency noise rejection
- Supports setting temperature interrupt thresholds
- Supports setting/checking for all fault types supported by the sensor
- Supports setting thermocouple type
P1/SPIN1:
- spin-standard-library
- 1 extra core/cog for the PASM SPI engine (none if the bytecode-based engine is used)
sensor.temp.common.spinh
(provided by the spin-standard-library)
P2/SPIN2:
- p2-spin-standard-library
sensor.temp.common.spin2h
(provided by the p2-spin-standard-library)
Processor | Language | Compiler | Backend | Status |
---|---|---|---|---|
P1 | SPIN1 | FlexSpin (6.9.4) | Bytecode | OK |
P1 | SPIN1 | FlexSpin (6.9.4) | Native/PASM | OK |
P2 | SPIN2 | FlexSpin (6.9.4) | NuCode | Untested |
P2 | SPIN2 | FlexSpin (6.9.4) | Native/PASM2 | OK |
(other versions or toolchains not listed are not supported, and may or may not work)
- The chip has no known identification register, so the driver will start successfully as long as the SPI engine does