
2002 Ubicom, Inc. All rights reserved.
- 2 -
www.ubicom.com
SX48BD/SX52BD
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
Connection Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.1
Pin Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . .5
2.2
Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . .6
2.3
Part Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Port Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.1
Reading and Writing the Ports . . . . . . . . . . . . . . . . .8
3.2
Read-Modify-Write Considerations . . . . . . . . . . . .11
3.3
Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . .11
3.3.1
MODE Register . . . . . . . . . . . . . . . . . . .11
3.3.2
Port Configuration Registers . . . . . . . . .13
3.3.3
Port Configuration Upon Power-Up . . . .13
Special-Function Registers . . . . . . . . . . . . . . . . . . . . . . . . .14
4.1
PC Register (02h) . . . . . . . . . . . . . . . . . . . . . . . . .14
4.2
STATUS Register (03h) . . . . . . . . . . . . . . . . . . . . .14
4.3
OPTION Register . . . . . . . . . . . . . . . . . . . . . . . . . .15
4.4
DEVICE CONFIGURATION AND ID REGISTERS 15
4.5
FUSE Word (Read/Program via programming
command)
4.6
FUSEX Word (Read/Program via Programming
Command)
4.7
DEVICE ID Word (Hard-Wired Read-Only Via
Programming Command)- Part ID Code . . . . . . . .17
4.8
User Code ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
5.1
Program Memory . . . . . . . . . . . . . . . . . . . . . . . . . .18
5.1.1
Program Counter . . . . . . . . . . . . . . . . . .18
5.1.2
Subroutine Stack . . . . . . . . . . . . . . . . . .18
5.2
Data Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
5.2.1
Addressing Modes/FSR . . . . . . . . . . . . .18
5.2.2
Register Access Examples . . . . . . . . . .20
Power Down Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
6.1
Multi-Input Wakeup . . . . . . . . . . . . . . . . . . . . . . . .21
6.2
Port B MIWU/Interrupt Configuration . . . . . . . . . . .22
Interrupt Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Oscillator Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
8.1
XT, LP or HS modes . . . . . . . . . . . . . . . . . . . . . . .25
8.2
External RC Mode . . . . . . . . . . . . . . . . . . . . . . . . .25
8.3
Internal RC Mode . . . . . . . . . . . . . . . . . . . . . . . . . .26
Real Time Clock/Counter (RTCC)/Watchdog Timer . . . . . .27
9.1
RTCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
9.2
Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . .27
9.3
The Prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
2.0
3.0
4.0
16
17
5.0
6.0
7.0
8.0
9.0
10.0
Multi-Function Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
10.1
Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . .29
10.2
Timer Operating Modes . . . . . . . . . . . . . . . . . . . . .30
10.2.1
PWM Mode . . . . . . . . . . . . . . . . . . . . . .30
10.2.2
Software Timer Mode . . . . . . . . . . . . . . .30
10.2.3
External Event Mode . . . . . . . . . . . . . . .30
10.2.4
Capture/Compare Mode . . . . . . . . . . . . .31
10.3
Timer Pin Assignments . . . . . . . . . . . . . . . . . . . . .31
10.4
Timer Control Registers . . . . . . . . . . . . . . . . . . . . .31
Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Brown-Out Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Register States Upon Different Reset Conditions . . . . . . .40
Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
15.1
Instruction Set Features . . . . . . . . . . . . . . . . . . . . .41
15.2
Instruction Execution . . . . . . . . . . . . . . . . . . . . . . .41
15.3
Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . .42
15.4
The Bank Instruction . . . . . . . . . . . . . . . . . . . . . . .42
15.5
Bit Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . .42
15.6
Input/Output Operation . . . . . . . . . . . . . . . . . . . . . .42
15.6.1
Read-Modify-Write Considerations . . . .42
15.7
Increment/Decrement . . . . . . . . . . . . . . . . . . . . . . .42
15.8
Loop Counting and Data Pointing Testing . . . . . . .42
15.9
Branch and Loop Call Instructions . . . . . . . . . . . . .43
15.9.1
Jump Operation . . . . . . . . . . . . . . . . . . .43
15.9.2
Page Jump Operation . . . . . . . . . . . . . .43
15.9.3
Call Operation . . . . . . . . . . . . . . . . . . . .43
15.9.4
Page Call Operation . . . . . . . . . . . . . . . .43
15.10
Return Instructions . . . . . . . . . . . . . . . . . . . . . . . . .43
15.11
Subroutine Operation . . . . . . . . . . . . . . . . . . . . . . .44
15.11.1
Push Operation . . . . . . . . . . . . . . . . . . .44
15.11.2
Pop Operation . . . . . . . . . . . . . . . . . . . .44
15.12
Comparison and Conditional Branch Instructions .45
15.13
Logical Instruction . . . . . . . . . . . . . . . . . . . . . . . . .45
15.14
Shift and Rotate Instructions . . . . . . . . . . . . . . . . .45
15.15
Complement and SWAP . . . . . . . . . . . . . . . . . . . .45
15.16
Key to Abbreviations and Symbols . . . . . . . . . . . . .45
Instruction Set Summary Table . . . . . . . . . . . . . . . . . . . . . .46
16.1
Equivalent Assembler Mnemonics . . . . . . . . . . . . .49
Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . .50
17.1
Absolute Maximum Ratings (beyond which
permanent damage may occur)
17.2
DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . .51
17.3
AC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . .52
17.4
Comparator DC and AC Specifications . . . . . . . . .54
17.7
Typical Performance Characteristics (Room
Temperature) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Package Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
11.0
12.0
13.0
14.0
15.0
16.0
17.0
50
18.0