SN8P2604
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 103
Version 1.1
11.5.5.3 PEDGE
P00G[1:0] of PEDGE register definition is different from S8KD-2 ICE. ICE emulation and real chip PEDGE function are
different.
PEDGE
P00G1
P00G0
SN8P2604
S8KD-2 ICE
0
0
Reserved
Reserved
0
1
Rising Edge
Falling Edge
1
0
Falling Edge
Rising Edge
1
1
Bi-Direction Bi-Direction
SONIX provides “@P00_EDGE” macro to emulate real chip PEDGE function in ICE. The ICE_MODE must be 1 for
ICE Emulation. After ICE emulation, set ICE_MODE as 0 and compile again to get SN8 file for real chip.
Syntax: @P00_EDGE
Val
Val: 1 = Rising edge. 2 = Falling edge. 3 = Level change (bi-direction).
Example: Set P0.0 interrupt trigger as rising edge and ICE emulation.
CHIP SN8P2604
.DATA
ICE_MODE
EQU
1
; Set ICE mode.
INCLUDESTD SN8P2X_ICE.H
.CODE
User
program…
@P00_EDGE
1
; Set P0.0 interrupt trigger as rising edge.
B0BSET
FP00IEN
…
Example: Set P0.0 interrupt trigger as falling edge and for real chip “SN8”.
CHIP SN8P2604
.DATA
ICE_MODE
EQU
0
; Set real chip mode.
INCLUDESTD SN8P2X_ICE.H
.CODE
User
program…
@P00_EDGE
2
; Set P0.0 interrupt trigger as falling edge.
B0BSET
FP00IEN
…