The 80C85AFP2 is an 8-bit microprocessor from Intel’s family of processors, an evolution of the 8085 series. It’s an excellent platform for those looking to dive into retro computing or microprocessor-based DIY projects. This article will explore the 80C85AFP2, its architecture, and walk through a comprehensive project that uses this microprocessor, providing you with a hands-on experience in designing and programming an 8-bit microprocessor system. By the end, you'll have a solid understanding of how to work with this classic microprocessor and build your own DIY computer system.
1. Introduction to the 80C85AFP2 Microprocessor
The 80C85AFP2 is a low-power, CMOS version of the 8085 microprocessor, offering backward compatibility and ease of use. Here are some key features:
· 8-bit Architecture: The 80C85AFP2 processes 8-bit data and supports a 16-bit address bus, allowing access to 64KB of memory.
· 5V Power Supply: It operates at a low voltage (5V), making it ideal for DIY projects.
· Low Power Consumption: This microprocessor has low power consumption, making it suitable for battery-powered applications.
· Clock Frequency: It can operate up to 6 MHz, providing a good balance between speed and complexity for hobbyist projects.
2. Basic System Architecture of the 80C85AFP2
Before diving into a project, it’s important to understand the basic architecture of a system built around the 80C85AFP2. A typical microprocessor-based system includes the following components:
· Microprocessor (80C85AFP2): The central processing unit that executes instructions.
· Memory:
o RAM (Random Access Memory): Used for storing temporary data during program execution.
o ROM (Read-Only Memory): Stores the program code that the microprocessor will execute.
· Input/Output (I/O) Devices: These devices enable the microprocessor to interact with the external world, such as keyboards, displays, sensors, and other peripherals.
· Clock Circuit: Provides the timing signal necessary for the microprocessor to synchronize its operations.
· Power Supply: Powers the microprocessor and other components in the system.
3. DIY Project: Building a Simple 80C85AFP2 Microprocessor System
Let’s build a basic computer system using the 80C85AFP2. This project will involve setting up the microprocessor, connecting memory and input/output components, and writing a simple program to demonstrate its functionality. This system will be capable of running basic operations and interacting with simple I/O devices like LEDs or 7-segment displays.
Components Needed:
· 80C85AFP2 microprocessor
· 32KB ROM (e.g., 27C256 or similar)
· 32KB RAM (e.g., 62256 or similar)
· 74LS138 (3-to-8 line decoder)
· 7-segment display
· Resistors (220Ω, 10kΩ)
· Capacitors (0.1µF, 10µF)
· Crystal oscillator (6 MHz)
· Power supply (5V)
· Breadboard and connecting wires
4. System Circuit Design
To build the system, we need to connect the microprocessor to memory, input/output devices, and a clock circuit. Here’s a breakdown of the major connections:
Step 1: Setting Up the Power Supply and Clock Circuit
1. Power Supply: Connect the 5V power supply to the Vcc pin of the 80C85AFP2 and ground (GND) to the appropriate pin.
2. Clock Circuit: Connect the crystal oscillator (6 MHz) between the X1 and X2 pins of the microprocessor. Add two small capacitors (e.g., 22pF) between the crystal terminals and ground to stabilize the clock signal.
Step 2: Connecting Memory (ROM and RAM)
1. ROM (Read-Only Memory): Connect the address and data lines of the ROM to the microprocessor’s corresponding lines. The ROM stores the program that the microprocessor will execute. Use the 74LS138 decoder to enable ROM based on the address range, ensuring that only specific addresses activate the ROM.
2. RAM (Random Access Memory): Similarly, connect the RAM module to the address and data lines. Use the same decoder (74LS138) to activate the RAM when the address lines fall within the RAM’s designated range.
Step 3: Connecting the 7-Segment Display (I/O Device)
1. 7-Segment Display: Connect the 7-segment display to the microprocessor through the I/O ports. You may use the 74LS138 decoder to enable specific ports. Resistors (220Ω) are required in series with each segment of the display to limit current and protect the LEDs.
2. Control Circuit: Connect additional control lines from the microprocessor to manage the display’s behavior, such as turning segments on and off based on the program's output.
5. Programming the 80C85AFP2
With the hardware set up, it’s time to write a program for the 80C85AFP2. The program will be stored in ROM and executed by the microprocessor. For simplicity, let’s write a program that counts from 0 to 9 and displays the numbers on the 7-segment display.
Assembly Code Overview
The program is written in assembly language, which directly controls the 80C85AFP2’s operations. Below is a sample program that performs the counting operation: