Propeller Chip + MCP3028_fast.spin
AcquaLife
Posts: 19
Hello parallax community. I hope this is the right place for this question. I also apologize if the answer to the question is in plain sight. I have been working with the MCP3028.spin/MCP3028_fast.spin object for a few days. The thing i need help with is this: how do i tell the program which channels to activate. In the MCP3028_fast object, the start function is as follows:
PUB start(dpin, cpin, spin, mode) : okay
'' Start driver - starts a cog
'' returns false if no cog available
'' may be called again to change settings
''
'' dpin = pin connected to both DIN and DOUT on MCP3208
'' cpin = pin connected to CLK on MCP3208
'' spin = pin connected to CS on MCP3208
'' mode not used, included for compatability with older program
The MCP3028.spin (YES THE MCP3028.spin NOT _FAST.spin) takes the last parameter (mode) as the channel ie %00000001 is only channel 1 ect.. With the MCP3028_fast.spin it seems no matter what value i put in the mode; the channels are always active. In the _fast are all the channels always active?
On a side note, are there forums specific to the different object on the object exchange? A guide of sort that explains the functions? The programs are well document so it isn't difficult to understand MOST of their inner workings.
Thank you for your wisdom and insight it shall be put to good use!
PUB start(dpin, cpin, spin, mode) : okay
'' Start driver - starts a cog
'' returns false if no cog available
'' may be called again to change settings
''
'' dpin = pin connected to both DIN and DOUT on MCP3208
'' cpin = pin connected to CLK on MCP3208
'' spin = pin connected to CS on MCP3208
'' mode not used, included for compatability with older program
The MCP3028.spin (YES THE MCP3028.spin NOT _FAST.spin) takes the last parameter (mode) as the channel ie %00000001 is only channel 1 ect.. With the MCP3028_fast.spin it seems no matter what value i put in the mode; the channels are always active. In the _fast are all the channels always active?
On a side note, are there forums specific to the different object on the object exchange? A guide of sort that explains the functions? The programs are well document so it isn't difficult to understand MOST of their inner workings.
Thank you for your wisdom and insight it shall be put to good use!
Comments
You only call "Start" once. Whenever you want to take a reading you use "In" or "Average" and include which channel you want to read.