English
Language : 

AN1602 Datasheet, PDF (1/21 Pages) STMicroelectronics – 16-BIT TIMING OPERATIONS USING ST7262 OR ST7263B MCUs
AN1602
APPLICATION NOTE
16-BIT TIMING OPERATIONS USING ST7262 OR ST7263B
MCUs
Microcontroller Division Applications
INTRODUCTION
This Application Note describes how to use the ST7262 or ST7263B for 16-bit timing opera-
tions. The intention of this document is to show how to perform pulse measurement and PWM
generation using the different timers available on each microcontroller type.
1 16-BIT TIMING MEASUREMENTS
1.1 USING ST7262
The aim of this section is to describe how to use the ST7262 8-bit timer to perform pulse and
frequency measurements with 16-bit accuracy.
1.1.1 16-Bit Capture
1.1.1.1 Principle
The ST7262 architecture allows you to cascade the 8-bit Auto Reload Timer (ART) with the 8-
bit Time Base Unit (TBU) to obtain a 16-bit counter (The carry bit of the ART acts as the clock
for the TBU). Using this configuration, the ARTCAR register represents the Least Significant
Byte and the TBUCV register represents the Most Significant Byte (see Figure 1).
Figure 1. TBU+ART 16-Bit Counter Value
TBU (MSB)
ART (LSB)
16 Bit Counter Value
On each valid input capture, the 16-bit counter value is obtained by:
– The ARTCAR register which is automatically latched.
– The TBUCV register which is saved by software in the Input Capture Interrupt routine.
This method ensures a “real-time” capture of the low bits, while the software delay needed to
save the TBUCV can be compensated.
AN1602/0503
1/21
1