Society of Robots - Robot Forum
Software => Software => Topic started by: jhaller on September 21, 2009, 04:26:46 PM
-
Holy cow. I just want to do some simple DAQ (i.e. read a analog signal off of ADC0) and it is a pain in the butt. I downloaded one of the HEX files via FBoot17.exe, I got the signal to show up on the SOR scope software, but all the ADC channels are showing the same ADC value (it's like cross talk on all 16 ADC channels even though I have only ADC0 connected to a 1Mohm potentiometer!).
Now I try to write my own code using the existing source code and functions, and I can't get anything to compile without errors. Any one have this much trouble with the source code? I am going to just have to start from scratch I guess, but that kind of defeats the purpose of purchasing the Axon in the first place! ???
-
but all the ADC channels are showing the same ADC value (it's like cross talk on all 16 ADC channels even though I have only ADC0 connected to a 1Mohm potentiometer!).
So when you turn your potentiometer, all the values change? Or is it a constant value
I love my Axons - I have 3 of them and they are awesome for prototyping new systems and for building neat little robots. Its not an easy language/system, so you should expect issues. There's a reason that not everyone is an engineer. :P
-
I got the signal to show up on the SOR scope software, but all the ADC channels are showing the same ADC value (it's like cross talk on all 16 ADC channels even though I have only ADC0 connected to a 1Mohm potentiometer!).
This is normal for all microcontrollers, including PICs. Just ignore the others, or attach a ground to shut them up ;D
If you rub your finger across the pins, you'll see them change.
The DAQ program just outputs using rprintf and ADC commands in a while loop. If you look through the source code, it'll start to make sense. It can be done with only 2 lines of code, actually:
while(1)
rprintf("your data %d", adc(0));//basically like this
-
how is the potentiometer connected? if its connected directly only to change potential then you probably wont see any change in the ADC reading. You need it connected so the voltage and not just the potential changes - a simple voltage/potential divider would be an easy solution
-
Yep thanks Admin, I did realize that the other channels had to be grounded shortly after I posted. But I expected them to display noise, a little cross talk, but not all of them follow Ch0. I guess that shows how little power is necessary to feed the different AD channels. Perhaps it's because they are so close together on the silicon that they induce the same signal on each input circuit.
Anyway thanks again.