Processor signal frequency CPUCLK is directly connected with the instruction execution speed of the microcontroller. Doubling the frequency, program executes approximately twice faster. On the other hand, higher frequency doesn’t necessary always mean better overall performances. Main disadvantage in rising the frequency is it’s unwanted effect on microcontroller power consumption, which is one of the main problems it
the case of battery supply. Other disadvantage of higher frequency is more intensive generation of electromagnetic interference, which may affect on surrounding devices. Because of these problems general rule should be applied, which says that lowest possible satisfactory frequency should be used. Default value of PSoC microcontroller signal frequency is 3MHz, which is a compromise between speed and consumption.
To maintain the longest possible uninterrupted work time, it is an imperative to bring power consumption to its lowest satisfactory functional level in battery operated devices. Most of microcontrollers operate only periodically, while being in the idle state for the most of their time. Major power saving can be achieved by bringing microcontroller to sleep mode while microcontroller does no important role. Saving is achieved
because of all the frequencies, except CPU32K and SLEEP become inactive, while processor stops instruction execution. Microcontroller could be woken up from sleep mode only by reset or a interrupt.
Interrupt could be generated by a sleep timer or some digital block which use CPU_32k frequency. Also GPIO pin or analog column interrupts can be used for CPU waking-up. Sleep timer represents a special counter whose main role is to generate periodic interrupts which enable waking microcontroller from power saving mode. Sleep timer frequency interrupt ranges from 1 to 512Hz. After waking microcontroller does all
needed operations after which it’s being switched back to sleep mode and waits for another sleep timer interrupt. There is a appropriate type of interrupt needed to wake the microcontroller from sleep mode. Because of possibility for various irregularities to occurs during the work of icrocontroller there is a need to reset it in those cases, or in other words, brought to beginning state. Begin state means all internal registers are
initialized and program continues its execution from beginning.
No comments:
Post a Comment