Arduino Mega Analog!

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

Moderator: Benj

Post Reply
jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Arduino Mega Analog!

Post by jgu1 »

Hi All!

Happy New year!

During a play/test with a KS0108 display, I use an analog input to show the bit in display. I set my analog as an integer. so I suppose that I have to read the value in my display between 0 - 1023 but I am only able to adjust my pot to max 975. I have tryed to play with the settings for the analog input, convsp and actime but it doesn¨t change anything. What am I doing wrong, please :?:

Best regard

Jorgen
Attachments
AnalogKS0108.fcfx
(8.05 KiB) Downloaded 304 times

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

Re: Arduino Mega Analog!

Post by medelec35 »

Hi Jorgen,
Thanks and happy new year to you too.
Are you able to measure both VDD and analogue i/p voltage directly on the chip pins with respect to GND and see if they match?

Martin
Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: Arduino Mega Analog!

Post by jgu1 »

Hi Martin!

Thank´s for really fast reply.

I have made a testboard with 12V supply a lot of potmeter wich I supply with 5V so I have from 0 - 5 V to test and use analog input and display´s ect...

I supply the Arduino with 12V

The output from my potentiometers is 5,002V (measured with a Fluke 77) on max. and 0V at minimum.

If I take the 5v from the arduino 5,122 and put it directly on analog input, I get the max value in display on 998

Any ideas

Br Jorgen

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: Arduino Mega Analog!

Post by jgu1 »

Hi again!

I try to change from integer to byte. max 244 should be 255. Try to change the analog input and an another Arduino Mega, same result. I am afraid there is a bug :(

Br Jorgen.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Arduino Mega Analog!

Post by Benj »

Hello,

Have you tried changing the ADC component properties. Adjusting the conversion speed would probably be the first thing I would try. Maybe from /8 to /16 or /32.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: Arduino Mega Analog!

Post by jgu1 »

Hi Ben!

Yes I have tryed to played with these setting, no change. I think I almost have tryed all. Sorry

Br Jorgen

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: Arduino Mega Analog!

Post by jgu1 »

Hi!

Kind request. Concerning the above issue, is there anybody here in forum, will try to make a test with analog input on an Arduino Mega. I will be grateful :D

Test the analog with int. and byte. It work fine in simulation, but I did not manage to work correct in real world. I dont know if I am doing something wrong.

If you dont have a KS0108 display it is easy to change in testprogram. Please, and thank´s in advance.

Br. Jorgen
Attachments
AnalogKS0108.fcfx
(8.05 KiB) Downloaded 298 times

Post Reply