Max31865.Registers.ConfigRegister (max31865 v0.1.0)
Allows the reading and writing of the Max31865 Config Register.
register-layout
Register Layout
The config register for the MAX31865 consists of 8 bits, from left to right:
| Vbias | AutoMode | OneShotMode | ThreeWireMode | FaultCycle1 | FaultCycle2 | Fault Clear | Filter Select |
|---|
| Name | R/W | Behaviour |
|---|---|---|
| Vbias | R/W | Enables/Disables Vbias. Vbias introduces self heating so it should be disabled when not actively performing conversions. |
| AutoMode | R/W | When enabled, conversions will be performed constantly even if they are not being read. Vbias must be enabled if auto mode is enabled. |
| OneShotMode | R/W | When enabled a single conversion is performed, after which the bit is automatically cleared. |
| ThreeWireMode | R/W | When enabled, three wire mode is used. Otherwise, 2/4 wire mode is used. |
| FaultCycle1 | R | Used to determine fault cycle status. See below for further detail. |
| FaultCycle2 | R | Used to determine fault cycle status. See below for further detail. |
| FaultClear | R/W | When enabled, any faults will be cleared, after which the bit is automatically cleared. |
| FilterSelect | R/W | Used to filter out mains noise. When enabled, 50hz mode is used. Otherwise, 60hz mode is used. |
fault-cycle-status-bits
Fault Cycle Status Bits
The Fault Cycle bits can be written to in order to trigger a fault detection with either an automatic or manual delay. In the case of a manual delay, fault detection continues until the user requests that it ends.
The Fault Cycle bits can be read to determine the status of the Fault Cycle. Note that these bits do not report faults. For that, see the FaultRegister.
writing-to-fault-cycle-bits
Writing to Fault Cycle Bits
| Bit 1 | Bit 2 | Meaning |
|---|---|---|
| 0 | 0 | N/A |
| 1 | 0 | Begin Fault detection with Automatic completion |
| 0 | 1 | Begin Fault detection with Manual completion |
| 1 | 1 | End Fault detection with Manual completion |
reading-from-fault-cycle-bits
Reading from Fault Cycle Bits
| Bit 1 | Bit 2 | Meaning |
|---|---|---|
| 0 | 0 | Fault detection finished |
| 1 | 0 | Automatic fault detection still running |
| 0 | 1 | Manual cycle 1 still running; waiting for user to write 11 |
| 1 | 1 | Manual cycle 2 still running |
Link to this section Summary
Functions
Accepts a Max31865 SPI reference and reads the Config Register, then returns a ConfigRegister struct representing it's contents.
Accepts a ConfigRegister struct and a Max31865 SPI reference and writes it to the ConfigRegister.
Link to this section Functions
read(max_ref)
Accepts a Max31865 SPI reference and reads the Config Register, then returns a ConfigRegister struct representing it's contents.
write(config, max_ref)
Accepts a ConfigRegister struct and a Max31865 SPI reference and writes it to the ConfigRegister.