![Maxim Integrated MAX31782 User Manual Download Page 91](http://html1.mh-extra.com/html/maxim-integrated/max31782/max31782_user-manual_1744481091.webp)
MaximIntegrated 10-3
MAX31782 User’s Guide
Revision 0; 8/11
10.1FanTachometerDetailedDescription
When a tachometer is initially enabled (TACHE = 1), it begins counting up from the TACHV value . The frequency of the
counter is derived from the MAX31782’s 4MHz system clock (f
MOSC
) . The tachometer can use a divided version of the
system clock by using the timer prescaler (TPS[2:0] bits) . When the TACHV count value reaches FFFFh, the counter
rolls over to 0000h and continues counting . When an overflow occurs, the TF flag is set, which can generate an inter-
rupt if enabled .
The tachometer feature works by capturing the number of system clocks, or divided system clocks, that occur during
one revolution of a fan . The tachometer block is triggered on the falling edge of the tachometer pin . Many fans output
multiple pulses per revolution . The tachometer block contains a revolution prescaler to compensate for fans that do
output multiple pulses per revolution . The revolution prescaler (TRPS[1:0] bits) can be programmed to work with fans
that output 1, 2, 4, or 8 pulses per revolution . When the number of falling edges received at the tachometer pin matches
the pulses per revolution defined by the revolution prescaler, tachometer block captures the number of system clock
counts for the fan revolution . When a capture is triggered the following occurs:
1) The value in the TACHV counter register is copied to the capture register (TACHR) .
2) The TACHV register is reset to 0000h and continues counting .
3) The TEXF flag is set . This causes an interrupt if enabled .
Note that the TEXF flag can be set (and causes an interrupt if enabled) even if the tachometer is not enabled
(TACHE = 0) . If the TEXEN bit is set to logic 0, falling edges on the tachometer pin do not trigger a capture event .
Following is an example of how to calculate the fan speed after the tachometer has captured one revolution . This
example assumes that the clock prescaler is set to be divide by 16 (010h) and the value read from the TACHR register
is 1000h . The tachometer clock is calculated to be:
Tachometer Clock = Sysclk/16 = 4MHz/16 = 250kHz
The frequency of the fan revolution can then be calculated as:
Fan Frequency = Tachometer Clock/TACHR = 250kHz/1000h = 61Hz, which equals 3660 RPM
10.2Timer/FanTachometerRegisterDescriptions
The following peripheral registers are used to control the fan tachometer of the MAX31782 . Each of the six indepen-
dent tachometers has three associated registers . Because there are six independent tachometers, the registers are
described in a batch manner . For example, the control register is denoted as TACHCNn, where n = 0 to 5 . Each tachom-
eter’s registers are independent, meaning each tachometer can be configured and operated differently .