Page 1 of 1

AtoD not working

PostPosted: Mon Jul 14, 2014 1:15 pm
by umineral
I purchased one of your Ezsbc1 boards back on 4/25/14. At that time was busy with other things but tried several programs driving the LEDs that worked. Last week I started a new project using the Ezsbc1 that needed the PWM outputs to drive a motor. Got the PWM code to work. At that time I ordered another Ezsbc1 as a spare for future use. It came super fast. Thank you! Then wanted to adjust the timing with a pot input to an A/D input (0 to 3.3volts). The indac(Inpin) didn't work. I used the D, ctrl-D trick and single stepped the code. It would always hang up on the conversion. So tried the new board and it works. The first board still works for PWM. The original board has a number on the back - 288449. A Jerry back in April 18, 2013 had the same problem. Could this one be similar? Any Suggestions? Here is some test code that doesn't work:
' Test A/D
Inpin = 10
pinmode Inpin, adc
repeat
value = inadc(Inpin)
wait 100
print value
until inkey > 0
end

Re: AtoD not working

PostPosted: Mon Jul 14, 2014 7:24 pm
by Daniel
I confirmed that your code is good and that leaves the module as the only suspect. You also have the latest firmware. I will ship another tomorrow.