English
Language : 

PIC17C4X Datasheet, PDF (67/240 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM/ROM Microcontroller
11.0 TIMER0
The Timer0 module consists of a 16-bit timer/counter,
TMR0. The high byte is TMR0H and the low byte is
TMR0L. A software programmable 8-bit prescaler
makes an effective 24-bit overflow timer. The clock
source is also software programmable as either the
internal instruction clock or the RA1/T0CKI pin. The
control bits for this module are in register T0STA
(Figure 11-1).
PIC17C4X
FIGURE 11-1: T0STA REGISTER (ADDRESS: 05h, UNBANKED)
R/W - 0
INTEDG
bit7
R/W - 0
T0SE
R/W - 0
T0CS
R/W - 0
PS3
R/W - 0
PS2
R/W - 0
PS1
R/W - 0
PS0
bit 7:
INTEDG: RA0/INT Pin Interrupt Edge Select bit
This bit selects the edge upon which the interrupt is detected
1 = Rising edge of RA0/INT pin generates interrupt
0 = Falling edge of RA0/INT pin generates interrupt
U-0
—
bit0
R = Readable bit
W = Writable bit
U = Unimplemented,
Read as '0'
-n = Value at POR reset
bit 6:
T0SE: Timer0 Clock Input Edge Select bit
This bit selects the edge upon which TMR0 will increment
When T0CS = 0
1 = Rising edge of RA1/T0CKI pin increments TMR0 and/or generates a T0CKIF interrupt
0 = Falling edge of RA1/T0CKI pin increments TMR0 and/or generates a T0CKIF interrupt
When T0CS = 1
Don’t care
bit 5:
T0CS: Timer0 Clock Source Select bit
This bit selects the clock source for TMR0.
1 = Internal instruction clock cycle (TCY)
0 = T0CKI pin
bit 4-1: PS3:PS0: Timer0 Prescale Selection bits
These bits select the prescale value for TMR0.
PS3:PS0
Prescale Value
0000
0001
0010
0011
0100
0101
0110
0111
1xxx
1:1
1:2
1:4
1:8
1:16
1:32
1:64
1:128
1:256
bit 0: Unimplemented: Read as '0'
© 1996 Microchip Technology Inc.
This document was created with FrameMaker 4 0 4
DS30412C-page 67