Closed fijam closed 2 years ago
also integrate/rewrite adafruit_24LC04 into hardware.py
retarget for v0.7
mostly done really
OK, so I am not very smart and the i2c address of the new mcp digipot ended up being the same as the old AD one. It wasn't meant to be so. The hw initialization will need to be reworked (again).
re-implemented based on the return value of the status register (05h) on mcp4562 (rev3) https://github.com/fijam/gmdrec/commit/b28a4c007aa06e2c198a870288bff92e981b666a
gmdrec currently supports two hardware options:
also to consider:
gooey complicates things slightly, as the python script needs to evaluate so that we can display the UI, even when nothing is connected yet. Then the user can connect either of the two revisions, or just half of the second revision (the adafruit breakout). Only the second revision carries eeprom. Third revision uses eeprom on the digipot chip (10 addresses available - just enough). As soon as the device is connected, the digipot needs to be put in shutdown to avoid #4. This is currently handled although in a bit of a convoluted manner, as it is intermingled with
settings.py
as well.MCP4562 is put in shutdown differently, writing to TCON register (04h) disconnects the wiper or the B terminal from the resistor network, but it doesn't automatically re-enable it on writing a new wiper value.
Figure out how to refactor hw initialization to make it more simple and modular.