How to verify HS_PLL clock speed


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1

    Default How to verify HS_PLL clock speed

    Is there an easy way to check the clock if it is multiplied using the PLL? I want to confirm that I'm running at 16MHz (4MHz x 4). Will the OSC2 output a 16MHz signal?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    What PIC are you using?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I'm using the 18F452 running at 4MHz.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The easiest way I know to check would be with an LED & a few pause statements. If HSPLL isn't running it will be obvious on the LED.

    Main:
    HIGH LED
    PAUSE 500
    LOW LED
    PASE 500
    GOTO Main

    OSC2 can output the clock/4, but only in EC mode. In other modes, the signal from OSC2 output is so weak you'll load it with a scope probe.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Would this not enable the x4 PLL?

    Code:
    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H
    @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L
    @ __CONFIG _CONFIG2H, _WDT_ON_2H 
    @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It should, but check this with your programmer before programing that part.

    Also, you might want to use the osc resistor shown in the datasheet since this may be over driving your crystal. HS uses a higher drive output on OSC2.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Clock Speed
    By Del Tapparo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th November 2007, 02:06
  2. Replies: 14
    Last Post: - 26th September 2007, 05:41
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. clock speed
    By Armando Herjim in forum General
    Replies: 1
    Last Post: - 30th November 2006, 12:25
  5. Faster Clock Speed for Shiftin/out?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th December 2005, 02:15

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