Download M68HC05 Applications Guide
Transcript
Freescale Semiconductor, Inc. Microcontroller Operation On-Chip Peripherals bit positions so that the data in the master MCU is effectively exchanged with the data in the peripheral slave. In some cases, the loop is incomplete, and data is transferred only from the MCU to the peripheral or from the peripheral to the MCU. Freescale Semiconductor, Inc... An SPI system typically consists of a master MCU and one or more slave peripherals. Other configurations such as two MCUs or multiple master systems are possible but less common. The SPI system includes options to select shift rate, master or slave mode, clock polarity, and phase to allow compatibility with most synchronous serial peripheral devices from many manufacturers. 2.8.3 16-Bit Timer System The MC68HC705C8 MCU includes a 16-bit timer system used to measure time and to produce signals of specific period or frequency. This system is based on a free-running 16-bit counter, a 16-bit outputcompare register, and a 16-bit input-capture register. The CPU controls the timing of output signals through the outputcompare mechanism. To schedule an output change to occur at a specific time (a specific count of the free-running counter), a 16-bit value corresponding to the desired time is written to the output-compare register. When the free-running counter matches the value in the outputcompare register, the planned output change occurs. The CPU detects the time of an event or measures the period of an input signal with the input-capture mechanism. The CPU can select either positive or negative edges detected on an MCU pin to trigger the inputcapture mechanism. When the selected edge occurs, the current value in the free-running counter (which corresponds to the time the edge occurred), is captured by (transferred to) the input-capture register. The CPU can later read the value in the input-capture register and determine the exact time when the edge occurred. M68HC05 Applications Guide — Rev. 4.0 MOTOROLA Microcontroller Operation For More Information On This Product, Go to: www.freescale.com 71