Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ADC in atmega32 using read function

Status
Not open for further replies.

madhan22

Newbie level 4
Joined
Sep 24, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
chennai
Activity points
1,307
hi to ll,
ple any one help me. i m trying to read analog value in atmega32 using adc function.and i m using code vision compiler.
 

what is ur query?
read the datasheet of atmega32, choose ur mode of operation, prescaler, move the related values to ADMUX, ADCSRA and ull get the values at any1 of the channels u want on PORTA , on ADC0 etc
 

If you use the codewizard then you will see that there is a function generated automatically unsigned int read_adc(unsigned char adc_input)


All you have to do is use it and store the result in a variable

Some_unsigned_int_variable = read_adc(0); // this will read ADC channel 0
 

dear sir,
thanks for ur replay..k i got that solution (ADC).but now i want know about how interface the external ports in atmega32.basic thinks and which IC i want to use..
 

What do you mean by "interface the external ports"? Interface with what?
For LEDs, you can just connect them by using resistors.
For relays, etc, you would usually a transistor or MOSFET.
For power MOSFET, you would usually use a transistor, a few transistors or a driver IC.
It depends on what you want to interface with. But, the above 3 are 3 common devices.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top