PIC16F1826-I/SO Microchip Technology Inc., PIC16F1826-I/SO Datasheet - Page 179

no-image

PIC16F1826-I/SO

Manufacturer Part Number
PIC16F1826-I/SO
Description
18 SOIC .300in TUBE, 3.5 KB Flash, 256 bytes RAM, 32 MHz Int. Osc, 16 I/0, Enhan
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F1826-I/SO

A/d Inputs
12-Channel, 10-Bit
Comparators
2
Cpu Speed
8 MIPS
Eeprom Memory
256 Bytes
Input Output
15
Interface
I2C/SPI/UART
Memory Type
Flash
Number Of Bits
8
Package Type
18-pin SOIC
Programmable Memory
3.5K Bytes
Ram Size
256 Bytes
Speed
32 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
1.8-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F1826-I/SO
0
21.3
Timer1 has four prescaler options allowing 1, 2, 4 or 8
divisions of the clock input. The T1CKPS bits of the
T1CON register control the prescale counter. The
prescale counter is not directly readable or writable;
however, the prescaler counter is cleared upon a write to
TMR1H or TMR1L.
21.4
A dedicated low-power 32.768 kHz oscillator circuit is
built-in between pins T1OSI (input) and T1OSO
(amplifier output). This internal circuit is to be used in
conjunction with an external 32.768 kHz crystal.
The oscillator circuit is enabled by setting the
T1OSCEN bit of the T1CON register. The oscillator will
continue to run during Sleep.
21.5
If control bit T1SYNC of the T1CON register is set, the
external clock input is not synchronized. The timer
increments asynchronously to the internal phase
clocks. If the external clock source is selected then the
timer will continue to run during Sleep and can
generate an interrupt on overflow, which will wake-up
the processor. However, special precautions in
software are needed to read/write the timer (see
Section 21.5.1 “Reading and Writing Timer1 in
Asynchronous Counter
 2011 Microchip Technology Inc.
Note:
Note:
Timer1 Prescaler
Timer1 Oscillator
Timer1 Operation in
Asynchronous Counter Mode
The oscillator requires a start-up and
stabilization time before use. Thus,
T1OSCEN should be set and a suitable
delay observed prior to using Timer1. A
suitable delay similar to the OST delay
can be implemented in software by
clearing the TMR1IF bit then presetting
the TMR1H:TMR1L register pair to
FC00h. The TMR1IF flag will be set when
1024 clock cycles have elapsed, thereby
indicating that the oscillator is running and
reasonably stable.
When switching from synchronous to
asynchronous operation, it is possible to
skip an increment. When switching from
asynchronous to synchronous operation,
it is possible to produce an additional
increment.
Mode”).
21.5.1
Reading TMR1H or TMR1L while the timer is running
from an external asynchronous clock will ensure a valid
read (taken care of in hardware). However, the user
should keep in mind that reading the 16-bit timer in two
8-bit values itself, poses certain problems, since the
timer may overflow between the reads.
For writes, it is recommended that the user simply stop
the timer and write the desired values. A write
contention may occur by writing to the timer registers,
while the register is incrementing. This may produce an
unpredictable value in the TMR1H:TMR1L register pair.
21.6
Timer1 can be configured to count freely or the count
can be enabled and disabled using Timer1 gate
circuitry. This is also referred to as Timer1 gate enable.
Timer1 gate can also be driven by multiple selectable
sources.
21.6.1
The Timer1 Gate Enable mode is enabled by setting
the TMR1GE bit of the T1GCON register. The polarity
of the Timer1 Gate Enable mode is configured using
the T1GPOL bit of the T1GCON register.
When Timer1 Gate Enable mode is enabled, Timer1
will increment on the rising edge of the Timer1 clock
source. When Timer1 Gate Enable mode is disabled,
no incrementing will occur and Timer1 will hold the
current count. See
TABLE 21-3:
T1CLK
PIC16(L)F1826/27
Timer1 Gate
T1GPOL
READING AND WRITING TIMER1 IN
ASYNCHRONOUS COUNTER
MODE
TIMER1 GATE ENABLE
0
0
1
1
TIMER1 GATE ENABLE
SELECTIONS
Figure 21-3
T1G
0
1
0
1
for timing details.
Counts
Holds Count
Holds Count
Counts
Timer1 Operation
DS41391D-page 179

Related parts for PIC16F1826-I/SO