ADC Driver version 2.0
Bobb Fwed
Posts: 1,119
I have just released version 2.0 of my Microchip ADC driver. There are a few minor updates, but a major update is the added support for 2 and 1 channel ADCs. So now supported is 8, 4, 2, and 1 channel ADCs in both 10- and 12-bit spec (I believe that is the whole MCP3X0X line up). Some things were changed to allow one object to use multiple supported ADCs in any combination; this was done by moving some of the constants into parameters (probably the way it should have been from the beginning).
Download the new version here: obex.parallax.com/objects/488/
Please post any comments, questions, or future addition requests here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't make strings the bane of the Propeller, bend them to your will!
Download the new version here: obex.parallax.com/objects/488/
Please post any comments, questions, or future addition requests here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't make strings the bane of the Propeller, bend them to your will!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
The only changes I had was to the pin numbers:
Vclk_p = 13
Vn_p = 14
Vo_p = 14
Vcs_p = 27
the : CLKMODE
_CLKMODE = XTAL1 + PLL16X
and the start:
ADC.start(Vo_p, Vn_p, Vclk_p, Vcs_p, 2, 2, 12, 1)
I also changed the channels in the example so that is was reading channel 1. I all works and comes back with correct reading with PLL4X but a change to PLL16X returns zeros for all the readings. Seeing that you have tested it to 100MHz then my guess is it's something noise related in my circuits. The MCP3202 is not on the board with the Prop so there is about 18" of wire between them. I'm also sharing the data in and out on one pin.
Because my needs for this were rather simple, and didn't need to be fast, I put together an all Spin version that works fine. Not nearly as featured or flexible as yours, but it's working for what I needed. Thanks for getting back to me.
If that doesn't work, sorry I couldn't help. It could very well be the distance causing problems. When I did my testing the ICs were never further than 4 or 5 cm.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Thanks for the help but adding the NOP didn't help. I haven't put a scope on it but there is a lot going on between the Prop and the ADC, so noise is likely a big issue. I'm sure I will be using the object for other things in the future and I'll keep that in mind when I do.