Osctune


Closed Thread
Results 1 to 36 of 36

Thread: Osctune

Hybrid View

  1. #1
    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.

  2. #2
    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).

  3. #3
    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 15:29. Reason: better readability

  4. #4
    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

  5. #5
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    As long as I've been working with PICs and PBP, I am still intimidated when I see an ASSY program, and I am going to read this ApNote fully today. Do you incorporate this routine into your PBP program to run at some predefined interval? Another thing that concerns me is that it appears to use Timer1, and I want to use DT_INTs, including the elapsed timer routine. Will this clobber that? Can you tell me or show me how you incorporate this into a PBP program? (I am doing what Charles is, and need an accurate INTRC for a high speed uart.)

    Thanks for any further enlightenment for getting this routine flying.

    (I hope to use this with an 18F2420).
    Last edited by circuitpro; - 29th September 2010 at 17:47.

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    If you are building a PIC network, and need some pointers, I can give you some if you wish.

    Unless you get really creative, you have to turn off interrupts while you send/receive in software.
    Charles Linquist

  7. #7
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    I got a little rushed on this project, and didn't really consider some of the issues. I needed the space and ASSumed that the internal oscillator would be good enough. I dedicated the only hardware uart to a 9600 baud input because I need to use a DT-interrupt to receive the input character-by-character. Now I'm stuck trying to use DEBUG for a port that really needs to be faster than 9600. (Hence my earlier post inquiring as to how fast I could count on DEBUG to work). I should have either used a PIC with 2 uarts or gone ahead and plunked an oscillator down on the board. I MAY be able to use the prototypes using the internal oscillator, we'll know in a few days.

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