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.

PIC16F630 calibration code

Status
Not open for further replies.

jjegarcia

New Member
I running my application with very a slow frequency but I like to increase the speed using the internal oscillator. According to the datasheets it has to be stored a calibration value at the end of the memory. Unfortunatelly the programmer is telling me that cannot read the calibration value?
Has anyone got an example or code for 16f630 or 676 to see how the calibration is implemented. The example in the datasheet is to brief.
Thanks...
 
jjegarcia said:
I running my application with very a slow frequency but I like to increase the speed using the internal oscillator. According to the datasheets it has to be stored a calibration value at the end of the memory. Unfortunatelly the programmer is telling me that cannot read the calibration value?
Has anyone got an example or code for 16f630 or 676 to see how the calibration is implemented. The example in the datasheet is to brief.
Thanks...

I haven't used either of those chips, but usually on other PIC's the calibration value is a 'retlw 0x??' command. Erasing the chip (or programming it, which erases it first) obviously erases the calibration byte as well. So you need to read it before you do anything else with the chip, and include it in your source code - unless your programmer will save and restore it automatically for you?.

If you have wiped it, you will have to find it's value by experiment - set up a program which generates a known time interval - then alter the calibration byte until it gives the correct time.

Personally, when ever I get a PIC that uses a calibration byte, I read it and write the value down before I do anything else.
 
thanks a lot I tryed and playing with the ranges from 00 to FF by using just
movlw value
movwf osccal
many thanks.....................
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top