Page 1 of 1

Strange ADC behaviour

Posted: Thu May 11, 2017 6:13 pm
by MarkW
Hello

Using a 16F690 @ 1Mhz....simple read ADC0 port and display
on LCD (2.5V +Vref)....flowcode 6

All settings / osccon correct

But when i do a simulation or real test....when turning the pot
at some point i get figures that go over max ADC value of 1023
even in the simulation (4000 / 5000 etc etc)
Printing the ADC value to the LCD (INT type)....so its 0 to 1023

Am i doing something wrong?

Thanx

Mark

Re: Strange ADC behaviour

Posted: Thu May 11, 2017 7:20 pm
by medelec35
Hi Mark,
After PrintString "TEMPSETSTR" component
Place PrintString " " component (3 spaces)

Martin

Re: Strange ADC behaviour

Posted: Thu May 11, 2017 8:29 pm
by MarkW
Hi Medelec

OK i see what i did wrong :roll:

I was not clearing the digits displayed if it
was 4 digits

Thank you!

Mark

Re: Strange ADC behaviour

Posted: Fri May 12, 2017 8:23 am
by medelec35
Hi Mark.
You're welcome.

There was a similar issue here.
There is a detailed explanation of what is causing the issue.
Although you have work out what the cause is.

Martin