PIC12CE518-04/SM Microchip Technology, PIC12CE518-04/SM Datasheet - Page 135

no-image

PIC12CE518-04/SM

Manufacturer Part Number
PIC12CE518-04/SM
Description
IC MCU OTP 512X12 W/EE 8-SOIJ
Manufacturer
Microchip Technology
Series
PIC® 12Cr

Specifications of PIC12CE518-04/SM

Core Size
8-Bit
Program Memory Size
768B (512 x 12)
Core Processor
PIC
Speed
4MHz
Peripherals
POR, WDT
Number Of I /o
5
Program Memory Type
OTP
Eeprom Size
16 x 8
Ram Size
25 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
0°C ~ 70°C
Package / Case
8-SOIC (5.3mm Width), 8-SOP, 8-SOEIAJ
Controller Family/series
PIC12
No. Of I/o's
6
Eeprom Memory Size
16Byte
Ram Memory Size
25Byte
Cpu Speed
4MHz
No. Of Timers
1
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT08SO-1 - SOCKET TRANSITION 8SOIC 150/208AC164312 - MODULE SKT FOR PM3 16SOICISPICR1 - ADAPTER IN-CIRCUIT PROGRAMMING309-1048 - ADAPTER 8-SOIC TO 8-DIP309-1047 - ADAPTER 8-SOIC TO 8-DIPAC124001 - MODULE SKT PROMATEII 8DIP/SOIC
Data Converters
-
Connectivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
1997 Microchip Technology Inc.
Example 8-3
RAM only in Bank0 (such as the PIC16C620). The Bank must be tested before saving any of the
user registers. , W_TEMP, must be defined across all banks and must be defined at the same
offset from the bank base address. The user register, STATUS_TEMP, must be defined in Bank0.
The steps of
1.
2.
3.
4.
5.
6.
If additional locations need to be saved before executing the Interrupt Service Routine (ISR)
code, they should be saved after the STATUS register is saved (step 2), and restored before the
STATUS register is restored (step 4).
Example 8-3: Saving the STATUS and W Registers in RAM
Push
RP0CLEAR
;
ISR_Code
;
Pop
Restore_WREG
Test current bank.
Stores the W register regardless of current bank.
Stores the STATUS register in Bank0.
Executes the Interrupt Service Routine (ISR) code.
Restores the STATUS (and bank select bit register).
Restores the W register.
BTFSS
GOTO
BCF
MOVWF
SWAPF
MOVWF
BSF
GOTO
MOVWF
SWAPF
MOVWF
:
: (Interrupt Service Routine (ISR) )
:
SWAPF
MOVWF
BTFSS
GOTO
BCF
SWAPF
SWAPF
BSF
RETFIE
SWAPF
SWAPF
RETFIE
Example
stores and restores the STATUS and W registers for devices with general purpose
(for Devices with General Purpose RAM Only in Bank0)
STATUS, RP0
RP0CLEAR
STATUS, RP0
W_TEMP
STATUS, W
STATUS_TEMP
STATUS_TEMP, 1
ISR_Code
W_TEMP
STATUS, W
STATUS_TEMP
STATUS_TEMP, W
STATUS
STATUS, RP0
Restore_WREG
STATUS, RP0
W_TEMP, F
W_TEMP, W
STATUS, RP0
W_TEMP, F
W_TEMP, W
8-3:
Section 8. Interrupts
; In Bank 0?
; YES,
; NO, Force to Bank 0
; Store W register
; Swap STATUS register and
;
; Set the bit that corresponds to RP0
; Push completed
; Store W register
; Swap STATUS register and
;
; Restore Status register
;
; In Bank 1?
; NO,
; YES, Force Bank 0
; Restore W register
;
; Back to Bank 1
; POP completed
; Restore W register
;
; POP completed
store in STATUS_TEMP
store in STATUS_TEMP
DS31008A-page 8-13
8

Related parts for PIC12CE518-04/SM