ADC10 values in editor simulation

lauriet

Member
Hi; I am simulating an 18M2 in editor 6.0.8.0.

I have the program line: readadc10 C.0, w8

C.0 is set high and the word value of C.0 is set in simulation to 32000, but in the code explorer w8 always sets to 256 at that line.
What (apart from good looks and immense wealth) am I missing?

Thanks for your advice.
 

Technical

Technical Support
Staff member
The range available for readadc10 is 0-1023, so 32000 is way out of range and will cause overflow.
Keep the simulation value less than 1024.
 
Top