8-Bit Touch Key Flash MCU
BS83B08-3/BS83B12-3
BS83B16-3/BS83B16G-3
BS83C24-3
Revision: 1.30
Date: September 22, 2011
Contents
Table of Contents
Technical Document ...........................................................................6
Features ...............................................................................................6
CPU Features ........................................................................................................6
Peripheral Features ................................................................................................6
General Description ............................................................................7
Selection Table ....................................................................................7
Block Diagram .....................................................................................8
Pin Description ....................................................................................9
BS83B08-3/B12-3/B16-3 ........................................................................................9
BS83C24-3...........................................................................................................10
Pad Assignment for BS83B16G-3 ....................................................11
Pad Coordinates for BS83B16G-3....................................................11
Absolute Maximum Ratings .............................................................12
D.C. Characteristics ..........................................................................12
A.C. Characteristics ..........................................................................13
Power-on Reset Characteristics ......................................................14
Oscillator Temperature/Frequency Characteristics .......................15
System Architecture .........................................................................18
Clocking and Pipelining ........................................................................................18
Program Counter..................................................................................................19
Stack ....................................................................................................................19
Arithmetic and Logic Unit
-
ALU ...........................................................................20
Flash Program Memory ....................................................................20
Structure...............................................................................................................20
Special Vectors.....................................................................................................21
Look-up Table.......................................................................................................21
Table Program Example.....................................................................................22
In Circuit Programming.........................................................................................23
RAM Data Memory.............................................................................24
Structure...............................................................................................................24
Special Function Register Description ...........................................24
Indirect Addressing Registers
-
IAR0, IAR1..........................................................24
Rev. 1.30
2
September 22, 2011
Contents
Memory Pointers
-
MP0, MP1 ..............................................................................28
Bank Pointer
-
BP ................................................................................................28
Accumulator
-
ACC ..............................................................................................29
Program Counter Low Register
-
PCL..................................................................29
Look-up Table Registers
-
TBLP, TBHP, TBLH.....................................................29
Status Register
-
STATUS ...................................................................................30
EEPROM Data Memory .....................................................................31
EEPROM Data Memory Structure ........................................................................31
Reading Data from the EEPROM .........................................................................34
Writing Data to the EEPROM ...............................................................................34
Write Protection ....................................................................................................34
EEPROM Interrupt ...............................................................................................34
Programming Considerations ...............................................................................35
Programming Examples .......................................................................................35
Oscillator............................................................................................36
Oscillator Overview...............................................................................................36
System Clock Configurations................................................................................36
Internal High Speed RC Oscillator
-
HIRC............................................................36
Internal Low Speed RC Oscillator
-
LIRC .............................................................37
Operating Modes and System Clocks .............................................38
System Clocks......................................................................................................38
Control Register ...................................................................................................39
System Operation Modes .....................................................................................40
Operating Mode Switching....................................................................................41
NORMAL Mode to SLOW Mode Switching...........................................................42
SLOW Mode to NORMAL Mode Switching...........................................................42
Entering the SLEEP Mode....................................................................................42
Entering the IDLE0 Mode .....................................................................................43
Entering the IDLE1 Mode .....................................................................................43
Standby Current Considerations...........................................................................43
Wake-up...............................................................................................................44
Programming Considerations ...............................................................................44
Watchdog Timer ................................................................................45
Watchdog Timer Clock Source .............................................................................45
Watchdog Timer Control Register.........................................................................45
Watchdog Timer Operation...................................................................................45
Reset and Initialisation .....................................................................47
Reset Functions ...................................................................................................47
Reset Initial Conditions .........................................................................................50
Input/Output Ports.............................................................................60
I/O Register List....................................................................................................60
Rev. 1.30
3
September 22, 2011
Contents
Pull-high Resistors................................................................................................62
Port A Wake-up ....................................................................................................63
I/O Port Control Register ......................................................................................64
I/O Pin Structures .................................................................................................66
Programming Considerations ...............................................................................66
Timer/Event Counters .......................................................................67
Configuring the Timer/Event Counter Input Clock Source .....................................68
Timer Register
-
TMR, TMR0, TMR1L, TMR1H ...................................................68
Timer Control Register
-
TMRC, TMR0C, TMR1C ...............................................68
8-Bit Timer/Event Counter Operating Mode ..........................................................70
16-Bit Timer/Event Counter 1 Operating Modes -- BS83C24-3.............................70
Prescaler ..............................................................................................................73
PFD Function .......................................................................................................73
I/O Interfacing.......................................................................................................73
Programming Considerations ...............................................................................73
Timer Program Example-Timer/Event Counter 0 ..................................................74
Touch Key Function ..........................................................................75
Touch Key Structure .............................................................................................75
Touch Key Register Definition...............................................................................76
Touch Key Operation ............................................................................................79
Touch Key Interrupt ..............................................................................................80
Programming Considerations ...............................................................................80
Serial Interface Module
-
SIM...........................................................81
SPI Interface.........................................................................................................81
I
2
C Interface .........................................................................................................87
Interrupts............................................................................................96
Interrupt Registers ................................................................................................96
Interrupt Register Contents...................................................................................97
Interrupt Operation .............................................................................................104
External Interrupt ................................................................................................107
Multi-function Interrupt ........................................................................................107
Time Base Interrupts ..........................................................................................108
Timer/Event Counter Interrupt ............................................................................109
EEPROM Interrupt .............................................................................................109
Touch Key Interrupts...........................................................................................109
SIM Interrupt.......................................................................................................109
Interrupt Wake-up Function.................................................................................110
Programming Considerations .............................................................................110
Application Circuits.........................................................................111
Instruction Set .................................................................................112
Introduction.........................................................................................................112
Instruction Timing................................................................................................112
Rev. 1.30
4
September 22, 2011
Contents
Moving and Transferring Data.............................................................................112
Arithmetic Operations .........................................................................................112
Logical and Rotate Operations............................................................................112
Branches and Control Transfer ...........................................................................113
Bit Operations.....................................................................................................113
Table Read Operations .......................................................................................113
Other Operations ................................................................................................113
Instruction Set Summary.....................................................................................114
Instruction Definition ......................................................................116
Package Information .......................................................................126
16-pin NSOP (150mil) Outline Dimensions .........................................................126
16-pin SSOP (150mil) Outline Dimensions .........................................................127
20-pin SOP (300mil) Outline Dimensions............................................................128
20-pin SSOP (150mil) Outline Dimensions .........................................................129
24-pin SOP (300mil) Outline Dimensions............................................................130
24-pin SSOP (150mil) Outline Dimensions .........................................................131
28-pin SOP (300mil) Outline Dimensions............................................................132
28-pin SSOP (150mil) Outline Dimensions .........................................................133
44-pin QFP (10mm´10mm) Outline Dimensions ................................................134
Reel Dimensions ................................................................................................135
Carrier Tape Dimensions ....................................................................................136
Rev. 1.30
5
September 22, 2011