Page 1 of 1

Arduino Mega Analog!

Posted: Sat Dec 31, 2016 5:04 pm
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

Re: Arduino Mega Analog!

Posted: Sat Dec 31, 2016 7:46 pm
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

Re: Arduino Mega Analog!

Posted: Sat Dec 31, 2016 8:58 pm
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

Re: Arduino Mega Analog!

Posted: Sun Jan 01, 2017 7:33 pm
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.

Re: Arduino Mega Analog!

Posted: Tue Jan 03, 2017 12:29 pm
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.

Re: Arduino Mega Analog!

Posted: Tue Jan 03, 2017 1:51 pm
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

Re: Arduino Mega Analog!

Posted: Sun Jan 08, 2017 9:55 pm
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