N79E825A/824A/823A/822A Data Sheet
8-BIT MICROCONTROLLER
Table of Contents-
1
2
3
4
5
6
GENERAL DESCRIPTION ......................................................................................................... 4
FEATURES ................................................................................................................................. 5
PARTS INFORMATION LIST ..................................................................................................... 6
3.1
Lead Free (RoHS) Parts information list......................................................................... 6
PIN CONFIGURATION ............................................................................................................... 7
PIN DESCRIPTION..................................................................................................................... 8
FUNCTIONAL DESCRIPTION.................................................................................................... 9
6.1
On-Chip Flash EPROM .................................................................................................. 9
6.2
I/O Ports.......................................................................................................................... 9
6.3
Serial I/O ......................................................................................................................... 9
6.4
Timers ............................................................................................................................. 9
6.5
Interrupts......................................................................................................................... 9
6.6
Data Pointers .................................................................................................................. 9
6.7
Architecture................................................................................................................... 10
6.7.1
6.7.2
6.7.3
6.7.4
6.7.5
6.7.6
ALU ................................................................................................................................10
Accumulator ...................................................................................................................10
B Register.......................................................................................................................10
Program Status Word: ....................................................................................................10
Scratch-pad RAM ...........................................................................................................10
Stack Pointer ..................................................................................................................11
7
8
9
10
11
6.8
Power Management...................................................................................................... 11
MEMORY ORGANIZATION...................................................................................................... 12
7.1
Program Memory (on-chip Flash) ................................................................................. 12
7.2
Data Memory ................................................................................................................ 12
7.3
Register Map................................................................................................................. 13
7.4
Working Registers......................................................................................................... 15
7.5
Bit addressable Locations............................................................................................. 15
7.6
Stack ............................................................................................................................. 15
SPECIAL FUNCTION REGISTERS ......................................................................................... 16
INSTRUCTION SET.................................................................................................................. 47
9.1
Instruction Timing.......................................................................................................... 56
POWER MANAGEMENT.......................................................................................................... 59
10.1 Idle Mode ...................................................................................................................... 59
10.2 Power Down Mode ....................................................................................................... 59
RESET CONDITIONS............................................................................................................... 61
11.1 Sources of reset............................................................................................................ 61
11.1.1
External Reset ..............................................................................................................61
-1-
Publication Release Date: Aug 5, 2010
Revision A02
N79E825A/824A/823A/822A Data Sheet
11.1.2
11.1.3
Power-On Reset (POR)................................................................................................61
Watchdog Timer Reset.................................................................................................61
12
13
11.2 Reset State ................................................................................................................... 61
INTERRUPTS ........................................................................................................................... 66
12.1 Interrupt Sources .......................................................................................................... 66
12.2 Priority Level Structure ................................................................................................. 68
12.3 Response Time............................................................................................................. 69
12.4 Interrupt Inputs.............................................................................................................. 70
PROGRAMMABLE TIMERS/COUNTERS ............................................................................... 72
13.1 Timer/Counters 0 & 1.................................................................................................... 72
13.1.1
13.1.2
13.1.3
13.1.4
13.1.5
Time-Base Selection ....................................................................................................72
Mode 0 .........................................................................................................................72
Mode 1 .........................................................................................................................73
Mode 2 .........................................................................................................................74
Mode 3 .........................................................................................................................74
14
15
16
17
18
19
20
21
22
23
NVM MEMORY ......................................................................................................................... 76
WATCHDOG TIMER................................................................................................................. 77
15.1 WATCHDOG CONTROL.............................................................................................. 78
15.2 CLOCK CONTROL of Watchdog.................................................................................. 79
SERIAL PORT (UART) ............................................................................................................. 80
16.1 MODE 0 ........................................................................................................................ 80
16.2 MODE 1 ........................................................................................................................ 81
16.3 MODE 2 ........................................................................................................................ 83
16.4 MODE 3 ........................................................................................................................ 84
16.5 Framing Error Detection ............................................................................................... 85
16.6 Multiprocessor Communications................................................................................... 85
TIME ACCESS PROCTECTION .............................................................................................. 87
KEYBOARD INTERRUPT (KBI) ............................................................................................... 90
ANALOG COMPARATORS ...................................................................................................... 91
I/O PORT CONFIGURATION ................................................................................................... 92
20.1 Quasi-Bidirectional Output Configuration ..................................................................... 92
20.2 Open Drain Output Configuration ................................................................................. 93
20.3 Push-Pull Output Configuration .................................................................................... 94
20.4 Input Only Configuration ............................................................................................... 94
OSCILLATOR ........................................................................................................................... 95
21.1 On-Chip RC Oscillator Option....................................................................................... 95
21.2 External Clock Input Option .......................................................................................... 96
21.3 CPU Clock Rate select ................................................................................................. 96
POWER MONITORING FUNCTION ........................................................................................ 97
22.1 Power On Detect........................................................................................................... 97
22.2 Brownout Detect ........................................................................................................... 97
PULSE-WIDTH-MODULATED (PWM) OUTPUTS ................................................................... 98
-2-
N79E825A/824A/823A/822A Data Sheet
24
25
ANALOG-TO-DIGITAL CONVERTER .................................................................................... 102
24.1 ADC Resolution and Analog Supply: .......................................................................... 103
I2C SERIAL CONTROL .......................................................................................................... 105
25.1 SIO Port ...................................................................................................................... 105
25.2 The I2C Control Registers: ......................................................................................... 106
25.2.1
25.2.2
25.2.3
25.2.4
25.2.5
The Address Registers, I2ADDR ................................................................................106
The Data Register, I2DAT ..........................................................................................106
The Control Register, I2CON .....................................................................................107
The Status Register, I2STATUS.................................................................................107
The I2C Clock Baud Rate Bits, I2CLK ........................................................................107
Master Transmitter Mode ...........................................................................................108
Master Receiver Mode ...............................................................................................108
Slave Receiver Mode .................................................................................................108
Slave Transmitter Mode .............................................................................................109
25.3
Modes of Operation .................................................................................................... 108
25.3.1
25.3.2
25.3.3
25.3.4
26
27
28
29
30
25.4 Data Transfer Flow in Five Operating Modes............................................................. 109
ICP(IN-CIRCUIT PROGRAM) FLASH PROGRAM ................................................................ 115
CONFIG BITS ......................................................................................................................... 116
27.1 CONFIG1 .................................................................................................................... 116
27.2 CONFIG2 .................................................................................................................... 117
ELECTRICAL CHARACTERISTICS....................................................................................... 119
28.1 Absolute Maximum Ratings ........................................................................................ 119
28.2 DC ELECTRICAL CHARACTERISTICS .................................................................... 120
28.3 The ADC Converter DC ELECTRICAL CHARACTERISTICS ................................... 122
28.4 The COMPARATOR ELECTRICAL CHARACTERISTICS ........................................ 122
28.5 AC ELECTRICAL CHARACTERISTICS .................................................................... 122
28.6 EXTERNAL CLOCK CHARACTERISTICS ................................................................ 123
28.7 AC SPECIFICATION .................................................................................................. 123
28.8 Internal RC OSC Specification ................................................................................... 123
28.9 TYPICAL APPLICATION CIRCUITS .......................................................................... 123
PACKAGE DIMENSIONS ....................................................................................................... 124
29.1 20-pin SSOP ............................................................................................................... 124
29.2 20-pin SOP ................................................................................................................. 125
29.3 20-pin DIP ................................................................................................................... 126
REVISION HISTORY .............................................................................................................. 127
-3-
Publication Release Date: Aug 05, 2010
Revision A02
N79E825A/824A/823A/822A Data Sheet
1
GENERAL DESCRIPTION
The N79E825 series are an 8-bit Turbo 51 microcontroller which has an in-system programmable
Flash EPROM which Flash EPROM can program by ICP (In Circuit Program) or by
hardware
writer.
The instruction set of the N79E825 series are fully compatible with the standard 8052. The N79E825
series contain a
16K/8K/4K/2K
bytes of main Flash EPROM; a
256
bytes of RAM;
256
bytes NVM
Data Flash EPROM; two 8-bit bi-directional, one 2-bit bi-directional and bit-addressable I/O ports; two
16-bit timer/counters; 4-channel multiplexed 10-bit A/D convert; 4-channel 10-bit PWM; two serial
ports that include a I2C and an enhanced full duplex serial port. These peripherals are supported by
13 sources four-level interrupt capability. To facilitate programming and verification, the Flash EPROM
inside the N79E825 series allow the program memory to be programmed and read electronically.
Once the code is confirmed, the user can protect the code for security.
-4-
N79E825A/824A/823A/822A Data Sheet
2
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
FEATURES
Fully static design 8-bit Turbo 51 CMOS microcontroller up to 20MHz when V
DD
=4.5V to 5.5V,
12MHz when V
DD
=2.7V to 5.5V
16K/8K/4K/2K
bytes of AP Flash EPROM, with ICP and external writer programmable mode.
256
bytes of on-chip RAM.
256
bytes NVM Data Flash EPROM for customer data storage used and 10K writer cycles; Data
Flash program/erase V
DD
=3.0V to 5.5V
Instruction-set compatible with MCS-51.
Built-in internal RC oscillator (about 6MHz)
Two 8-bit bi-directional and one 2-bit bi-directional ports.
Two 16-bit timer/counters.
13 interrupts source with four levels of priority.
One enhanced full duplex serial port with framing error detection and automatic address
recognition.
The 4 outputs mode and TTL/Schmitt trigger selectable Port.
Programmable Watchdog Timer.
Four-channel 10-bit PWM (Pulse Width Modulator).
Four-channel multiplexed with 10-bits A/D convert.
One I2C communication port (Master / Slave).
Eight keypad interrupt inputs.
Two analog comparators.
Configurable on-chip oscillator.
LED drive capability (20mA) on all port pins.
Brownout voltage detect interrupt and reset.
Development Tools:
- JTAG ICE(In Circuit Emulation) tool
- ICP(In Circuit Programming) writer
Packages:
•
N79E825ADG ---- PDIP20
N79E825ASG ---- SOP20
N79E825ARG ---- SSOP20
N79E824ADG ---- PDIP20
N79E824ASG ---- SOP20
N79E824ARG ---- SSOP20
N79E823ADG ---- PDIP20
N79E823ASG ---- SOP20
N79E823ARG ---- SSOP20
N79E822ADG ---- PDIP20
Publication Release Date: Aug 05, 2010
Revision A02
-5-