Oscillator/Hserout woes


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    DEFINE OSC 4 doesn't do anything with the PICs registers or config "fuses". It simply tells the compiler that you are intending to run the chip at 4Mhz so it knows how to calculate the correct amount of cycles for your PAUSE 250 etc.

    The internal oscillator on the '690 is fixed* at 8Mhz but the postscaler (controlled by bits 4, 5 and 6 in the OSCCON register) defaults to a divide by 2 ratio so you end up with 4Mhz as the default. So really, it should be running at 4Mhz.

    * The "fixed" 8Mhz oscillator can be tuned by changing the OSCTUNE register.

    When you tried to get the CLKOUT to work, did you set the pin to output? (TRISA.4 = 0)

    /Henrik.

    EDIT: Running at 4Mhz you should see a 1Mhz signal on the CLKOUT pin.
    Great stuff Henrik - like I say, in the end I went back to 20Mhz (& all the associated pin rejigging that entails from having to put back in the an external resonator!)...I don't have the heart or inner strength to now 'rejg' my 'rejig' so to speak ......but I *will* revisit this with the advice/knowledge gained here (I'd dearly love to see some form of clock coming out of the pesky pins - if for no other reason to establish that the PIC isn't holding a grudge against me!)

    A hearty thanks!

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Hey Hank, when you do have the heart to re-visit this, use the int_osc clk_out fuse instead of no clk out. This should put the clock on whatever pin it says. As for rejigging pins, can you just pull your resonator to test between internal and external?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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