Sie sind auf Seite 1von 16

The 8051 Microcontroller and Embedded Systems

Chapter 1 The 8051 Microcontroller

From the text by Mazidi & Mazidi (2000) Presentation developed by Martin Hebel

Microcontrollers & Embedded Processors Microprocessors, such as Intel Pentium and Motorola 68000 contain no appreciable RAM or ROM and are referred to as general purpose microprocessors. External devices must be connected to make them functional and useful. Microcontrollers contain in-chip RAM, ROM and other peripherals making them ideal for small, inexpensive applications.

Unlike in computer systems, the program in microcontrollers is stored in non-volatile ROM. RAM is used for variables, registers and other temporary information.

Embedded Systems
Embedded products use a microcontroller to perform specific tasks, such as a printer to accept the data and print it. See Table 1-1 for many more products.

A general-purpose CPU may also be used where high speed and very complex operations or I/O is required.

Choosing a uC
Major Families (but not all inclusive):
Motorola 68HC11 Intel 8051 (MCS51 family) Zilog Z8 Microchip PICs (PIC16, PIC17,PIC18) Atmel AVRs

Basis for choosing:


Meeting computing needs and cost effectiveness.
Speed Packaging Power consumption On-chip RAM/ROM Number of I/O pins Ability to upgrade Cost per unit On-chip peripherals/features

Availability/cost of software development tools such as compilers, assemblers, debuggers. Availability of resources, forums, books, on-line information (such as www.8052.com ).
8

Software/Hardware
Assemblers Specific packages for converting Assembly code to a controllers native binary code. Compilers Convert high level code to Assembly/native binary (free to $1000+) Simulators PC based simulation for testing/debugging code (free to $1000+) Emulators Hardware which interfaces with PC software to monitor in real time the emulated controller ($100 to $1000+) for debugging.
9

Overview of the 8051


Intel introduced it in 1981, one of the first microcontrollers. Of 8-bit controllers, the 8051 has the largest base of suppliers. Has four I/O ports, each 8-bit wide. Became very popular when Intel began leasing out the core to other companies. All derivatives must be backwards compatible. Original member of the MCS 51 family.
10

8051 Features
4K ROM Internal, up to 64K external 128 Bytes User RAM Internal, up to 64K external (addressing shared with ROM) 2 Timers 32 I/O pins 1 Serial Port 6 Interrupt Sources

11

12

13

Various 8051 Controllers


OTP Versions (One-Time-Programmable) UV Erasable EPROM EEPROM NV-RAM FLASH Original 8051 ran at 12 MHz, and required 12 clock cycles to perform a single instruction cycle (effectively 1 Million Instructions per Second (MIPs) Today's 8051 run up at 30 to 50MHz and perform a instruction each clock cycle.
14

Increased feature set such as on-chip ADC's, real-time clocks, EEPROM memory in addition to Flash for code, LCD drivers, etc. Earlier controllers used required being removed from the system to be reprogrammed. Newer controllers using FLASH are in-service programmable (ISP) allowing reprogramming while in the circuit.
15

16

Das könnte Ihnen auch gefallen