Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCP9601 Compatibility #10

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

MCP9601 Compatibility #10

wants to merge 7 commits into from

Conversation

rchavira
Copy link

Added compatibility to access shorted and open detection from the status register.

Two new accessors are as follows
is_shorted() = returns bit 6 from status register
is_disconnected() = returns bit 5 from status register

because bit 5 is shared between MCP9600 and MCP9601 it also indicates if the voltage is outside of range for the MCP9600.
Therefore a new accessor was added to make it compatible for MCP9600
is_in_range() = returns bit 5 from status register.

The CHIP_ID remains the same, but the CHIP_ID2 was added in the check to make sure that the chip_id returned from the CHIP_ID register is either 0x40 or 0x41

Updated the version from 0.0.4 to 0.0.5.

Tested on a raspi with breakout board on Feb 28, 2022

Modified to read status register to detect if the TC is shorted or disconnected.  Made backwards compatible for MCP9600.
Added wheel file
Added chip id for 9601 and updated version to 0.0.5
@Gadgetoid
Copy link
Member

Thanks- you'll need to add the .idea directory to .gitignore and drop the binary .whl file, see: https://github.com/pimoroni/mcp9600-python/pull/10/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants