Ok, got a problem somewhere.
I had ADC working on one 20M2 in simulator and the code for a second 20M2 worked too.
Due to merging the second 20M2's code with the first one, so I only have one picaxe instead of 2, I required more pins, so I tried to go over to a 40X2.
I read manual 2, page 29, adcsetup. It states:
It states:
It still doesn't work in PICAXE VSM but it works in the PE simulator.
Any ideas?
I tried both the PICAXE 40X2 and the PICAXE 40X2-IC parts and neither works.
Angie
I had ADC working on one 20M2 in simulator and the code for a second 20M2 worked too.
Due to merging the second 20M2's code with the first one, so I only have one picaxe instead of 2, I required more pins, so I tried to go over to a 40X2.
I read manual 2, page 29, adcsetup. It states:
Ok I say, so I read page 30, which corresponds to the 40X2.Function:
On X2 parts it is necessary to configure the ADC pins for use with the ‘readadc/
readadc10’ commands. On all other parts this configuration is automatic.
It states:
Now, I've used the mask anyway to test this outNote that with these parts the appropriate bit is always automatically set upon
any readadc / readadc10 / touch / touch16 command.
for pins A.1, A.2, A.5, and A.6adcsetup = %0000000001100110
It still doesn't work in PICAXE VSM but it works in the PE simulator.
Any ideas?
I tried both the PICAXE 40X2 and the PICAXE 40X2-IC parts and neither works.
Angie