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
Add additional ADC chips #162
Comments
Yes this should be simple, just a matter of adjusting the channel count. This would address all the spi ADC chips (that I know of). |
And looking at https://raw.githubusercontent.com/RPi-Distro/python-gpiozero/master/docs/images/composite_device_hierarchy.png it would seem to make sense for MCP3001, MCP3002, MCP3004 & MCP3008 to inherit from MCP30xx; and MCP3201, MCP3202, MCP3204 & MCP3208 to inherit from MCP32xx? |
|
Reading up on datasheets it's definitely one channel, I just don't understand what the IN+ and IN- are. I'll add them as I have them, and they can be fixed before release if there's something else needed. |
That means that like the 3301 they operate in differential mode only (and I'd guess they don't require any input in that case); i.e. you're expected to connect both. However, if the chip's like the other 32xx and 30xx's it won't support fully signed operation; i.e. IN- will only be for background noise compensation, not for measuring a fully negative value. |
Have a look at the existing MCP3301 class and that should shed some light on things. |
Yeah, just spotted it! That makes sense. I was going to leave the |
Yeah, not much point having a parameter you can't do anything with :) |
Yeah |
Pushed - please take a look! |
I think you need to remove |
Yeah, just skimmed the data-sheets and they're both differential only. Also, because both of them require no input at all you'll need to push |
Like that? |
Yup, that's the first bit - now you need to deal with the fact they don't expect any inbound data (and will only send back two-bytes worth when the SPI CLK activates) |
A little "reminder" issue, as requested #41 (comment)
As I mentioned at #156 (comment) it'll hopefully be fairly straightforward to also add classes for the MCP3001, MCP3002, MCP3201 and MCP3202 ADC chips too.
The text was updated successfully, but these errors were encountered: