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.

PIC 12F629

Status
Not open for further replies.

FadNas

New Member
Hello, I am new participant in the Forum and would like to have a support on the PIC 12F629 where in the datasheet is mentioned that we should read the Oscillator Calibration register and the BG prior to programming the device. I actually succeeded in reading the oscillator calibration value located in the memory 3FF but I'm not able to find out how to retrieve the BG bits from the configuration register (ADDRESS: 2007h). The programmer is not showing me the 2007h address. Can you please assist in this matter.
Regards.
Fad
 
The CONFIG word is read or programmed by your programmer (PIckit2 or 3, etc.) when you read the chip initially. The programmer can read the CONFIG word and you can save it. In coding, the default in Oshonsoft Basic compiler is to set "Highest Voltage", which is both BG bits set high. However, according to datasheet, those bits are set at the factory and should be preserved.
Same with OSCCAL, it will be wiped when programming or erasing. Read the value first, and save it. A Pickit2 or 3 programmer will have a calibration routine to reset that value, based on timing tests it loads into the PIC (erases your code to calibrate).
Sorry, I don't use the 12f629, I use the 12F675 just instead in case I need an analog input.
 
I would expect the PK programmers to read and restore the calibration register automatically, it was certainly something that I did in WinPicProg many years ago.

You might also consider the 12F1840 as a more modern replacement, with considerably more facilities, or the even newer 16F18313 which is one of the later 'enhanced' PIC devices with even more facilities.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top