PIC16F684-ISL

Manufacturer Part NumberPIC16F684-ISL
ManufacturerMicrochip Technology Inc.
PIC16F684-ISL datasheets
 


Specifications of PIC16F684-ISL

CaseN/ANotesNEW
Date_code11+  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Page 31
32
Page 32
33
Page 33
34
Page 34
35
Page 35
36
Page 36
37
Page 37
38
Page 38
39
Page 39
40
Page 40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Page 36/164

Download datasheet (3Mb)Embed
PrevNext
PIC16F684
4.2.3
ULTRA LOW-POWER WAKE-UP
The Ultra Low-power Wake-up (ULPWU) on RA0
allows a slow falling voltage to generate an interrupt-
on-change on RA0 without excess current consump-
tion. The mode is selected by setting the ULPWUE bit
(PCON<5>). This enables a small current sink which
can be used to discharge a capacitor on RA0.
To use this feature, the RA0 pin is configured to output
‘1’ to charge the capacitor, interrupt-on-change for RA0
is enabled, and RA0 is configured as an input. The
ULPWUE bit is set to begin the discharge and a SLEEP
instruction is performed. When the voltage on RA0 drops
below V
, an interrupt will be generated which will cause
IL
the device to wake-up. Depending on the state of the
GIE bit (INTCON<7>), the device will either jump to the
interrupt vector (0004h) or execute the next instruction
when the interrupt event occurs. See Section 4.2.2
“Interrupt-on-change” and Section 12.4.3 “PORTA
Interrupt” for more information.
This feature provides a low-power technique for
periodically waking up the device from Sleep. The
time-out is dependent on the discharge time of the RC
circuit on RA0. See Example 4-2 for initializing the
Ultra Low-Power Wake-up module.
DS41202C-page 34
The series resistor provides overcurrent protection for
the RA0 pin and can allow for software calibration of
the time-out (see Figure 4-1). A timer can be used to
measure the charge time and discharge time of the
capacitor. The charge time can then be adjusted to pro-
vide the desired interrupt delay. This technique will
compensate for the affects of temperature, voltage and
component accuracy. The Ultra Low-power Wake-up
peripheral can also be configured as a simple
Programmable Low Voltage Detect or temperature
sensor.
Note:
For more information, refer to AN879,
“Using the Microchip Ultra Low-Power
Wake-up
Module”
(DS00879).
EXAMPLE 4-2:
ULTRA LOW-POWER
WAKE-UP INITIALIZATION
BCF
STATUS,RP0
BSF
PORTA,0
MOVLW
H’7’
MOVWF
CMCON0
BSF
STATUS,RP0
BCF
ANSEL,0
BCF
TRISA,0
CALL
CapDelay
BSF
PCON,ULPWUE ;Enable ULP Wake-up
BSF
IOCA,0
BSF
TRISA,0
MOVLW
B’10001000’ ;Enable interrupt
MOVWF
INTCON
SLEEP
Preliminary
 2004 Microchip Technology Inc.
Application
Note
;Bank 0
;Set RA0 data latch
;Turn off
;comparators
;Bank 1
;RA0 to digital I/O
;Output high to
; charge capacitor
;Select RA0 IOC
;RA0 to input
; and clear flag
;Wait for IOC