ADC Pins on Port0 not returning expected data

Hi,

My wixel’s A to D converter is not operating as expected. When I connect 3.3 volts from the wixel’s output pin ( the pin next to the reset pin ) to any one of the ADC pins (P0_0 through P0_5), it has no impact on the adcRead() values returned . In the same way, when I connect a jumper wire from ground to any one of those same ADC pins, the values do not change to zero ( or close to zero) as expected when I read the pin with adcRead().

I will paste my program below. It is based on the wireless_serial app provided on the Pololu site. I highlighted the code most directly involved in the ADC pins.

I see nothing on the forums about my problem (not a good sign). Is there something I am not configuring correctly before I use the ADC port pins? I read the adc.h file and tried to research every forum and all the application programs to no avail. In truth, the example code for using the ADC pins is very simple, so I feel humbled for asking for help.

The problem in a nut shell, The ADC port pins return static values when I call adcRead() and they do not change as I apply 3.3 volts or Zero volts. The most applicable code is below in the executeCommand() function.

Anyone willing to give me a push in the right direction? Thanks up front!

[size=150]
I found the problem. I was right above when I said I would be humbled for asking for help. I am using two wixels to talk to each other, one is the master and the other is a slave configuration. I was having the master ask the slave to send it’s adc pin values to the master to display. I had the master placed in a breadboard and I was connecting it’s adc pins alternately to 3.3 volts and ground to test the adc capabilities. I finally realized if I was going to get results from the adc on the slave, I better jumper pins on the slave - not the master! My apologies to all!
[/size]

Hello. Please format your code using code tags to make it readable.

What number are you typically getting from adcRead?

Also, could you try using the test_adc app provided in the SDK without modifying it and see if you get different results?

–David

Thanks David for the suggestions. Give me an idea of the code tags you mentioned and I can add them too. I’ll try running test_adc asap and post my results so.

Hello, lucutis.

I am glad you were able to solve your problem. I thought you might be mixing up/confusing your two Wixels but didn’t say anything because there were plenty of other errors you could make that seemed more likely!

The code tags can be generated while writing a forum post if you select your code and then press the “Code” button.

–David