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.

12F675 Calibration?

Status
Not open for further replies.

brodin

New Member
I did something stupid today. I bought a 12F675, and without reading the datasheet i erased it the first thing i did. Very stupid!

Now the OSC calibration values are gone, aren't they? How can i get them back? The datasheet says something about that it is possible to get them form Microchip.

Help!!!

How shall i do?


Is the value uniqe for every single PIC, or is it the same for all of them?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
brodin said:
I did something stupid today. I bought a 12F675, and without reading the datasheet i erased it the first thing i did. Very stupid!

Now the OSC calibration values are gone, aren't they? How can i get them back? The datasheet says something about that it is possible to get them form Microchip.

Help!!!

How shall i do?


Is the value uniqe for every single PIC, or is it the same for all of them?

It's unique for each one, although those from the same production batch may well be the same (or similar).

I wouldn't have thought MicroChip could tell you what it might be, they would need to be able to recognise that exact chip to do so.

I've got some at home, I'll check what their calibration bytes are and let you know later (unless someone does it first?).

Apart from that you will have to measure it - write a program to output a frequency on one of the pins and measure the frequency. Run the same program on a known correct chip (even a 4MHz 16F84 will do) and compare the frequencies. Adjust the calibration byte in the 12F675 until it runs at as close a frequency as possible.

If you have access to an oscilloscope you could compare them side by side with one feeding the X input and the other the Y input.

Although it's not much help to you, the current working version of WinPicProg (which will be the next released version) reads the calibration byte before erasing or programming - and writes it back for you :lol:

I haven't been caught out (yet!), but I made sure my software made it difficult to be caught out.
 

brodin

New Member
Ok, yeah i have an oscilloscope. It would be great if you could send me your bytes, so i have something to start from!
 

brodin

New Member
How do i set the value in the code?

I am using PicBasic Plus 2.13

I tried this:

DEVICE 12F675
SET_OSCCAL
OSCCAL = $3478

But then the compiler says:
*** Value will overflow a BYTE size variable! ***


How do i do it in ASM?
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top