Osctune


Closed Thread
Results 1 to 36 of 36

Thread: Osctune

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default I am really confused

    Hey folks, I finally had a chance to grab a NEW PIC and read it to try and view this factory calibration value. But I can't seem to find it.

    So as I stated earlier I have only 12F683, 16F688 & 16F690 chips. If I put a NEW pic in my programmer (pickit2 w/low pin count demo board) and then "read" the chip, all I see in the "Program Memory" window is "3FFF" in all memory locations. In the "EEPROM" window is "FF" in all locations.

    Where do I look to find this "osccal" factory calibration value?
    Are these chips just too "low end" to have this calibration value?

    Why do I see "3FFF" in the program code area? This translates to 14 binary bits of "1". Why 14 bits? (the .pdf documentation says the 16F688 is an 8bit mcu)

    Is it possible to view all the other "special function registers"? As I look at the .pdf it shows various values for the registers on power-up, and they are NOT all 1's.

    HELP!!

    Dwight

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    1. None of the PIC's you mentioned have an OSCCAL register.
    2. 8-bit PIC'ss have 8-bit data and either 12, 14 or 16 bit program words. The PIC's you have use 14-bit programs words.
    3. When using a programmer, you can only see the program words (3FFF for unprogrammed locations) and EEPROM data (if present in device, FF is the erased state). You will not be able to see values of the SFR's unless you are using ICD.

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default how did you know that??

    Thanks rmteo,

    So is it correct to say that the PIC's I mentioned DO have the OSCTUNE register that the user can manually adjust to calibrate the oscillator. But they do not come from the factory with an OSCCAL value stored in memory.

    How did you know that these chips do not come with this OSCAL value?

    At what level DO the chips come with this calibration value?

    Thanks again
    Just trying to learn and understand

    Dwight

  4. #4
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Yes, all 3 of the PIC's you mentioned have an OSCTUNE register that allow you to adjust the frequency. As such, they do not have (or need) an OSCCAL.

    The best place to get this info is from the device data sheet. Only the low end PIC10's (and some PIC12's) with 12-bit instruction words have the OSCCAL register. They also do not have an OSCTUNE register.

  5. #5
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    How did you know that these chips do not come with this OSCAL value?
    Read the datasheet - it's all there (no OSCCAL reg, but OSCTUNE reg).

    Adding to rmteo's comments; none of the new chips (except the 10Fs) have OSCCAL. Reason is quite simple, they come trimmed from the factory; which makes their specs more tight than the ones with an OSCCAL reg. You can "tune" them if needed, but no real need to calibrate. If you place any of the newer chips on a frequency meter (one with a good reference); you'll notice they track pretty good. You only need to "tune" them if you need to track another free-running oscillator (read as if in RS232 clock/baud generator, etc), or want much better performance over temperature. The older chips with OSCCAL register were calibrated from the factory but their specs were looser and they could easily be erased (this was a big source of complaints).

    At what level DO the chips come with this calibration value?
    Older chips or lower end chips (10Fs) have the OSCCAL reg. You would much prefer the OSCTUNE register to the OSCCAL one (if given the choice).

  6. #6
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Now it's starting to make sense!!

    Thanks Languer,

    That helps alot!! So the fact is that the chips that I am using are actually later generation chips with the OSCTUNE (and better quality internal oscillators).

    I do have the datasheets and did do a search for both OSCCAL and OSCTUNE. I obviously found the latter not the former. I did not realize that OSCTUNE and OSCCAL were not the same thing, just stated differently, now I do.


    Older chips or lower end chips (10Fs) have the OSCCAL reg. You would much prefer the OSCTUNE register to the OSCCAL one (if given the choice).
    This one statement helps a bunch.

    If there has been one thing I have had to learn over the past year or so is to always check the datasheets. Then come here for more experienced help.
    Thanks to all for your assistance.

    Dwight
    These PICS are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
    Last edited by Heckler; - 4th April 2010 at 16:29. Reason: better readability

  7. #7
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Additional Info

    I believe rmteo already answered the original question (use of auto-baud feature). I thought I add the Microchip AppNote which describes how to "auto-calibrate" the internal oscillator.

    http://ww1.microchip.com/downloads/e...tes/00244A.pdf

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts