Strange ADC behaviour

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

Strange ADC behaviour

Post 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
Attachments
TEST_690_FC6.fcfx
(8.91 KiB) Downloaded 327 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Strange ADC behaviour

Post by medelec35 »

Hi Mark,
After PrintString "TEMPSETSTR" component
Place PrintString " " component (3 spaces)

Martin
Martin

MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

Re: Strange ADC behaviour

Post 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Strange ADC behaviour

Post 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
Martin

Post Reply