Set I2C default speed to 100kHz. In some chips, the default speed is 500kHz and can cause trouble with some slave devices or noisy buses. You can adjust it with
Added clock frequency parameter in SMBus class.
revision()to get the mayor and minor hardware and firmware revision.
Fixed test about Interrupt On Change.
Moved GUI to a separate application on its own repository.
Fixed bug. When GP1, 2 and 3 are all in ADC mode and ADC reference is VDD. If just after reset VRM reference is selected, ADC stops working.
- Interrupt on Change:
Removed deprecated functions I2C_is_idle and I2C_cancel.
Solved bug USB remote Wake-up is not saved with
Device information now returns GPIO designation and default status.
Document as limitation a weird MCP2221’s bug related to interrupt flag and ADC reference.
New SMBus compatible class. Useful to use other Python I2C modules with MCP2221 interface.
Fixed. I2C slave class exception when device is not present.
Fixed bug: when ADC reference is VDD and DAC reference is VRM and a new GPIO configuration is applied, DAC stops working. It seems to be related with a known MCP limitation.
Fixed bug: Restore DAC reference value after reset.
In some cases MCP2221A’s firmware does not restore DAC or ADC pin assignment when it boots. Software workaround.
Fixed. Low SCL and low SDA exceptions were swapped.
When the I2C bus detects SDA activity, the next transfer does not work fine. Prevented via software. See
Added test suite.
Added IOC edge detection setting in device representation.
Fixed. Bug when reset a device with customized VID/PID.
Multiple tries to find the device after a
- Improved USB stability:
Added timeout in HID read.
Added retries in send_cmd.
Better USB trace_commands output format.
Removed sleep parameter in
- GPIO / ADC and DAC:
- More reliable I2C functions:
I2C_read()to take into account internal I2C engine status.
I2C_write()to prevent infinite loop, quicker write and ACK checking.
Timeout and early failure check in read and write to prevent infinite loop.
Custom exceptions for better error handling (see Exceptions in Full API reference)
Automatically try to recover from an I2C error in past operation.
- New features:
Function to save current state:
Added speed parameter in I2C Slave class.
Removed self argument from autodoc methods.
Added pictures and schematics.
Added MCP2221 pinout guide.
Added advanced ADC/DAC examples section.
Released 1.5.1 again by mistake.
Add I2C Slave helper class.
First EasyMCP2221 version.
This project was initially a fork of PyMCP2221A library by Yuta KItagami (https://github.com/nonNoise/PyMCP2221A).
I made a few changes, then a few more, until I ended up rewriting almost all the code. Since the API is no longer compatible with PyMCP2221A, I decided to create a new package.
Tags v1.4 and earlier are from PyMCP2221A.