PIC16F818-I/P Microchip Technology, PIC16F818-I/P Datasheet - Page 61

IC MCU FLASH 1KX14 18-DIP

PIC16F818-I/P

Manufacturer Part Number
PIC16F818-I/P
Description
IC MCU FLASH 1KX14 18-DIP
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F818-I/P

Program Memory Type
FLASH
Program Memory Size
1.75KB (1K x 14)
Package / Case
18-DIP (0.300", 7.62mm)
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
16
Eeprom Size
128 x 8
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
128 B
Interface Type
I2C/SPI/SSP
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
16
Number Of Timers
3
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000, DM163014
Minimum Operating Temperature
- 40 C
On-chip Adc
5-ch x 10-bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
ACICE0202 - ADAPTER MPLABICE 18P 300 MILAC164010 - MODULE SKT PROMATEII DIP/SOIC
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F818-I/P
Manufacturer:
Microchip Technology
Quantity:
295
7.5
If control bit, T1SYNC (T1CON<2>), is set, the external
clock input is not synchronized. The timer continues to
increment asynchronous to the internal phase clocks.
The timer will continue to run during Sleep and can
generate an interrupt on overflow that will wake-up the
processor. However, special precautions in software
are needed to read/write the timer.
In Asynchronous Counter mode, Timer1 cannot be
used as a time base for capture or compare operations.
EXAMPLE 7-1:
EXAMPLE 7-2:
 2004 Microchip Technology Inc.
; All interrupts are disabled
CLRF
MOVLW
MOVWF
MOVLW
MOVWF
; Re-enable the Interrupt (if required)
CONTINUE
; All interrupts are disabled
MOVF
MOVWF
MOVF
MOVWF
MOVF
SUBWF
BTFSC
GOTO
; TMR1L may have rolled over between the read of the high and low bytes.
; Reading the high and low bytes now will read a good value.
MOVF
MOVWF
MOVF
MOVWF
CONTINUE
Timer1 Operation in
Asynchronous Counter Mode
TMR1H, W
TMPH
TMR1L, W
TMPL
TMR1H, W
TMPH, W
STATUS, Z
CONTINUE
TMR1H, W
TMPH
TMR1L, W
TMPL
TMR1L
HI_BYTE
TMR1H, F
LO_BYTE
TMR1H, F
WRITING A 16-BIT FREE RUNNING TIMER
READING A 16-BIT FREE RUNNING TIMER
; Read high byte
; Read low byte
; Read high byte
; Sub 1st read with 2nd read
; Is result = 0
; Good 16-bit read
; Read high byte
; Read low byte
; Re-enable the Interrupt (if required)
; Continue with your code
; Clear Low byte, Ensures no rollover into TMR1H
; Value to load into TMR1H
; Write High byte
; Value to load into TMR1L
; Write Low byte
; Continue with your code
7.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 conten-
tion may occur by writing to the timer registers while the
register is incrementing. This may produce an
unpredictable value in the timer register.
Reading the 16-bit value requires some care. The
example
Example 7-2 demonstrate how to write to and read
Timer1 while it is running in Asynchronous mode.
codes
READING AND WRITING TIMER1
IN ASYNCHRONOUS COUNTER
MODE
PIC16F818/819
provided
in
Example 7-1
DS39598E-page 59
and

Related parts for PIC16F818-I/P