MPC82G516A
8-bit microcontroller
Contents
List of Figures....................................................................................................... 5
List of Tables........................................................................................................ 7
1 Description ....................................................................................................... 8
2 Features........................................................................................................... 9
3 Block Diagram................................................................................................ 10
4 Pin Configuration............................................................................................ 11
4.1 Pin Assignment ........................................................................................................................11
4.2 Pin Description.........................................................................................................................14
4.3 Alternate Function Redirection................................................................................................. 17
5 Memory Organization..................................................................................... 18
5.1 Program Memory .....................................................................................................................18
5.2 Data Memory............................................................................................................................19
5.3 Declaration Identifiers in a C51-Compiler.................................................................................23
6 Special Function Registers (SFRs)................................................................ 24
6.1 SFR Memory Map....................................................................................................................24
6.2 SFR Introduction ......................................................................................................................25
6.2.1 The Standard 80C51 SFRs.............................................................................................................25
6.2.2 The New Added SFRs ....................................................................................................................27
7 On-Chip eXpanded RAM (XRAM).................................................................. 30
7.1 Using the XRAM in Software.................................................................................................... 30
8 External Data Memory Accessing.................................................................. 31
8.1 ALE-Pin Configuration..............................................................................................................31
8.2 Access Timing Stretching for Low-speed Memory...................................................................32
9 Dual Data Pointer Register (DPTR) ............................................................... 35
10 I/O Port Structure and Operation ................................................................. 36
10.1 Port Configurations ................................................................................................................36
10.1.1 Quasi-Bidirectional I/O ..................................................................................................................37
10.1.2 Open-Drain Output........................................................................................................................38
10.1.3 Input-Only (High Impedance Input)...............................................................................................38
10.1.4 Push-Pull Output...........................................................................................................................38
10.2 I/O Pins Used with ADC Function ..........................................................................................39
10.3 Additional Note for I/O Port ....................................................................................................39
11 Timers/Counters........................................................................................... 40
11.1 Timer 0 and Timer 1...............................................................................................................40
11.1.1 Mode 0: 13-Bit Timer/Counter.......................................................................................................41
11.1.2 Mode 1: 16-Bit Timer/Counter.......................................................................................................42
11.1.3 Mode 2: 8-Bit Auto-Reload............................................................................................................42
11.1.4 Mode 3: Two 8-Bit Timer/Counters...............................................................................................43
11.1.5 Programmable Clock-Out from Timer 0........................................................................................44
11.2 Timer 2...................................................................................................................................45
11.2.1 Capture Mode................................................................................................................................46
11.2.2 Auto-Reload Mode (Up or Down Counter)....................................................................................46
11.2.3 Baud Rate Generator Mode..........................................................................................................47
This document contains information on a new product under development by Megawin. Megawin reserves the right to change or
discontinue this product without notice.
© Megawin Technology Co., Ltd. 2008 All rights reserved.
2008/12 version A4
MEGAWIN