Understanding the PLL and Clock Signal Generation...
grahamreitz
Posts: 56
I am hoping someone (or more) could help me wrap my head around the follow concept:
*A 5 MHz external crystal oscillator used as a reference for a PLL results in an 80 MHZ system clock.*
I have been looking at the Propeller data sheet, page 10, section 4.9.1, and also en.wikipedia.org/wiki/Phase-locked_loop.
These are some question that I can't seem to reconcile:
1) Where does the 16x (5 MHz * 16x = 80 MHz) multiplier come from? And is it configurable in a register (CTRA/B?)
2) The data sheet mentions an External Clock Speed of DC to 80 MHz.
- Would that be 16x * 5 MHz = 80 MHz?
- The data sheet mentions that the VCO should be kept within 64 MHz to 128 MHz. How is this related to the system clock speed? Does this mean that the Propeller can be clocked up to 128 MHz versus the advertised 80 MHz?
- Does DC refer to some DC voltage? Why doesn't it state 0 - 80 MHz?
3) What are the sequential registry touches in order to achieve 80 MHz if you booted it first using the internal 12 MHz clock and then changed over to 80 MHz using an external crystal?
Thanks in advance for help that "un-confuses" me.
Kindly,
graham
Post Edited (greitz) : 5/21/2009 10:30:32 PM GMT
*A 5 MHz external crystal oscillator used as a reference for a PLL results in an 80 MHZ system clock.*
I have been looking at the Propeller data sheet, page 10, section 4.9.1, and also en.wikipedia.org/wiki/Phase-locked_loop.
These are some question that I can't seem to reconcile:
1) Where does the 16x (5 MHz * 16x = 80 MHz) multiplier come from? And is it configurable in a register (CTRA/B?)
2) The data sheet mentions an External Clock Speed of DC to 80 MHz.
- Would that be 16x * 5 MHz = 80 MHz?
- The data sheet mentions that the VCO should be kept within 64 MHz to 128 MHz. How is this related to the system clock speed? Does this mean that the Propeller can be clocked up to 128 MHz versus the advertised 80 MHz?
- Does DC refer to some DC voltage? Why doesn't it state 0 - 80 MHz?
3) What are the sequential registry touches in order to achieve 80 MHz if you booted it first using the internal 12 MHz clock and then changed over to 80 MHz using an external crystal?
Thanks in advance for help that "un-confuses" me.
Kindly,
graham
Post Edited (greitz) : 5/21/2009 10:30:32 PM GMT
Comments
The VCOs mentioned use the system clock frequency as a base and produce phase-locked multiples of the clock input to the Propeller·up to 128MHz.· This is separate from the system clock and can be higher than the system clock, but is used only for the special counters built into each cog and the video generator in each cog.· DC refers to 0Hz, but is more precise since it refers to a static input.· 0Hz might refer to very low AC frequencies, but DC always means no pulses, no oscillation.
The bootloader is what initializes the clock mode for the just loaded program.· There is a CLKSET instruction in assembly which actually sets the clock mode.· The CLKSET function in Spin uses this instruction to do its work.
The bootloader is designed to use the RCFAST (approximately 12MHz) internal clock.· Once it loads a program into RAM, it reads a new clock mode value from location 5 where it's compiled into the program and does a CLKSET instruction.· The process is a little more complex since it takes a little while for the crystal oscillator to stabilize.· There's code in the I2C/SPI driver used in FemtoBasic (from the Object Exchange)·that duplicates what the bootloader does.
propeller.wikispaces.com/Oscillator
Kindly,
graham