help with readadc10

jwsparkes

New Member
Can you please help me with a problem. I am running a simple program that monitors a variable voltage and then outputs the result on the AXE033. The AXE033 works in this program (unlike that program to which I have recently describe - still having issue with that)

For some reason, the readadc10 alway returns zero regardless of the voltage on the readadc pin. I have the -08M connected to a 5V supply and a seperate 15V supply as the variable voltage.

I have attached the code and the VSM model for your reference.

I have read the previous post regarding readadc on seperate rails and I don't think this is the same issue.

Please help.

regards James.
 

Attachments

Technical

Technical Support
Staff member
You have mixed up your power supplies. You have a power node marked '5V' connected to the PICAXE power pin Vdd, but have not defined '5V' via Design>Configure Power Rails menu.

To fix:
Delete the connection between the PICAXE power pin and the undefined 5V node.
Right click Place>Terminal>Power
Connect this default power node to the PICAXE power pin.

The simulation then works as expected.

Or alternately define '5V' via the menu.
 

jwsparkes

New Member
thanks tech, that solved the problem. strangely though, the alt method did not work. whenever, I add a label to the power line and configure it to be linked to Vcc, the simulator fails. I had to add a text note adjacent to the power line to remind me that it's 5V.

regards James.
 
Top