adafruit / Adafruit_CircuitPython_MCP4728

Helper library for the MCP4728 I2C 12-bit Quad DAC
MIT License
3 stars 8 forks source link

Allow for synchrous DAC output #16

Open caternuson opened 1 year ago

caternuson commented 1 year ago

Re this thread: https://forums.adafruit.com/viewtopic.php?t=198312

Currently each channel is updated when it is set:

mcp4728.channel_a.value = 100
mcp4728.channel_b.value = 75
mcp4728.channel_c.value = 50
mcp4728.channel_d.value = 25

via this line: https://github.com/adafruit/Adafruit_CircuitPython_MCP4728/blob/d907e3e0baa15cd50cc647d80261dac77aeb68fe/adafruit_mcp4728.py#L347

Add capability and example to allow multiple channel values to be updated synchronously.

Maybe something similar to auto_write in NeoPixel/Dotstar usage?

tannewt commented 1 year ago

This might be something we want to add to CircuitPython APIs and standardize for drivers.