EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Testing OSCCAL without programming a PIC

Started by Robert Scott April 3, 2005
Does anyone know how they figure out the correct value for OSCCAL in
the OTP PICs at the factory?  Since they are OTP, they can't program
any configuration bits to put the device into the internal RC
oscillator mode.  Is there some secret factory mode that they use?


-Robert Scott
 Ypsilanti, Michigan
"Robert Scott" <no-one@dont-mail-me.com> wrote in message 
news:425065ee.27363477@news.provide.net...
> Does anyone know how they figure out the correct value for OSCCAL in > the OTP PICs at the factory? Since they are OTP, they can't program > any configuration bits to put the device into the internal RC > oscillator mode. Is there some secret factory mode that they use? > > > -Robert Scott > Ypsilanti, Michigan
What they might do is program and test them on the die. Then they can UV erase them before encapsulating. Peter
Often the electrical characteristics of all parts on a wafer are similar. 
Most production wafers include a characterisation block which, when probed, 
reveals the particular process variations on that wafer. Corrections to 
OSCCAL could be made to all devices from that information. As for testing - 
it is likely there is a test mode invoked through the ICSP protocol.

Why do you ask? There are FLASH replacements for all these parts now.

-Andrew M

"Robert Scott" <no-one@dont-mail-me.com> wrote in message 
news:425065ee.27363477@news.provide.net...
> Does anyone know how they figure out the correct value for OSCCAL in > the OTP PICs at the factory? Since they are OTP, they can't program > any configuration bits to put the device into the internal RC > oscillator mode. Is there some secret factory mode that they use? > > > -Robert Scott > Ypsilanti, Michigan
On Sun, 03 Apr 2005 21:55:58 GMT, no-one@dont-mail-me.com (Robert
Scott) wrote:

>Does anyone know how they figure out the correct value for OSCCAL in >the OTP PICs at the factory? Since they are OTP, they can't program >any configuration bits to put the device into the internal RC >oscillator mode. Is there some secret factory mode that they use?
I haven't used the OTP PIC, but I assume it works in a similar way as a windowless EPROM, with all unprogrammed bits as "1" and that the programmer actively only writes "0" bits into the EPROM when needed. Power up the device with the calibration value as all "1"s and measure the produced output frequency. From this, calculate the actual oscillator frequency. Based on the actual oscillator frequency for this particular chip, calculate the calibration value required to produce the desired output clock frequency. Program the desired calibration value into the calibration word, which in effect only changes those bits that needs to be programmed to "0" state. Paul
On Sun, 03 Apr 2005 21:55:58 GMT, the renowned no-one@dont-mail-me.com
(Robert Scott) wrote:

>Does anyone know how they figure out the correct value for OSCCAL in >the OTP PICs at the factory? Since they are OTP, they can't program >any configuration bits to put the device into the internal RC >oscillator mode. Is there some secret factory mode that they use? > > >-Robert Scott > Ypsilanti, Michigan
Well, it's possible they could have an extra (otherwised unused, with a pullup/pulldown) bonding pad to force FOSC0 low, for example. It must be something like that. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
On Mon, 4 Apr 2005 09:25:10 +1000, "Andrew M" <noone@home> wrote:

>Why do you ask? There are FLASH replacements for all these parts now.
The product is an old one, and I don't want to make the adaptations to the flash version of the part. But you do make a good point, since the flash versions are cheaper than the OTP parts. It may pay some day for me to take the time to port the 12C671 code to the 12F675. -Robert Scott Ypsilanti, Michigan

The 2024 Embedded Online Conference