Patent ID: 6859884

Claim:
A circuit that allows a processor forming a part of a microcontroller to change its operating frequency, comprising: a clock generator generating a plurality of clock signals at a plurality of frequencies; a first switch receiving the plurality of clock signals and selecting one of the clock signals as an output thereof to be the current clock according to a current speed select signal; a current speed latch storing the current speed select signal; a first phase shifter shifting the phase of the current clock to produce a phase shifted current clock; a second switch receiving the plurality of clock signals and selecting one of the clock signals as an output thereof to be the new clock according to a new speed select signal; a new speed register storing the new speed select signal; wherein, the new speed select signal is produced by the processor and stored in the new speed register; a second phase shifter shifting the phase of the new clock to produce a phase shifted new clock; and logic means, receiving the current clock, the phase shifted current clock, the new clock, the phase shifted new clock and a signal from the processor directing a speed change as inputs thereto, the logic means for producing a signal latching the new speed into the current speed latch at a point in time after the speed change signal when the current clock, phase shifted current clock, the new clock and the phase shifted new clock have the same state.