PIC16F1829-E/P Microchip Technology, PIC16F1829-E/P Datasheet - Page 329

14 KB Flash, 1K Bytes RAM, 32 MHz Int. Osc, 18 I/0, Enhanced Mid Range Core 20 P

PIC16F1829-E/P

Manufacturer Part Number
PIC16F1829-E/P
Description
14 KB Flash, 1K Bytes RAM, 32 MHz Int. Osc, 18 I/0, Enhanced Mid Range Core 20 P
Manufacturer
Microchip Technology
Series
PIC® XLP™ mTouch™ 16Fr
Datasheet

Specifications of PIC16F1829-E/P

Core Processor
PIC
Core Size
8-Bit
Speed
32MHz
Connectivity
I²C, LIN, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
17
Program Memory Size
14KB (8K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
1K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 12x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
*
Processor Series
PIC16F182x
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1 KB
Interface Type
I2C, SPI, USART
Maximum Clock Frequency
32 MHz
Number Of Programmable I/os
18
Number Of Timers
5
Operating Supply Voltage
1.8 V to 5.5 V
Maximum Operating Temperature
+ 125 C
Mounting Style
Through Hole
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
27.5
To measure the change in frequency of the capacitive
sensing oscillator, a fixed time base is required. For the
period of the fixed time base, the capacitive sensing
oscillator is used to clock either Timer0 or Timer1. The
frequency of the capacitive sensing oscillator is equal
to the number of counts in the timer divided by the
period of the fixed time base.
27.6
To measure the frequency of the capacitive sensing
oscillator, a fixed time base is required. Any timer
resource or software loop can be used to establish the
fixed time base. It is up to the end user to determine the
method in which the fixed time base is generated.
27.6.1
To select Timer0 as the timer resource for the CPS
module:
• Set the T0XCS bit of the CPSCON0 register.
• Clear the TMR0CS bit of the OPTION register.
When Timer0 is chosen as the timer resource, the
capacitive sensing oscillator will be the clock source for
Timer0. Refer to
additional information.
27.6.2
To select Timer1 as the timer resource for the CPS
module, set the TMR1CS<1:0> of the T1CON register
to ‘11’. When Timer1 is chosen as the timer resource,
the capacitive sensing oscillator will be the clock
source for Timer1. Because the Timer1 module has a
gate control, developing a time base for the frequency
measurement can be simplified by using the Timer0
overflow flag.
It is recommend that the Timer0 overflow flag, in con-
junction with the Toggle mode of the Timer1 Gate, be
used to develop the fixed time base required by the
software portion of the CPS module. Refer to
Section 21.12 “Timer1 Gate Control Register”
additional information.
TABLE 27-2:
 2010 Microchip Technology Inc.
Note:
TMR1ON
0
0
1
1
Timer Resources
Fixed Time Base
The fixed time base can not be generated
by the timer resource that the capacitive
sensing oscillator is clocking.
TIMER0
TIMER1
TMR1GE
Section 20.0 “Timer0 Module”
TIMER1 ENABLE FUNCTION
0
1
0
1
Count Enabled by input
Timer1 Operation
Off
Off
On
Preliminary
for
for
27.7
The software portion of the CPS module is required to
determine the change in frequency of the capacitive
sensing oscillator. This is accomplished by the
following:
• Setting a fixed time base to acquire counts on
• Establishing the nominal frequency for the
• Establishing the reduced frequency for the
• Set the frequency threshold.
27.7.1
To determine the nominal frequency of the capacitive
sensing oscillator:
• Remove any extra capacitive load on the selected
• At the start of the fixed time base, clear the timer
• At the end of the fixed time base save the value in
The value of the timer resource is the number of
oscillations of the capacitive sensing oscillator for the
given time base. The frequency of the capacitive
sensing oscillator is equal to the number of counts on
in the timer divided by the period of the fixed time base.
27.7.2
The extra capacitive load will cause the frequency of the
capacitive sensing oscillator to decrease. To determine
the reduced frequency of the capacitive sensing
oscillator:
• Add a typical capacitive load on the selected
• Use the same fixed time base as the nominal
• At the start of the fixed time base, clear the timer
• At the end of the fixed time base save the value in
The value of the timer resource is the number of oscil-
lations of the capacitive sensing oscillator with an addi-
tional capacitive load. The frequency of the capacitive
sensing oscillator is equal to the number of counts on
in the timer divided by the period of the fixed time base.
This frequency should be less than the value obtained
during the nominal frequency measurement.
PIC16F/LF1825/1829
Timer0 or Timer1.
capacitive sensing oscillator.
capacitive sensing oscillator due to an additional
capacitive load.
CPSx pin.
resource.
the timer resource.
CPSx pin.
frequency measurement.
resource.
the timer resource.
Software Control
NOMINAL FREQUENCY
(NO CAPACITIVE LOAD)
REDUCED FREQUENCY
(ADDITIONAL CAPACITIVE LOAD)
DS41440A-page 331

Related parts for PIC16F1829-E/P