Author Topic: Not too happy with Axon support code  (Read 2718 times)

0 Members and 1 Guest are viewing this topic.

Offline jhallerTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Not too happy with Axon support code
« 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! ???

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Not too happy with Axon support code
« Reply #1 on: September 21, 2009, 05:14:15 PM »
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
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Not too happy with Axon support code
« Reply #2 on: September 21, 2009, 06:22:41 PM »
Quote
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

paulstreats

  • Guest
Re: Not too happy with Axon support code
« Reply #3 on: September 21, 2009, 06:29:18 PM »
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

Offline jhallerTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Not too happy with Axon support code
« Reply #4 on: September 22, 2009, 04:16:00 PM »
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.


 

SMF spam blocked by CleanTalk