st62t25cn6 STMicroelectronics, st62t25cn6 Datasheet - Page 52

no-image

st62t25cn6

Manufacturer Part Number
st62t25cn6
Description
8-bit Mcus With A/d Converter, Two Timers, Oscillator Safeguard & Safe Reset
Manufacturer
STMicroelectronics
Datasheet
ST6215C/ST6225C
8-BIT TIMER (Cont’d)
9.2.7 Register Description
PRESCALER COUNTER REGISTER (PSCR)
Address: 0D2h - Read/Write
Reset Value: 0111 1111 (7Fh)
Bit 7 = PSCR7: Not used, always read as “0”.
Bits 6:0 = PSCR[6:0] Prescaler LSB.
TIMER COUNTER REGISTER (TCR)
Address: 0D3h - Read / Write
Reset Value: 1111 1111 (FFh)
Bits 7:0 = TCR[7:0] Timer counter bits.
TIMER STATUS CONTROL REGISTER (TSCR)
Address: 0D4h - Read/Write
Reset Value: 0000 0000 (00h)
Bit 7 = TMZ Timer Zero bit.
A low-to-high transition indicates that the timer
count register has underflowed. It means that the
TCR value has changed from 00h to FFh.
This bit must be cleared by user software.
0: Counter has not underflowed
1: Counter underflow occurred
Bit 6 = ETI Enable Timer Interrupt.
When set, enables the timer interrupt request. If
Table 14. 8-Bit Timer Register Map and Reset Values
52/105
1
PSCR
TCR7
TMZ
Address
(Hex.)
7
7
7
7
0D2h
0D3h
0D4h
PSCR
TCR6
ETI
6
PSCR
Reset Value
TCR
Reset Value
TSCR
Reset Value
PSCR
TOUT DOUT
TCR5
Register Label
5
PSCR
TCR4
4
PSCR
TCR3
PSI
3
PSCR
TCR2
PSCR7
PS2
TCR7
TMZ
2
7
0
1
0
PSCR
TCR1
PS1
1
PSCR6
TCR6
ETI
6
1
1
0
PSCR
TCR0
PS0
0
0
0
0
PSCR5
TOUT
TCR5
5
1
1
0
ETI=0 the timer interrupt is disabled. If ETI=1 and
TMZ=1 an interrupt request is generated.
0: Interrupt disabled (reset state)
1: Interrupt enabled
Bit 5 = TOUT Timer Output Control .
When low, this bit selects the input mode for the
TIMER pin. When high the output mode is select-
ed.
0: Input mode (reset state)
1: Output mode, the TIMER pin is configured as
push-pull output
Bit 4 = DOUT Data Output.
Data sent to the timer output when TMZ is set high
(output mode only). Input mode selection (input
mode only).
Bit 3 = PSI: Prescaler Initialize bit.
Used to initialize the prescaler and inhibit its count-
ing. When PSI=“0” the prescaler is set to 7Fh and
the counter is inhibited. When PSI=“1” the prescal-
er is enabled to count downwards. As long as
PSE=“1” both counter and prescaler are not run-
ning
0: Counting disabled
1: Counting enabled
Bits 1:0 = PS[2:0] Prescaler Mux. Select.
These bits select the division ratio of the prescaler
register.
Table 13. Prescaler Division Factors
PS2
PSCR4
DOUT
0
0
0
0
1
1
1
1
TCR4
4
1
1
0
PSCR3
TCR3
PSI
3
1
1
0
PS1
1
0
0
1
1
0
0
1
PSCR2
TCR2
PS2
2
1
1
0
PS0
1
0
1
0
1
0
1
0
PSCR1
TCR1
PS1
1
1
1
0
Divided by
PSCR0
128
16
32
64
TCR0
8
1
2
4
PS0
0
1
1
0

Related parts for st62t25cn6