free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
narenreg
Fri Sep 12 2008, 09:09AM
 User Offline
Registered Member #10188
Joined: Thu Aug 28 2008, 04:53PM

Posts: 10
Thanked 0 times in 0 posts
hi frienz...!

i want to know what for are the bits ADATE & ADIE in register ADCSRA
i also want C-prog for using ADC...
can some one help me...

Back to top


Ajay
Fri Sep 12 2008, 11:27AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
nerenreg, please take a look at datasheet of atmega 16 for information on bits, if you still cant understand then please tell us.

and regarding C program, i again suggest to take a look at datasheet. will help you out.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


pdi33
Fri Sep 12 2008, 11:45AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
hi naren,
if u see the datasheet for ATmega16, u will find a good explaination for the above mentioned bits:


As mentioned above , adate bit when set initiates free running mode of the ADC i.e. the ADC updates the ADCH/ADCL registers continuously with every conversion. note that u have to start the conversion cycle by setting the ADSC bit once.
the ADIE bit when set enables the ADC interrupt which will occur after each conversion. u can use this interrupt to read the ADC value.
Important Note:
I had observed a strange problem regarding the ADC readings ( some non-linearityin the ADc readings w.r.t. the input voltage) in the past when experimenting with the ADC part .This had occured because of the following condition:
1. the internal pullups were enabled and
2. in some other part of the code i had set the PA0 bit to 1.
in this case if the ADC selected is ADC0 ( this pin has dual functionality as it can be configured also as PA0). here note that the portA is not disconnected completely even when the uC is usng the pin as an ADC input. so a logic 1 to that pin initiated an internal voltage divider with the input creating the non-linearity error @ lower ADC input values.
there are two ways to eliminate this error the first one is to disable the internal pullups so that any logical level of the corresponding portA bit does not affect the ADC OR just keep the corresponding port bit to logical 0 level.
these suggestions have been thoroughly checked by me and the linearity found was excellent(upto +/- 1 LSB).

do start something by designing a circuit first and try to write some code and post them here. I can assure u we wil guide u further as u proceed.
goodluck.





* inspired to develop,developing to inspire *
Back to top



This post has been thanked 3 times
1nafar
Sat Sep 13 2008, 11:41AM
 User Offline
Registered Member #10613
Joined: Sat Sep 13 2008, 07:33AM

Posts: 20
Thanked 4 times in 4 posts
hi
if you need a project of adc , tell me

i am amateur in english language
I beg your pardon
Back to top


 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems