PIC12C508A-04/P Microchip Technology Inc., PIC12C508A-04/P Datasheet - Page 27
![no-image](/images/manufacturer_photos/0/4/440/microchip_technology_inc__sml.jpg)
PIC12C508A-04/P
Manufacturer Part Number
PIC12C508A-04/P
Description
8 PIN, 0.75 KB OTP, 25 RAM, 6 I/O
Manufacturer
Microchip Technology Inc.
Datasheet
1.PIC12C508A-04P.pdf
(113 pages)
Specifications of PIC12C508A-04/P
Cpu Speed
1 MIPS
Eeprom Memory
0 Bytes
Input Output
5
Memory Type
OTP
Number Of Bits
8
Package Type
8-pin PDIP
Programmable Memory
768 Bytes
Ram Size
25 Bytes
Speed
4 MHz
Timers
1-8-bit
Voltage, Range
2.5-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part
Electrostatic Device
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIPS
Quantity:
482
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
6.1
When an external clock input is used for Timer0, it
must meet certain requirements. The external clock
requirement is due to internal phase clock (T
synchronization. Also, there is a delay in the actual
incrementing of Timer0 after synchronization.
6.1.1
When no prescaler is used, the external clock input is
the same as the prescaler output. The synchronization
of
accomplished by sampling the prescaler output on the
Q2 and Q4 cycles of the internal phase clocks
(Figure 6-4). Therefore, it is necessary for T0CKI to be
high for at least 2T
and low for at least 2T
20 ns). Refer to the electrical specification of the
desired device.
FIGURE 6-4:
1999 Microchip Technology Inc.
T0CKI
Note 1:
Using Timer0 with an External Clock
EXTERNAL CLOCK SYNCHRONIZATION
2:
3:
External Clock/Prescaler
Output After Sampling
Increment Timer0 (Q4)
with
Delay from clock input change to Timer0 increment is 3Tosc to 7Tosc. (Duration of Q = Tosc).
Therefore, the error in measuring the interval between two edges on Timer0 input =
External clock if no prescaler selected, Prescaler output otherwise.
The arrows indicate the points in time where sampling occurs.
Prescaler Output (2)
External Clock Input or
TIMER0 TIMING WITH EXTERNAL CLOCK
OSC
the
(and a small RC delay of 20 ns)
OSC
internal
(and a small RC delay of
Timer0
phase
(3)
Q1 Q2 Q3 Q4
clocks
(1)
OSC
is
)
Q1 Q2 Q3 Q4
T0
When a prescaler is used, the external clock input is
divided by the asynchronous ripple counter-type
prescaler so that the prescaler output is symmetrical.
For the external clock to meet the sampling
requirement, the ripple counter must be taken into
account. Therefore, it is necessary for T0CKI to have a
period of at least 4T
40 ns) divided by the prescaler value. The only
requirement on T0CKI high and low time is that they
do not violate the minimum pulse width requirement of
10 ns. Refer to parameters 40, 41 and 42 in the
electrical specification of the desired device.
6.1.2
Since the prescaler output is synchronized with the
internal clocks, there is a small delay from the time the
external clock edge occurs to the time the Timer0
module is actually incremented. Figure 6-4 shows the
delay from the external clock edge to the timer
incrementing.
6.1.3
If the option register is set to read TIMER0 from the pin,
the port is forced to an input regardless of the TRIS reg-
ister setting.
TIMER0 INCREMENT DELAY
OPTION REGISTER EFFECT ON GP2 TRIS
Q1 Q2 Q3 Q4
T0 + 1
OSC
PIC12C5XX
4Tosc max.
(and a small RC delay of
Q1 Q2 Q3 Q4
T0 + 2
Small pulse
misses sampling
DS40139E-page 27