© 2005 Ubicom, Inc. All rights reserved.
- 2 -
www.ubicom.com
SX20AC/SX28AC
Table of Contents
1.0
Product Overview  . . . . . . . . . . . . . . . . . . . . . . .  1
1.1
Introduction   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
1.2
Key Features  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
1.3
Architecture  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
1.3.1
The Virtual Peripheral Concept  . . . . . . . . . . . . . . . . . . . . . 4
1.3.2
The Communications Controller . . . . . . . . . . . . . . . . . . . . . 4
1.4
Programming and Debugging Support   . . . . . . . . . . .  4
1.5
Applications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
2.0
Connection Diagrams  . . . . . . . . . . . . . . . . . . . .  5
2.1
Pin Assignments   . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
2.2
Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
2.3
Part Numbering  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
3.0
Port Descriptions   . . . . . . . . . . . . . . . . . . . . . . .  7
3.1
Reading and Writing the Ports . . . . . . . . . . . . . . . . . .  7
3.1.1
Read-Modify-Write Considerations   . . . . . . . . . . . . . . . . . . 9
3.2
Port Configuration  . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
3.2.1
MODE Register  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.2
Port Configuration Registers  . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.3
Port Configuration Upon Reset   . . . . . . . . . . . . . . . . . . . . 10
4.0
Special-Function Registers  . . . . . . . . . . . . . .  11
4.1
PC Register (02h)   . . . . . . . . . . . . . . . . . . . . . . . . . .  11
4.2
STATUS Register (03h)  . . . . . . . . . . . . . . . . . . . . . .  11
4.3
OPTION Register . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
5.0
Device Configuration Registers . . . . . . . . . . .  13
5.1
FUSE Word (Read/Program at FFFh in
main memory map)  . . . . . . . . . . . . . . . . . . . . . . . . .  13
5.2
FUSEX Word (Read/Program via Programming 
Command)  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  14
5.3
DEVICE Word (Hard-Wired Read-Only)   . . . . . . . . .  14
6.0
Memory Organization  . . . . . . . . . . . . . . . . . . .  15
6.1
Program Memory  . . . . . . . . . . . . . . . . . . . . . . . . . . .  15
6.1.1
Program Counter  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.1.2
Subroutine Stack  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2
Data Memory  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  15
6.2.1
File Select Register (04h)   . . . . . . . . . . . . . . . . . . . . . . . . 15
7.0
Power Down Mode   . . . . . . . . . . . . . . . . . . . . .  17
7.1
Multi-Input Wakeup  . . . . . . . . . . . . . . . . . . . . . . . . .  17
7.2
Port B MIWU/Interrupt Configuration  . . . . . . . . . . . .  18
8.0
Interrupt Support . . . . . . . . . . . . . . . . . . . . . . .  19
9.0
Oscillator Circuits  . . . . . . . . . . . . . . . . . . . . . .  21
9.1
XT, LP or HS modes   . . . . . . . . . . . . . . . . . . . . . . . .  21
9.2
External RC Mode  . . . . . . . . . . . . . . . . . . . . . . . . . .  23
9.3
Internal RC Mode . . . . . . . . . . . . . . . . . . . . . . . . . . .  23
10.0 Real Time Clock (RTCC) / Watchdog Timer . . 23
10.1 RTCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  23
10.2 Watchdog Timer   . . . . . . . . . . . . . . . . . . . . . . . . . . .  24
10.3 The Prescaler   . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  24
11.0 Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
12.0 Reset  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
13.0 Brown-Out Detector . . . . . . . . . . . . . . . . . . . . . 28
14.0 Register States Upon Different
Reset Operations  . . . . . . . . . . . . . . . . . . . . . . . 29
15.0 Instruction Set  . . . . . . . . . . . . . . . . . . . . . . . . . 30
15.1 Instruction Set Features . . . . . . . . . . . . . . . . . . . . . .  30
15.2 Instruction Execution  . . . . . . . . . . . . . . . . . . . . . . . .  30
15.3 Addressing Modes  . . . . . . . . . . . . . . . . . . . . . . . . . .  30
15.4 RAM Addressing  . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
15.5 The Bank Instruction  . . . . . . . . . . . . . . . . . . . . . . . .  31
15.6 Bit Manipulation  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
15.7 Input/Output Operation   . . . . . . . . . . . . . . . . . . . . . .  31
15.8 Increment/Decrement   . . . . . . . . . . . . . . . . . . . . . . .  31
15.9 Loop Counting and Data Pointing Testing  . . . . . . . .  31
15.10 Branch and Loop Call Instructions . . . . . . . . . . . . . .  31
15.10.1 Jump Operation   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
15.10.2 Page Jump Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
15.10.3 Call Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
15.10.4 Page Call Operation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
15.11 Return Instructions . . . . . . . . . . . . . . . . . . . . . . . . . .  32
15.12 Subroutine Operation . . . . . . . . . . . . . . . . . . . . . . . .  33
15.12.1 Push Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
15.12.2 Pop Operation   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
15.13 Comparison and Conditional Branch Instructions  . .  34
15.14 Logical Instruction  . . . . . . . . . . . . . . . . . . . . . . . . . .  34
15.15 Shift and Rotate Instructions  . . . . . . . . . . . . . . . . . .  34
15.16 Complement and SWAP  . . . . . . . . . . . . . . . . . . . . .  34
15.17 Key to Abbreviations and Symbols   . . . . . . . . . . . . .  34
16.0 Instruction Set Summary Table   . . . . . . . . . . . 35
16.1 Equivalent Assembler Mnemonics . . . . . . . . . . . . . .  38
17.0 Electrical Characteristics   . . . . . . . . . . . . . . . . 39
17.1 Absolute Maximum Ratings  . . . . . . . . . . . . . . . . . . .  39
17.2 DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . .  40
17.3 AC Characteristics  . . . . . . . . . . . . . . . . . . . . . . . . . .  41
17.4 Comparator DC and AC Specifications  . . . . . . . . . .  41
17.5 Typical Performance Characteristics  . . . . . . . . . . . .  42
18.0 Package Dimensions  . . . . . . . . . . . . . . . . . . . . 45