Arduino library for the AMC6821 fan controller

Summary

Members Descriptions
class Tecsmith_AMC6821 Class that stores state and functions for interacting with the AMC6821 fan controller.

class Tecsmith_AMC6821

Class that stores state and functions for interacting with the AMC6821 fan controller.

Summary

Members Descriptions
public Tecsmith_AMC6821() Construct a new Tecsmith_AMC6821::Tecsmith_AMC6821 object.
public ~Tecsmith_AMC6821() Destroy the Tecsmith_AMC6821::Tecsmith_AMC6821 object.
public uint8_t read(uint8_t addr) Reads one byte.
public uint16_t read2(uint8_t addrL,uint8_t addrH) Reads two bytes.
public bool write(uint8_t addr,uint8_t data,uint8_t mask) Writes one byte, preserving prior bits in optional mask.
public bool write2(uint8_t addrL,uint8_t addrH,uint16_t data) // TODO
public bool writeBit(uint8_t addr,uint8_t mask,bool on) Writes bit on or off based on a mask.
public bool begin(uint8_t i2c_addr,TwoWire * wire,amc6821_conf1_fdrc_t mode) Sets up the hardware and initializes I2C.
public bool begin(TwoWire * wire,amc6821_conf1_fdrc_t mode)  
public bool begin(amc6821_conf1_fdrc_t mode)  
public bool reset() Sends a reset command to the chip. Similar to setReset, but adds a 100 mil delay.
public bool start() Sends a start command to the chip.
public bool stop() Sends a stop command to the chip.
public uint8_t getDeviceID() Get Device ID, should be 0x21.
public uint8_t getCompanyID() Get Company ID, should be 0x49.
public uint8_t getPartRevision() Get the chip revision number.
public uint8_t getConfig(byte no) Retrive the Configuration Register byte.
public bool getStartMonitor() Get the START bit.
public bool getGlobalIntEnable() Get the INT-EN bit.
public bool getRPMIntEnable() Get the FANIE bit.
public bool getPWMInvert() Get the PWMINV bit.
public bool getFanFaultPinEnable() Get the FAN-Fault-EN bit.
public amc6821_conf1_fdrc_t getFanControlMode() Get the Fan Control Mode enum (FDRC1 & FDRC0 bits)
public bool getThermIntEnable() Get the THERMOVIE bit.
public bool getPWMOutEnable() Get the PWM-EN bit.
public bool getTachMode() Get the TACH-MODE bit.
public bool getTachEnable() Get the TACH-EN bit.
public bool getRemoteFailureIntEnable() Get the RTFIE bit.
public bool getLTIntEnable() Get the LTOIE bit.
public bool getRTIntEnable() Get the RTOIE bit.
public bool getLPSVIntEnable() Get the PSVIE bit.
public bool getTermFanEnable() Get the THERM-FAN-EN bit.
public bool getOVREnable() Get the OVREN bit.
public bool getTachReadingFast() Get the TACH-FAST bit.
public bool getPulseNumber() Get the PSPR bit.
public bool setStartMonitor(bool on) Set the START bit, calls start or stop
public bool setGlobalIntEnable(bool on) Set the INT-EN bit.
public bool setRPMIntEnable(bool on) Set the FANIE bit.
public bool setPWMInvert(bool on) Set the PWMINV bit.
public bool setFanFaultPinEnable(bool on) Set the FAN-Fault-EN bit.
public bool setFanControlMode(amc6821_conf1_fdrc_t mode) Set the fan control mode (FDRC0 & FDRC1), stoping monitoring if already started.
public bool setThermIntEnable(bool on) Set the THERMOVIE bit.
public bool setPWMOutEnable(bool on) Set the PWM-EN bit.
public bool setTachMode(bool on) Set the TACH-MODE bit.
public bool setTachEnable(bool on) Set the TACH-EN bit.
public bool setRemoteFailureIntEnable(bool on) Set the RTFIE bit.
public bool setLTIntEnable(bool on) Set the LTOIE bit.
public bool setRTIntEnable(bool on) Set the RTOIE bit.
public bool setLPSVIntEnable(bool on) Set the PSVIE bit.
public bool setReset(bool on) Set the RST bit, can only set to true.
public bool setThermFanEnable(bool on) Set the THERM-FAN-EN bit.
public bool setOVREnable(bool on) Set the OVREN bit.
public bool setTachReadingFast(bool on) Set the TACH-FAST bit.
public bool setPulseNumber(bool on) Set the PSPR bit.
public uint8_t getStatus(byte no) Retrive the Status Register byte.
public bool getFanFast() Get the RPM-ALARM bit.
public bool getFanSlow() Get the FANS bit.
public bool getRTHigh() Get the RTH bit.
public bool getRTLow() Get the RTL bit.
public bool getRTOverTherm() Get the R-THERM bit.
public bool getRTFailure() Get the RTF bit.
public bool getLTHigh() Get the LTH bit.
public bool getLTLow() Get the LTL bit.
public bool getRTOverCritical() Get the RTC (Remote Over Critical) bit.
public bool getLTOverCritical() Get the LTC (Local Over Critical) bit.
public bool getLTBelowTherm() Get the LPSV (Local Temp Below Therm) bit.
public bool getLTOverTherm() Get the L-THERM (Local Temp Over Therm) bit.
public bool getThermInput() Get the THERM-IN (Therm Input) bit.
public int8_t getLocalTemp() Get the local (on chip) temperature in degrees celsius.
public int8_t getRemoteTemp() Get the remote temperature in degrees celsius.
public int32_t getLocalMilliTemp() Get the local (on chip) temperature in milli-degrees celsius (divide by 1000 to get float value, in 0.125°C increments)
public int32_t getRemoteMilliTemp() Get the remote temperature in milli-degrees celsius (divide by 1000 to get float value, in 0.125°C increments)
public int8_t getLocalHighTempLimit() // TODO doc
public int8_t getLocalLowTempLimit() // TODO doc
public int8_t getLocalThermLimit() // TODO doc
public int8_t getRemoteHighTempLimit() // TODO doc
public int8_t getRemoteLowTempLimit() // TODO doc
public int8_t getRemoteThermLimit() // TODO doc
public int8_t getLocalCriticalTemp() // TODO doc
public int8_t getPassiveCoolingTemp() // TODO doc
public int8_t getRemoteCriticalTemp() // TODO doc
public uint8_t getFanCharacteristics() // TODO doc
public uint8_t getDutyCycleLowTemp() // TODO doc
public uint8_t getDutyCycle() Get the DCY (duty cycle), where 0x00 = 0% and 0xFF = 100%.
public int8_t getDutyCycleP() Get the DCY (duty cycle) in Percentage, where 0 = 0% and 100 = 100%.
public uint8_t getDutyCycleRamp() // TODO doc
public uint8_t getLocalTempFanControl() // TODO doc
public uint8_t getRemoteTempFanControl() // TODO doc
public bool setDutyCycle(uint8_t value) Set the DCY (duty cycle), where 0x00 = 0% and 0xFF = 100%.
public bool setDutyCycleP(int8_t percentage)  
public uint16_t getTachData() // TODO doc
public uint16_t getTachLowLimit() // TODO doc
public uint16_t getTachHighLimit() // TODO doc
public uint16_t getTachSetting() // TODO doc
public uint16_t getTachDataRPM() // TODO doc
public uint16_t getTachLowLimitRPM() // TODO doc
public uint16_t getTachHighLimitRPM() // TODO doc
public uint16_t getTachSettingRPM() // TODO doc

