MagnaChip MC80F0104 User manual

MAGNACHIP SEMICONDUCTOR LTD.
8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0104/0204
MC80C0104/0204
Preliminary User’s Manual (Ver. 0.2)

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.
REVISION HISTORY
VERSION 0.2 (MAR. 2005) This book
Fix some errata.
VERSION 0.1 (MAR. 2005) This book
First Edition

Preliminary MC80F0104/0204
Mar. 2005 Ver 0.2
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

MC80F0104/0204 Preliminary
Mar. 2005 Ver 0.2
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

Preliminary MC80F0104/0204
Mar. 2005 Ver 0.2 1
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.
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)
Device Name FLASH (ROM)
Size RAM ADC I/O PORT Package
FLASH MASK ROM
MC80F0204 MC80C0204 4KB 256B 10 channel 18 port 20 PDIP, 20SOP
MC80F0104 MC80C0104 8 channel 14 port 16 PDIP, 16 SOP

MC80F0104/0204 Preliminary
2Mar. 2005 Ver 0.2
• Operating Voltage & Frequency(MC80C0104/
0204)
- 2.0V ~ 5.5V (at 0.4 ~ 4.2MHz)
- 2.7V ~ 5.5V (at 0.4 ~ 8MHz)
- 4.5V ~ 5.5V (at 0.4 ~ 12MHz)
• Operating Temperature : -40°C ~ 85°C
• Power Saving Modes
- STOP mode
- SLEEP mode
- RC-WDT mode
• Oscillator Type
- Crystal
- Ceramic resonator
- External RC Oscillator (C can be omitted)
- Internal Oscillator (4MHz/2MHz)
1.3 Development Tools
The MC80F0104/0204 is supported by a full-featured macro as-
sembler, an in-circuit emulator CHOICE-Dr.TM and OTP pro-
grammers. There are two different type of programmers such as
single type and gang type. For mode detail, Macro assembler op-
erates under the MS-Windows 95 and upversioned Windows OS.
Please contact sales part of MagnaChip semiconductor.
Software
- MS-Windows based assembler
- MS-Windows based Debugger
- HMS800 C compiler
Hardware
(Emulator)
- CHOICE-Dr.
- CHOICE-Dr. EVA80C0x B/D
FLASH Writer
- CHOICE - SIGMA I/II(Single writer)
- PGM Plus I/II/III(Single writer)
- Standalone GANG4 I/II(Gang writer)
Choice-Dr. (Emulator)
PGMplus III ( Single Writer )
Standalone Gang4 II ( Gang Writer )

Preliminary MC80F0104/0204
Mar. 2005 Ver 0.2 3
1.4 Ordering Information
Device name ROM Size RAM size Package
Mask version
MC80C0204B
MC80C0204D
MC80C0104B
MC80C0104D
4K bytes
4K bytes
4K bytes
4K bytes
256 bytes
20PDIP
20SOP
16PDIP
16SOP
FLASH version
MC80F0204B
MC80F0204D
MC80F0104B
MC80F0104D
4K bytes FLASH
4K bytes FLASH
4K bytes FLASH
4K bytes FLASH
256 bytes
20PDIP
20SOP
16PDIP
16SOP

MC80F0104/0204 Preliminary
4Mar. 2005 Ver 0.2
2. BLOCK DIAGRAM
ALU Accumulator Stack Pointer
Interrupt Controller
Data
Memory
10-bit
Converter
A/D
8-bit
Counter
Timer/
Program
Memory
Data Table
PC
8-bit Basic
Timer
Interval
Watch-dog
Timer
Instruction
R0 R1
Buzzer
Driver
PSW
System controller
Timing generator
System
Clock Controller
Clock Generator
RESET
R00 / INT3 / SCK
R01 / AN1 / SI
R02 / AN2 / SOUT
R03 / AN3 / INT2
R04 / AN4 / EC0 / RXD
R05 / AN5 / T0O / TXD
R06 / AN6 / T2O / ACLK
R07 / AN7 / EC1
R10 / AN0 / AVREF / PWM1O
R11 / INT0 / PWM3O
R12 / INT1 / BUZO
R13
R14
VDD
VSS
Power
Supply
Decoder
High
PWM
Speed
R3
XOUT / R34
SIO/UART
R31 / AN14
R32 / AN15
XIN / R33

Preliminary MC80F0104/0204
Mar. 2005 Ver 0.2 5
3. PIN ASSIGNMENT
R02 / AN2 / SOUT
R01 / AN1 / SI
R00 / INT3 / SCK
VSS
RESET / R35
XOUT / R34
XIN / R33
R32 / AN15
R31 / AN14
R05 / AN5 / T0O / TXD
R06 / AN6 / T2O / ACLK
R07 / AN7 / EC1
VDD
R10 / AN0 / AVREF / PWM1O
R11 / INT0 / PWM3O
20 PDIP
19
18
17
16
15
14
13
12
11
16 PDIP
R12 / INT1 / BUZO
R13
R14
MC80F0204B/0204D
MC80F0104B/0104D
R03 / AN3 / INT2
R04 / AN4 / EC0 / RXD 20
16 SOP
2
3
4
5
6
7
8
9
10
1
MC80F0204B/0204D
R02 / AN2 / SOUT
R01 / AN1 / SI
R00 / INT3 / SCK
VSS
RESET / R35
XOUT / R34
XIN / R33
R05 / AN5 / T0O / TXD
R06 / AN6 / T2O / ACLK
R07 / AN7 / EC1
VDD
R10 / AN0 / AVREF / PWM1O
R11 / INT0 / PWM3O
19
18
17
16
15
14
13
R12 / INT1 / BUZO
R03 / AN3 / INT2
R04 / AN4 / EC0 / RXD 20
2
3
4
5
6
7
8
1
MC80F0104B/0104D
20 SOP

MC80F0104/0204 Preliminary
6Mar. 2005 Ver 0.2
4. PACKAGE DRAWING
1.043
0.050
TYP 0.100
TYP 0.300
0.270
0.014
0 ~ 15°
MAX 0.180
MIN 0.015
0.120
20 PDIP unit: inch
MAX
MIN
1.010
0.021
0.140
0.065
0.008
0.245
0.015
0.291
0.398
0.5118
0.104
0.013 TYP 0.050
0.004
0.0091
0 ~ 8°
0.016
20 SOP
0.419
0.299
0.4961
0.093
0.020
0.042
0.0125
0.0118
This manual suits for next models
3
Table of contents
Other MagnaChip Microcontroller manuals
Popular Microcontroller manuals by other brands

AMS
AMS AS7261 Demo Kit user guide

Novatek
Novatek NT6861 manual

Espressif Systems
Espressif Systems ESP8266 SDK AT Instruction Set

Nuvoton
Nuvoton ISD61S00 ChipCorder Design guide

STMicrolectronics
STMicrolectronics ST7 Assembler Linker user manual

Texas Instruments
Texas Instruments Chipcon CC2420DK user manual

Texas Instruments
Texas Instruments TMS320F2837 D Series Workshop Guide and Lab Manual

CYPRES
CYPRES CY14NVSRAMKIT-001 user guide

Texas Instruments
Texas Instruments INA-DUAL-2AMP-EVM user guide

Espressif Systems
Espressif Systems ESP8266EX Programming guide

Abov
Abov AC33M8128L user manual

Laird
Laird BL654PA user guide






