ChipFind - документация

Электронный компонент: COP8CCR9

Скачать:  PDF   ZIP

Document Outline

COP8CBR9/COP8CCR9/COP8CDR9
8-Bit CMOS Flash Microcontroller with 32k Memory,
Virtual EEPROM, 10-Bit A/D and Brownout
1.0 General Description
The COP8CBR/CCR/CDR9 Flash microcontrollers are
highly integrated COP8
TM
Feature core devices, with 32k
Flash memory and advanced features including Virtual EE-
PROM, A/D, High Speed Timers, USART, and Brownout
Reset. This single-chip CMOS device is suited for applica-
tions requiring a full featured, in-system reprogrammable
controller with large memory and low EMI. The same device
is used for development, pre-production and volume produc-
tion with a range of COP8 software and hardware develop-
ment tools.
Device included in this datasheet:
Device
Flash Program
Memory
(bytes)
RAM
(bytes)
Brownout
Voltage
I/O
Pins
Packages
Temperature
COP8CBR9
32k
1k
2.7V to 2.9V
37,39,49,
59
44 LLP,
44/68 PLCC,
48/56 TSSOP
-40C to +85C
COP8CCR9
32k
1k
4.17V to 4.5V
37,39,49,
59
44 LLP,
44/68 PLCC,
48/56 TSSOP
-40C to +85C
-40C to +125C
COP8CDR9
32k
1k
No Brownout
37,39,49,
59
44 LLP,
44/68 PLCC,
48/56 TSSOP
-40C to +85C
-40C to +125C
2.0 Features
KEY FEATURES
n
32 kbytes Flash Program Memory with Security Feature
n
Virtual EEPROM using Flash Program Memory
n
1 kbyte volatile RAM
n
10-bit Successive Approximation Analog to Digital
Converter (up to 16 channels)
n
100% Precise Analog Emulation
n
USART with onchip baud generator
n
2.7V 5.5V In-System Programmability of Flash
n
High endurance -100k Read/Write Cycles
n
Superior Data Retention - 100 years
n
Dual Clock Operation with HALT/IDLE Power Save
Modes
n
Three 16-bit timers:
-- Timers T2 and T3 can operate at high speed (50 ns
resolution)
-- Processor Independent PWM mode
-- External Event counter mode
-- Input Capture mode
n
Brown-out Reset (COP8CBR9/CCR9)
OTHER FEATURES
n
Single supply operation:
-- 2.7V5.5V (-40C to +85C)
-- 4.5V5.5V (-40C to +125C)
n
Quiet Design (low radiated emissions)
n
Multi-Input Wake-up with optional interrupts
n
MICROWIRE/PLUS (Serial Peripheral Interface
Compatible)
n
Clock Doubler for 20 MHz operation from 10 MHz
Oscillator, with 0.5 s Instruction Cycle
n
Thirteen multi-source vectored interrupts servicing:
-- External Interrupt
-- USART (2)
-- Idle Timer T0
-- Three Timers (each with 2 interrupts)
-- MICROWIRE/PLUS Serial peripheral interface
-- Multi-Input Wake-up
-- Software Trap
n
Idle Timer with programmable interrupt interval
n
8-bit Stack Pointer SP (stack in RAM)
n
Two 8-bit Register Indirect Data Memory Pointers
n
True bit manipulation
n
WATCHDOG and Clock Monitor logic
n
Software selectable I/O options
-- TRI-STATE
Output/High Impedance Input
-- Push-Pull Output
-- Weak Pull Up Input
n
Schmitt trigger inputs on I/O ports
n
High Current I/Os
n
Temperature range: 40C to +85C and 40C to
+125C (COP8CCR9/CDR9)
n
Packaging: 44 and 68 PLCC, 44 LLP, 48 and 56 TSSOP
n
True In-System, real time emulation and debug tools
available
COP8
TM
is a trademark of National Semiconductor Corporation.
August 2003
COP8CBR9/COP8CCR9/COP8CDR9
8-Bit
CMOS
Flash
Based
Microcontroller
with
32k
Memory
,
V
irtual
EEPROM,
10-Bit
A/D
and
Brownout
2003 National Semiconductor Corporation
DS101374
www.national.com
3.0 Block Diagram
10137401
4.0 Ordering Information
Part Numbering Scheme
COP8
CB
R
9
H
VA
8
Family and
Feature Set
Indicator
Program
Memory
Size
Program
Memory
Type
No. Of Pins
Package
Type
Temperature
CB = Low Brownout Voltage
CC = High Brownout Voltage
CD = No Brownout
R = 32k
9 = Flash
H = 44 Pin
I = 48 Pin
k = 56 Pin
L = 68 Pin
LQ = LLP
MT = TSSOP
VA = PLCC
7 = -40 to +125C
8 = -40 to +85C
COP8CBR9/COP8CCR9/COP8CDR9
www.national.com
2
Table of Contents
1.0 General Description ..................................................................................................................................... 1
2.0 Features ....................................................................................................................................................... 1
3.0 Block Diagram .............................................................................................................................................. 2
4.0 Ordering Information .................................................................................................................................... 2
5.0 Connection Diagrams ................................................................................................................................... 6
6.0 Architectural Overview ............................................................................................................................... 10
6.1 EMI REDUCTION .................................................................................................................................... 10
6.2 IN-SYSTEM PROGRAMMING AND VIRTUAL EEPROM ...................................................................... 10
6.3 DUAL CLOCK AND CLOCK DOUBLER ................................................................................................. 10
6.4 TRUE IN-SYSTEM EMULATION ............................................................................................................ 10
6.5 ARCHITECTURE
................................................................................................................................... 10
6.6 INSTRUCTION SET
............................................................................................................................... 10
6.6.1 Key Instruction Set Features ............................................................................................................. 10
6.6.2 Single Byte/Single Cycle Code Execution
....................................................................................... 10
6.6.3 Many Single-Byte, Multi-Function Instructions .................................................................................. 10
6.6.4 Bit-Level Control ................................................................................................................................ 11
6.6.5 Register Set ....................................................................................................................................... 11
6.7 PACKAGING/PIN EFFICIENCY .............................................................................................................. 11
7.0 Absolute Maximum Ratings ....................................................................................................................... 12
8.0 Electrical Characteristics ............................................................................................................................ 12
9.0 Pin Descriptions ......................................................................................................................................... 18
9.1 EMULATION CONNECTION ................................................................................................................... 20
10.0 Functional Description .............................................................................................................................. 20
10.1 CPU REGISTERS ................................................................................................................................. 20
10.2 PROGRAM MEMORY ........................................................................................................................... 20
10.3 DATA MEMORY .................................................................................................................................... 20
10.4 DATA MEMORY SEGMENT RAM EXTENSION .................................................................................. 21
10.4.1 Virtual EEPROM .............................................................................................................................. 22
10.5 OPTION REGISTER ............................................................................................................................. 22
10.6 SECURITY ............................................................................................................................................ 23
10.7 RESET ................................................................................................................................................... 23
10.7.1 External Reset ................................................................................................................................. 24
10.7.2 On-Chip Brownout Reset ................................................................................................................. 24
10.8 OSCILLATOR CIRCUITS ...................................................................................................................... 26
10.8.1 Oscillator .......................................................................................................................................... 26
................................................................................................................................................................... 0
10.8.2 Clock Doubler .................................................................................................................................. 27
10.9 CONTROL REGISTERS ....................................................................................................................... 27
10.9.1 CNTRL Register (Address X'00EE) ................................................................................................. 27
10.9.2 PSW Register (Address X'00EF) ..................................................................................................... 27
10.9.3 ICNTRL Register (Address X'00E8) ................................................................................................ 27
10.9.4 T2CNTRL Register (Address X'00C6) ............................................................................................. 27
10.9.5 T3CNTRL Register (Address X'00B6) ............................................................................................. 27
10.9.6 HSTCR Register (Address X'00AF) ................................................................................................ 28
10.9.7 ITMR Register (Address X'00CF) .................................................................................................... 28
10.9.8 ENAD Register (Address X'00CB) .................................................................................................. 28
11.0 In-System Programming ........................................................................................................................... 28
11.1 INTRODUCTION ................................................................................................................................... 28
11.2 FUNCTIONAL DESCRIPTION .............................................................................................................. 28
11.3 REGISTERS .......................................................................................................................................... 29
11.3.1 ISP Address Registers ..................................................................................................................... 29
11.3.2 ISP Read Data Register .................................................................................................................. 29
11.3.3 ISP Write Data Register ................................................................................................................... 29
11.3.4 ISP Write Timing Register ................................................................................................................ 29
11.4 MANEUVERING BACK AND FORTH BETWEEN FLASH MEMORY AND BOOT ROM ..................... 30
11.5 FORCED EXECUTION FROM BOOT ROM ......................................................................................... 30
11.6 RETURN TO FLASH MEMORY WITHOUT HARDWARE RESET ....................................................... 31
11.7 MICROWIRE/PLUS ISP ........................................................................................................................ 31
11.8 USER ISP AND VIRTUAL E
2
................................................................................................................ 32
11.9 RESTRICTIONS ON SOFTWARE WHEN CALLING ISP ROUTINES IN BOOT ROM ....................... 34
11.10 FLASH MEMORY DURABILITY CONSIDERATIONS ........................................................................ 34
12.0 Timers ....................................................................................................................................................... 35
COP8CBR9/COP8CCR9/COP8CDR9
www.national.com
3
Table of Contents
(Continued)
12.1 TIMER T0 (IDLE TIMER) ...................................................................................................................... 35
12.1.1 ITMR Register .................................................................................................................................. 36
12.2 TIMER T1, TIMER T2, AND TIMER T3 ................................................................................................ 36
12.2.1 Timer Operating Speeds .................................................................................................................. 36
12.2.2 Mode 1. Processor Independent PWM Mode ................................................................................. 36
12.2.3 Mode 2. External Event Counter Mode ........................................................................................... 37
12.2.4 Mode 3. Input Capture Mode .......................................................................................................... 37
12.3 TIMER CONTROL FLAGS .................................................................................................................... 38
13.0 Power Saving Features ............................................................................................................................ 38
13.1 POWER SAVE MODE CONTROL REGISTER .................................................................................... 39
13.2 OSCILLATOR STABILIZATION ............................................................................................................. 40
13.3 HIGH SPEED MODE OPERATION ...................................................................................................... 40
13.3.1 High Speed Halt Mode .................................................................................................................... 40
13.3.1.1 Entering The High Speed Halt Mode ......................................................................................... 40
13.3.1.2 Exiting The High Speed Halt Mode ........................................................................................... 40
13.3.1.3 HALT Exit Using Reset .............................................................................................................. 40
13.3.1.4 HALT Exit Using Multi-Input Wake-up ....................................................................................... 40
13.3.1.5 Options ....................................................................................................................................... 41
13.3.2 High Speed Idle Mode ..................................................................................................................... 41
13.4 DUAL CLOCK MODE OPERATION ...................................................................................................... 42
13.4.1 Dual Clock HALT Mode ................................................................................................................... 42
13.4.1.1 Entering The Dual Clock Halt Mode .......................................................................................... 42
13.4.1.2 Exiting The Dual Clock Halt Mode ............................................................................................. 42
13.4.1.3 HALT Exit Using Reset .............................................................................................................. 42
13.4.1.4 HALT Exit Using Multi-Input Wake-up ....................................................................................... 42
13.4.1.5 Options ....................................................................................................................................... 42
13.4.2 Dual Clock Idle Mode ...................................................................................................................... 42
13.5 LOW SPEED MODE OPERATION ....................................................................................................... 43
13.5.1 Low Speed HALT Mode ................................................................................................................... 43
13.5.1.1 Entering The Low Speed Halt Mode ......................................................................................... 43
13.5.1.2 Exiting The Low Speed Halt Mode ............................................................................................ 43
13.5.1.3 HALT Exit Using Reset .............................................................................................................. 43
13.5.1.4 HALT Exit Using Multi-Input Wake-up ....................................................................................... 43
13.5.1.5 Options ....................................................................................................................................... 43
13.5.2 Low Speed Idle Mode ...................................................................................................................... 44
13.6 MULTI-INPUT WAKE-UP ...................................................................................................................... 45
14.0 USART ..................................................................................................................................................... 45
14.1 USART CONTROL AND STATUS REGISTERS ................................................................................... 46
14.2 DESCRIPTION OF USART REGISTER BITS ...................................................................................... 46
14.3 ASSOCIATED I/O PINS ........................................................................................................................ 47
14.4 USART OPERATION ............................................................................................................................ 48
14.4.1 Asynchronous Mode ........................................................................................................................ 48
14.4.2 Synchronous Mode .......................................................................................................................... 48
14.5 FRAMING FORMATS ............................................................................................................................ 48
14.6 USART INTERRUPTS .......................................................................................................................... 49
14.7 BAUD CLOCK GENERATION .............................................................................................................. 49
14.8 EFFECT OF HALT/IDLE ....................................................................................................................... 51
14.9 DIAGNOSTIC ........................................................................................................................................ 51
14.10 ATTENTION MODE ............................................................................................................................. 51
14.11 BREAK GENERATION ........................................................................................................................ 51
15.0 A/D Converter ........................................................................................................................................... 51
15.1 OPERATING MODES ........................................................................................................................... 52
15.1.1 A/D Control Register ........................................................................................................................ 52
15.1.1.1 Channel Select ........................................................................................................................... 52
15.1.1.2 Multiplexor Output Select ........................................................................................................... 53
15.1.1.3 Mode Select ............................................................................................................................... 54
15.1.1.4 Prescaler Select ......................................................................................................................... 54
15.1.1.5 Busy Bit ...................................................................................................................................... 54
15.1.2 A/D Result Registers ....................................................................................................................... 54
15.2 A/D OPERATION ................................................................................................................................... 55
15.2.1 Prescaler .......................................................................................................................................... 55
COP8CBR9/COP8CCR9/COP8CDR9
www.national.com
4
Table of Contents
(Continued)
15.3 ANALOG INPUT AND SOURCE RESISTANCE CONSIDERATIONS .................................................. 55
16.0 Interrupts .................................................................................................................................................. 56
16.1 INTRODUCTION ................................................................................................................................... 56
16.2 MASKABLE INTERRUPTS ................................................................................................................... 56
16.3 VIS INSTRUCTION ............................................................................................................................... 57
16.3.1 VIS Execution .................................................................................................................................. 58
16.4 NON-MASKABLE INTERRUPT ............................................................................................................ 59
16.4.1 Pending Flag .................................................................................................................................... 59
16.4.2 Software Trap .................................................................................................................................. 59
16.4.2.1 Programming Example: External Interrupt ................................................................................. 60
16.5 PORT L INTERRUPTS .......................................................................................................................... 61
16.6 INTERRUPT SUMMARY ....................................................................................................................... 61
17.0 WATCHDOG/Clock Monitor ..................................................................................................................... 61
17.1 CLOCK MONITOR ................................................................................................................................ 62
17.2 WATCHDOG/CLOCK MONITOR OPERATION .................................................................................... 62
17.3 WATCHDOG AND CLOCK MONITOR SUMMARY .............................................................................. 63
17.4 DETECTION OF ILLEGAL CONDITIONS ............................................................................................ 63
18.0 MICROWIRE/PLUS .................................................................................................................................. 63
18.1 MICROWIRE/PLUS OPERATION ......................................................................................................... 64
18.1.1 MICROWIRE/PLUS Master Mode Operation .................................................................................. 64
18.1.2 MICROWIRE/PLUS Slave Mode Operation .................................................................................... 64
18.1.2.1 Alternate SK Phase Operation and SK Idle Polarity ................................................................. 65
19.0 Memory Map ............................................................................................................................................ 66
20.0 Instruction Set .......................................................................................................................................... 67
20.1 INTRODUCTION ................................................................................................................................... 67
20.2 INSTRUCTION FEATURES .................................................................................................................. 67
20.3 ADDRESSING MODES ......................................................................................................................... 68
20.3.1 Operand Addressing Modes ............................................................................................................ 68
20.3.2 Tranfer-of-Control Addressing Modes .............................................................................................. 69
20.4 INSTRUCTION TYPES ......................................................................................................................... 69
20.4.1 Arithmetic Instructions ...................................................................................................................... 70
20.4.2 Transfer-of-Control Instructions ....................................................................................................... 70
20.4.3 Load and Exchange Instructions ..................................................................................................... 70
20.4.4 Logical Instructions .......................................................................................................................... 70
20.4.5 Accumulator Bit Manipulation Instructions ....................................................................................... 70
20.4.6 Stack Control Instructions ................................................................................................................ 70
20.4.7 Memory Bit Manipulation Instructions ............................................................................................. 70
20.4.8 Conditional Instructions ................................................................................................................... 70
20.4.9 No-Operation Instruction .................................................................................................................. 70
20.5 REGISTER AND SYMBOL DEFINITION .............................................................................................. 70
20.6 INSTRUCTION SET SUMMARY .......................................................................................................... 72
20.7 INSTRUCTION EXECUTION TIME ...................................................................................................... 73
21.0 Development Support .............................................................................................................................. 76
21.1 TOOLS ORDERING NUMBERS FOR THE COP8 FLASH FAMILY DEVICES ................................... 76
21.2 COP8 TOOLS OVERVIEW ................................................................................................................... 78
21.3 WHERE TO GET TOOLS ..................................................................................................................... 79
22.0 Revision History ....................................................................................................................................... 80
23.0 Physical Dimensions ................................................................................................................................ 83
COP8CBR9/COP8CCR9/COP8CDR9
www.national.com
5