Members

public Tecsmith_AMC6821()

Construct a new Tecsmith_AMC6821::Tecsmith_AMC6821 object.

public ~Tecsmith_AMC6821()

Destroy the Tecsmith_AMC6821::Tecsmith_AMC6821 object.

public uint8_t read(uint8_t addr)

Reads one byte.

public uint16_t read2(uint8_t addrL,uint8_t addrH)

Reads two bytes.

Note: The low byte should be read first. This method causes the high byte to be frozen until both the high and low byte registers have been read from, preventing erroneous TACH readings.

public bool write(uint8_t addr,uint8_t data,uint8_t mask)

Writes one byte, preserving prior bits in optional mask.

public bool write2(uint8_t addrL,uint8_t addrH,uint16_t data)

// TODO

public bool writeBit(uint8_t addr,uint8_t mask,bool on)

Writes bit on or off based on a mask.

public bool begin(uint8_t i2c_addr,TwoWire * wire,amc6821_conf1_fdrc_t mode)

Sets up the hardware and initializes I2C.

Parameters

Returns

True if initialization was successful, otherwise false.

public bool begin(TwoWire * wire,amc6821_conf1_fdrc_t mode)

public bool begin(amc6821_conf1_fdrc_t mode)

public bool reset()

Sends a reset command to the chip. Similar to setReset, but adds a 100 mil delay.

public bool start()

Sends a start command to the chip.

public bool stop()

Sends a stop command to the chip.

public uint8_t getDeviceID()

Get Device ID, should be 0x21.

public uint8_t getCompanyID()

Get Company ID, should be 0x49.

public uint8_t getPartRevision()

Get the chip revision number.

public uint8_t getConfig(byte no)

Retrive the Configuration Register byte.

Parameters

public bool getStartMonitor()

Get the START bit.

public bool getGlobalIntEnable()

Get the INT-EN bit.

public bool getRPMIntEnable()

Get the FANIE bit.

public bool getPWMInvert()

Get the PWMINV bit.

public bool getFanFaultPinEnable()

Get the FAN-Fault-EN bit.

public amc6821_conf1_fdrc_t getFanControlMode()

Get the Fan Control Mode enum (FDRC1 & FDRC0 bits)

public bool getThermIntEnable()

Get the THERMOVIE bit.

public bool getPWMOutEnable()

Get the PWM-EN bit.

public bool getTachMode()

Get the TACH-MODE bit.

public bool getTachEnable()

Get the TACH-EN bit.

public bool getRemoteFailureIntEnable()

Get the RTFIE bit.

public bool getLTIntEnable()

Get the LTOIE bit.

public bool getRTIntEnable()

