40x1 readadc bug?

benastro

New Member
This is the program I used;

main:
readadc 0,b0
readadc 1,b1
readadc 2,b2
readadc 3,b3
readadc 4,b4
readadc 5,b5
readadc 6,b6
readadc 7,b7

debug b0
debug b1
debug b2
debug b3
debug b4
debug b5
debug b6
debug b7
debug b8
debug b9

pause 500
goto main

When I put a voltage on each adc input, the voltage shows up in each byte as I expect.
What I did not expect is that when I put a voltage on adc 0, I get the reading in b0 AND in b8. The value is the same in both bytes.

Is it something I am doing wrong, or is this a bug?

Thanks for looking into it.

Ben.
 

tarzan

Senior Member
Only one debug necessary.

<BLOCKQUOTE><font size=1 face=arial>quote:<hr height=1 noshade>DEBUG {var}
- Var is an optional variable value (e.g. b1). It&#8217;s value is not of importance and
is included purely for compatibility with older programs. <hr height=1 noshade></BLOCKQUOTE></font><font face='Verdana, Arial, Helvetica' size=2>

Legs 2~5 &amp; 8~10 no pin4 only 7 total.

<code><pre><font size=2 face='Courier'>READADC
Qty Resolution Type Pin Numbers
PICAXE-40X 7 10 bit separate 0,1,2,3,5,6,7 </font></pre></code>

<code><pre><font size=2 face='Courier'>main:

readadc 0,b0
readadc 1,b1
readadc 2,b2
readadc 3,b3

readadc 5,b5
readadc 6,b6
readadc 7,b7
debug
pause 500

goto main </font></pre></code>

Edited by - tarzan on 31/05/2007 01:25:56
 
Top