beautypg.com

1 tachometer control register (tachcnn), 10 .2 .1 tachometer control register (tachcnn) -4, 1tachometercontrolregister(tachcnn) – Maxim Integrated MAX31782 User Manual

Page 92

background image

MaximIntegrated 10-4

MAX31782 User’s Guide

Revision 0; 8/11

10.2.1TachometerControlRegister(TACHCNn)

The tachometer control register, TACHCNn, is used to set up and start the tachometer, and is also where tachometer
interrupt flags are located . It should be noted that the user should not modify the reserved bits in the TACHCNn regis-
ters . Otherwise, undesired operation can occur .

BIT

NAME

DESCRIPTION

15

Reserved . The user should not write to this bit .

14:13

TRPS[1:0]

Revolution Prescaler . These bits are used to set the number of tachometer pin falling edges are
required to trigger a capture . This allows the tachometer to easily work with fans that produce mul-
tiple pulses per revolution .

TRPS[1:0]

PRESCALER

00

1 pulse per revolution

01

2 pulses per revolution

10

4 pulses per revolution

11

8 pulses per revolution

12:11

Reserved . The user should not write to these bits .

10:9

TPS[2:0]

Clock Prescale . These bits select the frequency of the clock input to the tachometer . The tachom-
eter clock is a divided version of the system clock . The TPS[2:0] bits should be configured by
the user when the timer is stopped (TACHE = 0) . While hardware does not prevent changing the
TPS[2:0] bits when the timer is running, the resultant behavior is nondeterministic .

TPS[2:0]

TACHOMETERINPUTCLOCK

000

Sysclk/1

001

Sysclk/4

010

Sysclk/16

011

Sysclk/64

100

Sysclk/256

101

Sysclk/1024

11x

Sysclk/1

7

TF

Overflow Flag . This bit is set when the tachometer’s TACHV register overflows from FFFFh to 0000h .
An interrupt will be generated if TACHIE=1 . This flag must be cleared by software .

6

TEXF

External Tachometer Trigger Flag . A falling edge on the tachometer’s pin (TACH .n) causes this flag
to be set if enabled (TEXEN = 1) . The TEXF flag is only set once the tachometer revolution prescal-
er condition is met . This flag must be cleared by software . Setting this bit to 1 forces a tachometer
interrupt if enabled .
Note1: The revolution prescaler always triggers on the first tachometer pulse received, then,
depending on division factor, it triggers again after 1, 2, 4, or 8 tachometer pulses .
Note2:This flag is set on a falling edge of the tachometer pin even if the tachometer is disabled
(TACHE = 0) .

5:4

Reserved . The user should not write to these bits .

3

TEXEN

External Enable . Setting this bit to 1 enables the capture function on a falling edge of the tachom-
eter pin (TACH .n) .

2

TACHE

Run Control . This bit enables the tachometer operation when set to 1 . Clearing this bit to 0 halts the
tachometer operation and preserves the current count in TACHV .

1

TACHIE

Enable Tachometer Interrupt . Setting this bit to 1 enables the interrupt from the TF and TEXF flags .

0

Reserved . The user should not write to this bit .

Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

TRPS .1

TRPS .0

TPS .2

TPS .1

TPS .0

TF

TEXF

TEXEN

TACHE

TACHIE

Reset

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

Access

r

rw

rw

r

r

rw

rw

rw

rw

rw

r

r

rw

rw

rw

r