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.
Hi,
about PIC :
1. Configure the A/D module:
• Configure analog pins/voltage reference and
digital I/O (ADCON1)
• Select A/D input channel (ADCON0)
• Select A/D conversion clock (ADCON0)
• Turn on A/D module (ADCON0)
2. Configure A/D interrupt (if desired):
• Clear ADIF bit
• Set ADIE bit
• Set PEIE bit
• Set GIE bit
3. Wait the required acquisition time.
4. Start conversion:
• Set GO/DONE bit (ADCON0)
5. Wait for A/D conversion to complete by either:
• Polling for the GO/DONE bit to be cleared
(interrupts disabled); OR
• Waiting for the A/D interrupt
6. Read A/D Result register pair
(ADRESH:ADRESL), clear bit ADIF if required.
7. For the next conversion, go to step 1 or step 2
as required. The A/D conversion time per bit is
defined as TAD.
When yu make ADC convert clock selection must use right devider depending from the work frequency
Hello,
i don't was forgot this, if you look in microchip data sheet for many of the processors procedure for ADC service is too same, something more, the ADC use the same address resource, this not for all but for more, special in 16x series. In 18x series the addres if i remember right is a different, but the princip is a too same.
In my experience the PICs ADCs is not hat bad infact i found that for general purpose stuff I got about a 40us conversion time / channel (including setup and conversion). This compares favorably to ather external ADCs and besides those on the PIC are allready paid for.
Hi!
There are a lot of PIC's with built in ADC. If u intend to use the pic only in place of ADC, then use the ones with the smallest package e.g 12F675 (8 pins), 16F676 (14 Pins) etc. Search microchip's site for application notes and u will get lot of information. If u still face problems then post a message i will help u.
Best of Luck.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.