SM59A16U1
8-Bit Micro-controller
64KB with ISP Flash
& 6K+256B RAM embedded
4.14
Read a data from PWM register in SFR Method 2 (Page Mode):
Example: Read the PWMSEV data in SFR Method 2, Page 1.
PAGESEL = 0x3h;
// Method 2, Page 1 (Page mode)
Val = PWMSEV;
// Val: Read data from PWMSEV.
The PWM Method1 and PWM Method 2 is same result.
USB Address Register( USBADDR )
Mnemonic: USBADDR
7
6
5
Address: A6h
0
Reset
00H
4
3
USBADDR[7:0]
2
1
USBADDR: USB address register and can only use in SFR method 1 (Indirect mode).
USBADDR and USBDATA need to be used together.
4.15
USB Data Register( USBDATA )
Mnemonic: USBDATA
7
6
5
Address: A7h
0
Reset
00H
4
3
USBDATA[7:0]
2
1
USBDATA: USB data register and can only use in SFR method 1 (Indirect mode).
USBDATA and USBADDR need to be used together.
Write data to USB Register in SFR Method 1 (Indirect Mode):
Example: Write data 0x1h to UCTRL1 Register in SFR Method 1.
PAGESEL = 0x0h;
// Method 1.
// (Refer Page1 Table of the Method 2)
USBDATA = 0x1h;
// Write data 0x01h to UCTRL1.
USBADDR = 0xFEh; // UCTRL1 indirect address: 0xFEh (Indirect mode)
Write a data to USB Register in SFR Method 2 (Page Mode):
Example: Write data 0x1h to UCTRL1 Register in SFR Method 2, Page 1.
PAGESEL = 0x3h;
// Method 2, Page 1 (Page mode)
UCTRL1 = 0x01h;
// Write data 0x01h to UCTRL1.
The USB Method1 and USB Method 2 is same result.
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M071
Ver A
SM59A16U1
04/12/2013
- 39 -