Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A/D with pic 12f675

Status
Not open for further replies.

ndspinney

New Member
I have a project which requires A/D using pic 12f675. the problem is that I've taught myself assembler thanks to John Mortons 'Your Personal Introductry Course' book, and while it refers to the 8 pin range, theres nowt to do with A/D.
The questions I have are:
1) is there a rule to how the pic is initialised?
2) when A/D is completed where do i find the result?
3) why are the datasheets written like translated VCR instructions?

Thanks for taking the time to read this, and many thanks in advance for any help or suggestions.
Donations are also welcome :lol:
 
ndspinney said:
I have a project which requires A/D using pic 12f675. the problem is that I've taught myself assembler thanks to John Mortons 'Your Personal Introductry Course' book, and while it refers to the 8 pin range, theres nowt to do with A/D.
The questions I have are:
1) is there a rule to how the pic is initialised?
2) when A/D is completed where do i find the result?
3) why are the datasheets written like translated VCR instructions?

I've not done it with a 12F675, but my latest tutorial at http://www.winpicprog.co.uk if for using the A2D in the 16F876/7. The A2D in the 12F675 is 10 bit and very similar, following the tutorial and reading the datasheet should sort you out.

I know what you mean about the datasheets though :lol:
 
ok i've kinda understood the code.. but since 12F675 doesnt have a CCP module, wont i be a lil more difficult to generate a PWM..??
 
first of all check if your PIC has internal A/D converter,,if yes:there are internal regisers that save the converted data (chck data sheet),
if NO: u have to buy an A/D converter,u might find serial and parallel cobverter for communicating with PIC..

for more details check:
rabusanad.tripod.com
 
1) is there a rule to how the pic is initialised?
Yes.... It is in that nasty datasheet.... :D
Basically, you have to turn the pins you want to use for the ADC into inputs and then into analog pins. You do this with the TRISIO and ANSEL registers. The ANSEL register also selects the clock rate for the ADC.
Then you have to enable the ADC with bit0 in the ADCON0 register. This register is also used to select an ADC channel, start a conversion and detect when a conversion is done.
2) when A/D is completed where do i find the result?
In the ADRESH and ADRESL registers.
3) why are the datasheets written like translated VCR instructions?
Well, their main warehouse is in Thailand which is very close to DVD and VCR land to the north.... ;)
 
Can I just point out that this question was asked and answered 2½ years ago!

Mike.
 
LOL. Maybe he still still working on the project ;) At least he was not tring to use a 16F84 back then.
 
Pommie said:
Can I just point out that this question was asked and answered 2½ years ago!

Mike.

Not to step on any toes here, but to our posters defence...
The search facility of the forum does not allow TLA's (Three letter Acronym). I must admit that I myself have been trying to search for topics such as PWM, WDT, etc. Unless I spend days going through all the 100's of forum pages trying to find something that might be remotely related to my request or need, I'll simply post a new forum, and hope that somebody can remember the previous forum link and direct me to it:D .

I would like to know from the forum moderators if certain TLA's might be allowed in the search engine? I agree with why it's not generally allowed, else it will reply nearly all pages ever posted, but I would think commands, registers, and TLA associated with the functions of PIC's should somehow be catered for? Don't you agree?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top