MAGNACHIP SEMICONDUCTOR LTD.
8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0104/0204
MC80C0104/0204
Preliminary User’s Manual
(Ver. 0.2)
REVISION HISTORY
VERSION 0.2 (MAR. 2005) This book
Fix some errata.
VERSION 0.1 (MAR. 2005) This book
First Edition
Version 0.2
Published by
MCU Application Team
2005
MagnaChip semiconductor Ltd. All right reserved.
Additional information of this manual may be served by MagnaChip semiconductor offices in Korea or Distributors and Representatives.
MagnaChip semiconductor reserves the right to make changes to any information here in at any time without notice.
The information, diagrams and other data in this manual are correct and reliable; however, MagnaChip semiconductor is in no way re-
sponsible for any violations of patents or other rights of the third party generated by the use of this manual.
Preliminary
MC80F0104/0204
1. OVERVIEW ...................................................................................................................................................... 1
Description ...................................................................................................................................................... 1
Features .......................................................................................................................................................... 1
Development Tools ......................................................................................................................................... 2
Ordering Information
................................................................................................................................. 3
2. BLOCK DIAGRAM .......................................................................................................................................... 4
3. PIN ASSIGNMENT .......................................................................................................................................... 5
4. PACKAGE DRAWING ..................................................................................................................................... 6
5. PIN FUNCTION ................................................................................................................................................ 8
6. PORT STRUCTURES .................................................................................................................................... 10
7. ELECTRICAL CHARACTERISTICS ............................................................................................................. 14
Absolute Maximum Ratings .......................................................................................................................... 14
Recommended Operating Conditions ........................................................................................................... 14
A/D Converter Characteristics ...................................................................................................................... 14
DC Electrical Characteristics ........................................................................................................................ 15
AC Characteristics ........................................................................................................................................ 16
Typical Characteristics .................................................................................................................................. 17
8. MEMORY ORGANIZATION .......................................................................................................................... 18
Registers ....................................................................................................................................................... 18
Program Memory .......................................................................................................................................... 21
Data Memory ................................................................................................................................................ 24
Addressing Mode .......................................................................................................................................... 29
9. I/O PORTS ..................................................................................................................................................... 33
R0 and R0IO register .................................................................................................................................... 33
R1 and R1IO register .................................................................................................................................... 34
R3 and R3IO register .................................................................................................................................... 36
10. CLOCK GENERATOR ................................................................................................................................ 37
Oscillation Circuit ......................................................................................................................................... 37
11. BASIC INTERVAL TIMER ........................................................................................................................... 39
12. WATCHDOG TIMER ................................................................................................................................... 41
13. TIMER/EVENT COUNTER .......................................................................................................................... 44
8-bit Timer / Counter Mode ........................................................................................................................... 47
16-bit Timer / Counter Mode ......................................................................................................................... 52
8-bit Compare Output (16-bit) ....................................................................................................................... 53
8-bit Capture Mode ....................................................................................................................................... 53
16-bit Capture Mode ..................................................................................................................................... 58
....................................................................................................................................................PWM Mode 60
14. ANALOG TO DIGITAL CONVERTER ......................................................................................................... 64
15. SERIAL INPUT/OUTPUT (SIO) ................................................................................................................... 67
Transmission/Receiving Timing .................................................................................................................... 68
The usage of Serial I/O ................................................................................................................................. 70
The Method to Test Correct Transmission .................................................................................................... 70
16. UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER (UART) ..................................................... 71
Mar. 2005 Ver 0.2
MC80F0104/0204
Preliminary
UART Serial Interface Functions .................................................................................................................. 71
Serial Interface Configuration ....................................................................................................................... 72
Communication operation ............................................................................................................................. 76
Relationship between main clock and baud rate .......................................................................................... 77
17. BUZZER FUNCTION ................................................................................................................................... 78
18. INTERRUPTS .............................................................................................................................................. 80
Interrupt Sequence ....................................................................................................................................... 82
BRK Interrupt ................................................................................................................................................ 84
Multi Interrupt ................................................................................................................................................ 84
External Interrupt .......................................................................................................................................... 86
19. POWER SAVING OPERATION .................................................................................................................. 88
Sleep Mode ................................................................................................................................................... 88
Stop Mode ..................................................................................................................................................... 89
Stop Mode at Internal RC-Oscillated Watchdog Timer Mode ....................................................................... 92
Minimizing Current Consumption .................................................................................................................. 94
20. RESET ......................................................................................................................................................... 96
21. POWER FAIL PROCESSOR ....................................................................................................................... 98
22. COUNTERMEASURE OF NOISE ............................................................................................................. 100
Oscillation Noise Protector .......................................................................................................................... 100
Oscillation Fail Processor ........................................................................................................................... 101
23. Device Configuration Area ...................................................................................................................... 102
24. MASK Option (MC80C0104/0204) ........................................................................................................... 103
25. Emulator EVA. Board Setting ................................................................................................................ 104
26. IN-SYSTEM PROGRAMMING (ISP) ......................................................................................................... 107
Getting Started / Installation ........................................................................................................................ 107
Basic ISP S/W Information .......................................................................................................................... 107
Hardware Conditions to Enter the ISP Mode .............................................................................................. 109
Reference ISP Circuit Diagram and MagnaChip Supplied ISP Board ........................................................ 110
27. A. INSTRUCTION MAP .................................................................................................................................. i
28. B. INSTRUCTION SET .................................................................................................................................. ii
1. arithmetic/ logic operation ............................................................................................................................ii
2. REGISTER / MEMORY OPERATION ........................................................................................................iv
3. 16-BIT operation ..........................................................................................................................................v
4. BIT MANIPULATION ...................................................................................................................................v
5. BRANCH / JUMP OPERATION ..................................................................................................................vi
6. CONTROL OPERATION & etc. ................................................................................................................. vii
29. MASK ORDER SHEET .................................................................................................................................. 1
30. MASK ORDER SHEET .................................................................................................................................. 2
Mar. 2005 Ver 0.2
Preliminary
MC80F0104/0204
MC80F0104/0204
MC80C0104/0204
CMOS SINGLE-CHIP 8-BIT MICROCONTROLLER
WITH 10-BIT A/D CONVERTER AND UART
1. OVERVIEW
1.1 Description
The MC80F0104/0204 is advanced CMOS 8-bit microcontroller with 4K bytes of FLASH. This is a powerful microcontrol-
ler which provides a highly flexible and cost effective solution to many embedded control applications. This provides the
following features : 4K bytes of FLASH, 256 bytes of RAM, 8/16-bit timer/counter, watchdog timer, 10-bit A/D converter,
8-bit Serial Input/Output, UART, buzzer driving port, 10-bit PWM output and on-chip oscillator and clock circuitry. It also
has ONP, noise filter, PFD for improving noise immunity. In addition, the MC80F0104/0204 supports power saving modes
to reduce power consumption.
The MC80C0104/0204 is the MASK ROM version of the MC80F0104/0204. It is fully compatible to the MC80F0104/0204
in function.
This document
explains the base MC80F0204,
the other’s eliminated functions are same as below table.
Device Name
FLASH
MC80F0204
MC80F0104
MASK ROM
MC80C0204
MC80C0104
FLASH (ROM)
Size
4KB
RAM
ADC
10 channel
8 channel
I/O PORT
18 port
14 port
Package
20 PDIP, 20SOP
16 PDIP, 16 SOP
256B
1.2 Features
• 4K Bytes On-chip FLASH
- Endurance : 100 times
- Retention time : 10 years
• 256 Bytes On-chip Data RAM
(Included stack memory)
• Minimum Instruction Execution Time:
-
333ns at 12MHz (NOP instruction)
• Programmable I/O pins
(LED direct driving can be a source and sink)
- MC80F0204 : 18(17)
- MC80F0104 : 14(13)
• One 8-bit Basic Interval Timer
• Four 8-bit Timer/counters
(or two 16-bit Timer/counter)
• One Watchdog timer
• Two 10-bit High Speed PWM Outputs
• 10-bit A/D converter
- MC80F0204 : 10 channels
- MC80F0104 : 8 channels
• Two 8-bit Serial Communication Interface
- One Serial I/O and one UART
• One Buzzer Driving port
- 488Hz ~ 250kHz@4MHz
• Four External Interrupt input ports
• On-chip POR (Power on Reset)
• Fourteen Interrupt sources
- External input : 4
- Timer : 6
- A/D Conversion : 1
- Serial Interface : 1
- UART : 2
• Built in Noise Immunity Circuit
- Noise Canceller
- PFD (Power fail detector)
- ONP (Oscillation Noise Protector)
• Operating Voltage & Frequency (MC80F0104/
0204)
- 2.7V ~ 5.5V (at 0.4 ~ 8MHz)
- 4.5V ~ 5.5V (at 0.4 ~ 12MHz)
Mar. 2005 Ver 0.2
1