ADC 12 Bit 3202-B ADC
Hello,
I downloaded the 12 bit ADC object and tried the code. I don't have a joystick, but I used a 10k pot on channel 0 with 3.3 v and ground. (wiper to channel 0). I commented out the average line and I only get the number 24 as a result. I looked at the datasheet and tried to understand the configuration of %0011 in the MCP3202.start function. Can someone explain how to get a single channel (0) running for now? Can I use a pot to test the object?
Thanks,
Curtis
I downloaded the 12 bit ADC object and tried the code. I don't have a joystick, but I used a 10k pot on channel 0 with 3.3 v and ground. (wiper to channel 0). I commented out the average line and I only get the number 24 as a result. I looked at the datasheet and tried to understand the configuration of %0011 in the MCP3202.start function. Can someone explain how to get a single channel (0) running for now? Can I use a pot to test the object?
Thanks,
Curtis
Comments
there seems to be a slight difference in the serial communication
see attached pictures
dataheets:
MCP3202
MCP3208
best regards
Stefan
Thanks for the help.
I found the problem, the pins had to be P0, P1, and P2. I guess they are SPI pins only. Now I will see if I can change the %0011 to where I can use only channel 0.
Thanks,
Curtis
ALL Propeller-IO-pins are general-purpose IO-PINS
The Pins 30,31 and wich are used for download programs and Pins 28,29 wich are connected to the EEPROM
are a little bit different but just because some pull-up-resistor are connected to the IO-pins.
If you take a naked propeller-chip all 32-IO-pins work the exact same way
So maybe something inside the code was not matching. From a hardware-sight all IO-pins are the same
best regards
Stefan
http://forums.parallax.com/forums/default.aspx?f=25&m=387025
John Abshier
I'll try it and let you know.
Curtis
Your modifications to the object allowed the use of pins other than 0,1,and 2. I still cannot get it to work on two channels. It works for either channel but gives me an (11) for one channel for a 2 channel configuration.
Great work,
Curtis
in Propeller Object exchange. Search 3202.
It goes over the communications a bit at a time and might
help you understand what is going on.
Reading two channels should be no harder than reading one
channel. Try reading them one at a time first back and
forth and get that going first.
Harprit
I will look at it. The original object that I downloaded worked great on both channels, but it had to use pins 0,1, and 2. The object·I got from·John Abshier worked on any pin, but I could not get it to work with both channels. The 3202 is a great IC and would like to use it in my projects with one or two channels.
Thanks,
Curtis
John Abshier
It works, but can I change the PLL4X ?
Curtis
John Abshier
John Abshier
I'll try it this afternoon and I will let you know.
Curtis
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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!