Get the RTOIE bit.

public bool getLPSVIntEnable()

Get the PSVIE bit.

public bool getTermFanEnable()

Get the THERM-FAN-EN bit.

public bool getOVREnable()

Get the OVREN bit.

public bool getTachReadingFast()

Get the TACH-FAST bit.

public bool getPulseNumber()

Get the PSPR bit.

public bool setStartMonitor(bool on)

Set the START bit, calls start or stop

public bool setGlobalIntEnable(bool on)

Set the INT-EN bit.

public bool setRPMIntEnable(bool on)

Set the FANIE bit.

public bool setPWMInvert(bool on)

Set the PWMINV bit.

public bool setFanFaultPinEnable(bool on)

Set the FAN-Fault-EN bit.

public bool setFanControlMode(amc6821_conf1_fdrc_t mode)

Set the fan control mode (FDRC0 & FDRC1), stoping monitoring if already started.

public bool setThermIntEnable(bool on)

Set the THERMOVIE bit.

public bool setPWMOutEnable(bool on)

Set the PWM-EN bit.

public bool setTachMode(bool on)

Set the TACH-MODE bit.

public bool setTachEnable(bool on)

Set the TACH-EN bit.

public bool setRemoteFailureIntEnable(bool on)

Set the RTFIE bit.

public bool setLTIntEnable(bool on)

Set the LTOIE bit.

public bool setRTIntEnable(bool on)

Set the RTOIE bit.

public bool setLPSVIntEnable(bool on)

Set the PSVIE bit.

public bool setReset(bool on)

Set the RST bit, can only set to true.

public bool setThermFanEnable(bool on)

Set the THERM-FAN-EN bit.

public bool setOVREnable(bool on)

Set the OVREN bit.

public bool setTachReadingFast(bool on)

Set the TACH-FAST bit.

public bool setPulseNumber(bool on)

Set the PSPR bit.

public uint8_t getStatus(byte no)

Retrive the Status Register byte.

Parameters

public bool getFanFast()

Get the RPM-ALARM bit.

public bool getFanSlow()

Get the FANS bit.

public bool getRTHigh()

Get the RTH bit.

public bool getRTLow()

Get the RTL bit.

public bool getRTOverTherm()

Get the R-THERM bit.

public bool getRTFailure()

Get the RTF bit.

public bool getLTHigh()

Get the LTH bit.

public bool getLTLow()

Get the LTL bit.

public bool getRTOverCritical()

Get the RTC (Remote Over Critical) bit.

public bool getLTOverCritical()

Get the LTC (Local Over Critical) bit.

public bool getLTBelowTherm()

Get the LPSV (Local Temp Below Therm) bit.

public bool getLTOverTherm()

Get the L-THERM (Local Temp Over Therm) bit.

public bool getThermInput()

Get the THERM-IN (Therm Input) bit.

public int8_t getLocalTemp()

Get the local (on chip) temperature in degrees celsius.

public int8_t getRemoteTemp()

Get the remote temperature in degrees celsius.

public int32_t getLocalMilliTemp()

Get the local (on chip) temperature in milli-degrees celsius (divide by 1000 to get float value, in 0.125°C increments)

public int32_t getRemoteMilliTemp()

Get the remote temperature in milli-degrees celsius (divide by 1000 to get float value, in 0.125°C increments)

public int8_t getLocalHighTempLimit()

// TODO doc

public int8_t getLocalLowTempLimit()

// TODO doc

public int8_t getLocalThermLimit()

// TODO doc

public int8_t getRemoteHighTempLimit()

// TODO doc

public int8_t getRemoteLowTempLimit()

// TODO doc

public int8_t getRemoteThermLimit()

// TODO doc

public int8_t getLocalCriticalTemp()

// TODO doc

public int8_t getPassiveCoolingTemp()

// TODO doc

public int8_t getRemoteCriticalTemp()

// TODO doc

public uint8_t getFanCharacteristics()

// TODO doc

public uint8_t getDutyCycleLowTemp()

// TODO doc

public uint8_t getDutyCycle()

Get the DCY (duty cycle), where 0x00 = 0% and 0xFF = 100%.

public int8_t getDutyCycleP()

Get the DCY (duty cycle) in Percentage, where 0 = 0% and 100 = 100%.

public uint8_t getDutyCycleRamp()

// TODO doc

public uint8_t getLocalTempFanControl()

// TODO doc

public uint8_t getRemoteTempFanControl()

// TODO doc

public bool setDutyCycle(uint8_t value)

Set the DCY (duty cycle), where 0x00 = 0% and 0xFF = 100%.

public bool setDutyCycleP(int8_t percentage)

public uint16_t getTachData()

// TODO doc

public uint16_t getTachLowLimit()

// TODO doc

public uint16_t getTachHighLimit()

// TODO doc

public uint16_t getTachSetting()

// TODO doc

public uint16_t getTachDataRPM()

// TODO doc

public uint16_t getTachLowLimitRPM()

// TODO doc

public uint16_t getTachHighLimitRPM()

// TODO doc

public uint16_t getTachSettingRPM()

// TODO doc

Generated by Moxygen