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

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
PICmicro MID-RANGE MCU FAMILY
DS31014A-page 14-16
Question 7:
Answer 7:
1.
2.
Question 8:
Answer 8:
You do not need to zero the counter to find the difference between two pulse edges. Just take the
first captured value and put it into another set of registers. Then when the second capture event
occurs, just subtract the first event from the second. Assuming that your pulse edges are not so
far apart that the counter can wrap around past the last capture value, the answer will always be
correct. This is illustrated by the following example:
1.
2.
3.
The interrupt overhead is now less important because the values are captured automatically. For
even faster inputs do not enable interrupts and just test the flag bit in a loop. If you must also
capture very long time periods, such that the timer can wrap around past the previous capture
value, then consider using an auto-scaling technique that starts with a large prescale and
shorten the prescale as you converge on the exact frequency.
The value in CCPRxL is higher than PR2. This happens quite often when a user desires
a fast PWM output frequency and will write a small value in the PR2. In this case, if a value
of 7Eh were written to PR2, then a value 7Fh in CCPRxL will result in 100% duty cycle.
If the TRIS bit corresponding to the CCP output pin you are using is configured as an input,
the PWM output cannot drive the pin. In this case the pin would float and duty cycle may
appear to be 0%, 100% or some other floating value.
First captured value is FFFEh. Store this value in two registers.
The second capture value is 0001h (the counter has incremented three times).
0001h - FFFEh = 0003, which is the same as if you had cleared Timer1 to zero and let it
count to 3. (Theoretically, except that there was a delay getting to the code that clears
Timer1, so actual values would differ).
I am using a CCP module in PWM mode. The duty cycle being output is
almost always 100%, even when my program writes a value like 7Fh to the
duty cycle register, which should be 50%. What am I doing wrong?
I want to determine a signal frequency using the CCP module in capture
mode to find the period. I am currently resetting Timer1 on the first edge,
then using the value in the capture register on the second edge as the time
period. The problem is that my code to clear the timer does not occur until
almost twelve instructions after the first capture edge (interrupt latency
plus saving of registers in interrupt) so I cannot measure very fast frequen-
cies. Is there a better way to do this?
1997 Microchip Technology Inc.

Related parts for PIC16F818-I/P