PIC12CE674 Datasheet

  • PIC12CE674

  • 8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...

  • 1264.35KB

  • 129页

  • Microchip   Microchip

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC12CE67X
9.5.1
TMR0 INTERRUPT
9.6
Context Saving During Interrupts
An over铿俹w (FFh
鈫?/div>
00h) in the TMR0 register will set
铿俛g bit T0IF (INTCON<2>). The interrupt can be
enabled/disabled by setting/clearing enable bit T0IE
(INTCON<5>). (Section 7.0)
9.5.2
INT INTERRUPT
During an interrupt, only the return PC value is saved
on the stack. Typically, users may wish to save key reg-
isters during an interrupt i.e., W register and STATUS
register. This will have to be implemented in software.
Example 9-1 store and restore the STATUS and W
registers. The register, W_TEMP, must be de铿乶ed in
both banks and must be de铿乶ed at the same offset
from the bank base address (i.e., if W_TEMP is
de铿乶ed at 0x20 in bank 0, it must also be de铿乶ed at
0xA0 in bank 1).
The example:
a)
b)
c)
d)
e)
Stores the W register.
Stores the STATUS register in bank 0.
Executes the ISR code.
Restores the STATUS register (and bank select
bit).
Restores the W register.
External interrupt on GP2/INT pin is edge triggered:
either rising if bit INTEDG (OPTION<6>) is set, or fall-
ing, if the INTEDG bit is clear. When a valid edge
appears on the GP2/INT pin, 铿俛g bit INTF
(INTCON<1>) is set. This interrupt can be disabled by
clearing enable bit INTE (INTCON<4>). Flag bit INTF
must be cleared in software in the interrupt service rou-
tine before re-enabling this interrupt. The INT interrupt
can wake-up the processor from SLEEP, if bit INTE was
set prior to going into SLEEP. The status of global inter-
rupt enable bit GIE decides whether or not the proces-
sor branches to the interrupt vector following wake-up.
See Section 9.8 for details on SLEEP mode.
9.5.3
GPIO INTCON CHANGE
An input change on GP3, GP1 or GP0 sets 铿俛g bit
GPIF (INTCON<0>). The interrupt can be enabled/dis-
abled by setting/clearing enable bit GPIE
(INTCON<3>). (Section 5.1)
EXAMPLE 9-1:
MOVWF
SWAPF
BCF
MOVWF
:
:(ISR)
:
SWAPF
MOVWF
SWAPF
SWAPF
SAVING STATUS AND W REGISTERS IN RAM
W_TEMP
STATUS,W
STATUS,RP0
STATUS_TEMP
;Copy W to TEMP
;Swap status to
;Change to bank
;Save status to
register, could be bank one or zero
be saved into W
zero, regardless of current bank
bank zero STATUS_TEMP register
STATUS_TEMP,W
STATUS
W_TEMP,F
W_TEMP,W
;Swap STATUS_TEMP register into W
;(sets bank to original state)
;Move W into STATUS register
;Swap W_TEMP
;Swap W_TEMP into W
DS40181B-page 56
Preliminary
1998 Microchip Technology Inc.

PIC12CE674相关型号PDF文件下载

  • 型号
    版本
    描述
    厂商
    下载
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with EEPROM Data Memory
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    Microcontroller
    MICROCHIP
  • 英文版
    Microcontroller 
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM-Based 8-Bit CMOS Microcontroller
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    ETC
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    28-Pin Programmable Mixed Signal Controller
    Microchip
  • 英文版
    EPROM Memory Programming Specification
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM/ROM-Based 8-Bit CMOS Microcontroller Series
    MICROCHIP

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!