전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

PIC16F84A-04/PSQTP 데이터시트(PDF) 32 Page - Microchip Technology

부품명 PIC16F84A-04/PSQTP
상세설명  18-pin Enhanced FLASH/EEPROM 8-bit Microcontroller
PDF  88 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  MICROCHIP [Microchip Technology]
홈페이지  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F84A-04/PSQTP 데이터시트(HTML) 32 Page - Microchip Technology

Back Button PIC16F84A-04/PSQTP Datasheet HTML 28Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 29Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 30Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 31Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 32Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 33Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 34Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 35Page - Microchip Technology PIC16F84A-04/PSQTP Datasheet HTML 36Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 88 page
background image
PIC16F84A
DS35007B-page 30
© 2001 Microchip Technology Inc.
6.9
Context Saving During Interrupts
During an interrupt, only the return PC value is saved
on the stack. Typically, users wish to save key register
values during an interrupt (e.g., W register and
STATUS register). This is implemented in software.
The code in Example 6-1 stores and restores the
STATUS and W register’s values. The user defined
registers, W_TEMP and STATUS_TEMP are the tem-
porary storage locations for the W and STATUS
registers values.
Example 6-1 does the following:
a)
Stores the W register.
b)
Stores the STATUS register in STATUS_TEMP.
c)
Executes the Interrupt Service Routine code.
d)
Restores the STATUS (and bank select bit)
register.
e)
Restores the W register.
EXAMPLE 6-1:
SAVING STATUS AND W REGISTERS IN RAM
6.10
Watchdog Timer (WDT)
The Watchdog Timer is a free running On-Chip RC
Oscillator which does not require any external
components. This RC oscillator is separate from the
RC oscillator of the OSC1/CLKIN pin. That means that
the WDT will run even if the clock on the OSC1/CLKIN
and OSC2/CLKOUT pins of the device has been
stopped, for example, by execution of a SLEEP
instruction. During normal operation, a WDT time-out
generates a device RESET. If the device is in SLEEP
mode, a WDT wake-up causes the device to wake-up
and continue with normal operation. The WDT can be
permanently disabled by programming configuration bit
WDTE as a '0' (Section 6.1).
6.10.1
WDT PERIOD
The WDT has a nominal time-out period of 18 ms, (with
no
prescaler).
The
time-out
periods
vary
with
temperature, VDD and process variations from part to
part (see DC specs). If longer time-out periods are
desired, a prescaler with a division ratio of up to 1:128
can be assigned to the WDT under software control by
writing to the OPTION_REG register. Thus, time-out
periods up to 2.3 seconds can be realized.
The CLRWDT and SLEEP instructions clear the WDT
and the postscaler (if assigned to the WDT) and pre-
vent it from timing out and generating a device
RESET condition.
The TO bit in the STATUS register will be cleared upon
a WDT time-out.
PUSH
MOVWF
W_TEMP
; Copy W to TEMP register,
SWAPF
STATUS,
W
; Swap status to be saved into W
MOVWF
STATUS_TEMP
; Save status to STATUS_TEMP register
ISR
:
:
:
; Interrupt Service Routine
:
; should configure Bank as required
:;
POP
SWAPF
STATUS_TEMP,W
; Swap nibbles in STATUS_TEMP register
; and place result into W
MOVWF
STATUS
; Move W into STATUS register
; (sets bank to original state)
SWAPF
W_TEMP,
F
; Swap nibbles in W_TEMP and place result in W_TEMP
SWAPF
W_TEMP,
W
; Swap nibbles in W_TEMP and place result into W



Html Pages

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 32 33 34 35 36 37 38 39 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


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com