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.

PIC12F629 internal oscillator calibration

Status
Not open for further replies.

ful babu

Full Member level 3
Joined
Nov 11, 2004
Messages
174
Helped
13
Reputation
26
Reaction score
3
Trophy points
1,298
Location
Singapore
Activity points
1,634
any one kno how to calibrate properly the internel oscillator of pic12f629 ? the factory defined calibration is not correct as far i have concerned
 

First of all, you haven't simply forgot to do this have you?

Code:
bsf STATUS, RP0 ;Bank 1
call 3FFh ;Get the cal value
movwf OSCCAL ;Calibrate
bcf STATUS, RP0 ;Bank 0

Just asking, but that's what I did the first time I used one of these PIC12 chips :)

If you really do need to calibrate yourself, it should be pretty easy if you have a frequency counter of some sort (or digital scope...). You write a small program that toggles a pin in a loop, and measure the frequency on the pin. You will know exactly how far off the oscillator is and can calculate the correct OSCCAL value (or just use trial and error).
 

Hi,

You are probably going to use the internal OSC if you are using this question. Then you have to pay attantin to the fact that if you are going to use this PIC in a HOT invirument, then your internal OSC will chage.
If not, then ( when using C ) you can write the new code into OSCCAL, and wait 1ms for the OSC to stabalise, or using ASM as CYR wrote.

If you need autoupdate for the OSC when using HOT inviroment, post your request and i will write it down how i did it.

Good luck.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top