SM39A16M1
8-Bit Micro-controller
16KB with ISP Flash
& 1K+256B RAM embedded
4.8
Interface control register
Mnemonic: IFCON
7
6
5
-
CDPR
-
Address: 8Fh
0
Reset
ISPE
00H
4
-
3
-
2
-
1
-
CDPR: Code protect (Read Only)
ISPE: ISP function enable bit
ISPE = 1, enable ISP function
ISPE = 0, disable ISP function
4.9
PAGESEL (Page Select)
The SM59A16U1 provide two different methods to set Special Function Register (SFR) are as follow:
SFR Method 1 (Indirect Mode): This method is only an SFR page. If you want to use
PWM registers of the Method 2, can be used indirectly addressable setting.
Example: Write a data 0x80h to PWMEN Register in Method 1.
PAGESEL = 0x0h;
// Method 1.
PWMADDR = 0xF5h;
// PWMEN indirect address: 0xF5h (Indirect mode)
// (Refer Page1 Table of the Method 2)
PWMDATA = 0x80h;
// Write data 0x80h to PWMEN.
SFR Method 2 (Page Mode): This method provides two SFR page to set the registers.
Example: Write a data 0x80h to PWMEN Register in Method 2, Page 1.
PAGESEL = 0x3h;
// Method 2, Page 1 (Page mode)
PWMEN = 0x80h;
// Write data 0x80h to PWMEN.
SFR Page Mode Table:
Page_mode
0
0
1
1
Mnemonic: PAGESEL
7
6
5
Page_num
0
1
0
1
SFR Select
SFR Method 1
SFR Method 1
SFR Method 2, Page 0
SFR Method 2, Page 1
Address: BEh
0
Reset
Pagemode
00H
4
3
2
1
Page num
Page_num: This flag is used only in the SFR method 2
0 = page 0 mode
1 = page 1 mode.
Page_mode: This flag is used to select SFR register table.
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M069
Ver C
SM39A16M1
7/31/2013
- 28 -