Testing OSCCAL without programming a PIC

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

Reply to
Robert Scott
Loading thread data ...

What they might do is program and test them on the die. Then they can UV erase them before encapsulating.

Peter

Reply to
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

Reply to
Andrew M

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

Reply to
Paul Keinanen

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
Reply to
Spehro Pefhany

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

Reply to
Robert Scott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.