roadlabs / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Driver for Custard PI - MCP 4822 and 3202 drivers #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Which driver should be used for MCP4822
2.Which driver should be used for MCP3202
3.
...

WebIOPi version used?
=>0.7

Python version used?
=>3.2.3

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=>Raspbian

Raspberry Pi board revision? (1 or 2)
=>

For Javascript side bugs, Browser?
=>

Please provide any additional information below.

Original issue reported on code.google.com by j...@csm-instruments.com on 10 Nov 2014 at 9:17

GoogleCodeExporter commented 9 years ago
Hi,

MCP4822 is officially supported by WebIOPi 0.7.0., its just not documented in 
the wiki. For details look at mcp48XX.py source. For simple standard use, 
config would just look like this:

mymcp = MCP4822

MCP3202 is currently NOT supported. However, parts of that family are supported 
(e.g. MCP3204, MCP3208). With some knowledge and luck, you may be able to add 
MCP3202 as it looks to be a 2 channel version of MCP3204. Look at mcp3x0x.py, 
maybe it is sufficient to add a subclass to MCP320X and add a specific 
__command__(...) to reflect the changed control bits position. For explanations 
on work/updates for WebIOPi drivers you can look at my drivers manual. However, 
some Python skill as well as understanding chip/SPI protocol specs is required.

Andreas

Original comment by andreas....@googlemail.com on 10 Nov 2014 at 1:44