-
Really simple python scripts to test MCP2221A
-
Tested with
Python 3.9.5
-
Starting point of this code was taken from twitchyliquid64 - mcp2221a_set_strings.py
-
✓ Setting USB descriptor strings
-
✓ Controlling GP as outputs/inputs (for now only one option is possible for all pins)
-
✓ Setting default GP configuration (the one active after power-up)
-
❏ DAC
-
❏ ADC
-
❏ I2C
-
pyusb
:python -m pip install pyusb
-
libusb
:-
Arch Linux:
sudo pacman -S libusb
-
-
On Linux you need to add MCP2221A to udev rules:
-
Copy 99-MCP2221A.rules:
sudo cp 99-MCP2221A.rules /etc/udev/rules.d/
-
Log out then back in
-
-
Print some MCP2221A parameters
-
Set USB Manufacturer, Product and Serial Descriptor Strings (they are used during the USB enumeration)
-
Run:
python3 setDescriptorStrings.py
-
Set default GPIO configuration (configuration which is active after power-up)
-
Run:
python3 setFlashGpioSettings.py
-
Main library