readadc with 08M

kfahrner

New Member
The readadc command works well with the PICAXE 18X as demonstrated by sample projects. I am, however, unable to get it going with the 08M. Although the program compiles properly, there is no response when running (the variables used remain at 0).

Does anybody have any idea?
 

Technical

Technical Support
Staff member
Works ok for us. Make sure you have not confused pin numbers - ie.g. input 4 is the pin marked P4, leg 3.
 

kfahrner

New Member
Thanks for the reply,
I had considered the difference between legs and pins. When I explored the Cyberpet sample (adc ob 08) I was able to modify the model in small steps to 3 independent ADCs. Only when starting a new design from scratch I was unable to get the readadc commands recognised (zero values in the corresponding b0 to b2 registers). I guess there is some systematic problem in the way I set it up, or I did not initialise some parameter properly when setting up. Now that I have seen it all working I will work it out.

Otherwise PICAXE VSM is the answer to all my prayers. The range of instruments and in particular the oscilloscope are so helpful and so easy to use. Thank you Revolution Education for making all this available at a very reasonable price.

Kind regards Klaus
 

kfahrner

New Member
Miracle solved

The three ADCs of the 08M in my design finally work as expected. The source of the problem was that I expected the VCC power rail of the 08M and the externally created +5V for the supply of the ADC source voltages were automatically connected - but they were not. After using VCC as source for the ADC inputs it all worked.
 

Labcenter

New Member
The 'correct' way to address the issue of multiple power nets on a rail is via the Power Rail Configuration Dialogue.

Personally, however, I find it as easy to simply wire them on the schematic as in the attached.
 

Attachments

kfahrner

New Member
Thanks, this was helpful. Found it in the tutorials now too.
I have been copying portions of the sample projects as basis for my own designs and probably picked up some peculiar and invisible problems this way.
Sorry for the delay - got sidetracked with other issuses.

Kind regards Klaus
 
Top