Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - read ADC input from ATmega32 problem..

(you are viewing a thread; or go back to list of threads)

read ADC input from ATmega32 problem.. (by Dzairo)
Hi. Today I try read value form ADC input .. and still read 1023 value ..
Itry do it in AVR studio .. and work vell. read value correct..
but if try it in LD micro then problem..

any idea what is problem??
Sat May 3 2014, 11:58:24, download attachment adcprint.zip
solved.. (by Dzairo)
Hi.
I solved my problem. My PCB have this connection:
AREF: 100nF to GND
AVCC: 100nF to GND , 10uH to VCC , 100nF to GND.

Then standard register setting is set to reference to AVCC and AREF by 100nF to GND.
But LD micro generate code for AREF connect to VCC .. , AVCC is not used..
I make changes in my code and complie .. now work good..

best regards.
Sat May 3 2014, 12:54:08
ADC read (by ritesh )
Hi Dzairo,

I am facing same problem. i am using atmega8 micro- controller and in my PCB connection are

1. 5V to VCC to GND and 5v to AVCC to GND

2. 100nf capacitor between AVCC and GND

3. AREF is not connected

i want to read analog value but whenever i upload ladder logic program its always read 1023 only. please guide me how to correct the circuit part and do i need to connected AREF to 5v?
Tue May 13 2014, 06:15:08
(no subject) (by Dzairo)
Hi.
setting for ATMega8 ADC reference is in page 203 ..
and LD micro generate code for AREF input reference .. it's meant use external reference. then AREF must connect to external reference .. to VCC .. this is not best setting but usable..
Then AVCC connect to VCC (+5V) , AGND connect to GND , and AREF connect to VCC also.
Look to page 200 there is show how to connect AVCC ..

ehm.. I use this :
AVCC connect to VCC by 10uH inductors with capacitor, AREF connect to capacitor 100nF to GND.
In source code change bit setting. Then after compile,ADMUX set REFS0 to 1 ..
Wed May 14 2014, 03:34:11
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):