Capture / Compare Unit

from Wikipedia, the free encyclopedia

The capture / compare unit is a peripheral component of a microcontroller . It can record and compare external signals, but also generate pulse patterns , for example .

They usually has several operating modes, such as for the microcontroller C167 from Infineon :

  1. Timer mode: counting up with different sources as clocks . An interrupt can be triggered if the counter overflows .
  2. Capture mode: When an external signal occurs, the content of the assigned (running) timer is saved. An interrupt can also be triggered here.
  3. Compare mode: The count of the assigned timer is compared with that of a register . If they match, an interrupt can be triggered.

These processes take place exclusively in the peripheral hardware and, apart from possible interrupts, do not require any computing time.

literature

  • Helmut Müller / Lothar Walz: Microprocessor technology. 7th edition. Vogel Buchverlag, Würzburg 2005, ISBN 978-3-8343-3023-9 , p. 265 ff.