PIC16F84A-04/SO Microchip Technology, PIC16F84A-04/SO Datasheet - Page 218

IC MCU FLASH 1KX14 EE 18SOIC

PIC16F84A-04/SO

Manufacturer Part Number
PIC16F84A-04/SO
Description
IC MCU FLASH 1KX14 EE 18SOIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F84A-04/SO

Program Memory Type
FLASH
Program Memory Size
1.75KB (1K x 14)
Package / Case
18-SOIC (7.5mm Width)
Core Processor
PIC
Core Size
8-Bit
Speed
4MHz
Peripherals
POR, WDT
Number Of I /o
13
Eeprom Size
64 x 8
Ram Size
68 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
68 B
Maximum Clock Frequency
4 MHz
Number Of Programmable I/os
13
Number Of Timers
1
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 70 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
ICE2000
Minimum Operating Temperature
0 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT18SO-1 - SOCKET TRANSITION 18SOIC 300MILI3-DB16F84A - BOARD DAUGHTER ICEPIC3309-1075 - ADAPTER 18-SOIC TO 18-SOIC309-1011 - ADAPTER 18-SOIC TO 18-DIP309-1010 - ADAPTER 18-SOIC TO 18-DIPAC164010 - MODULE SKT PROMATEII DIP/SOIC
Data Converters
-
Connectivity
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
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 PIC16F84A-04/SO