Embedded Systems 简明教程
Embedded Systems - 8051 Microcontroller
Brief History of 8051
第一款微处理器 4004 是由英特尔公司发明的。 8085 和 8086 微处理器也是由英特尔发明的。1981 年,英特尔推出了一个称为 8051 的 8 位微控制器。它被称为 system on a chip 是因为它有 128 字节的 RAM、4K 字节的片上 ROM、两个定时器、一个串行端口和 4 个端口(8 位宽),所有这些都集成在一个芯片中。当它变得广受欢迎时,英特尔允许其他制造商制造和销售与 8051 代码兼容的不同版本的 8051。这意味着如果您针对一种版本的 8051 编写程序,它将无论制造商如何也在其他版本上运行。这导致了几个具有不同速度和片上 RAM 大小的版本。
The first microprocessor 4004 was invented by Intel Corporation. 8085 and 8086 microprocessors were also invented by Intel. In 1981, Intel introduced an 8-bit microcontroller called the 8051. It was referred as system on a chip because it had 128 bytes of RAM, 4K byte of on-chip ROM, two timers, one serial port, and 4 ports (8-bit wide), all on a single chip. When it became widely popular, Intel allowed other manufacturers to make and market different flavors of 8051 with its code compatible with 8051. It means that if you write your program for one flavor of 8051, it will run on other flavors too, regardless of the manufacturer. This has led to several versions with different speeds and amounts of on-chip RAM.
8051 Flavors / Members
-
8052 microcontroller − 8052 has all the standard features of the 8051 microcontroller as well as an extra 128 bytes of RAM and an extra timer. It also has 8K bytes of on-chip program ROM instead of 4K bytes.
-
8031 microcontroller − It is another member of the 8051 family. This chip is often referred to as a ROM-less 8051, since it has 0K byte of on-chip ROM. You must add external ROM to it in order to use it, which contains the program to be fetched and executed. This program can be as large as 64K bytes. But in the process of adding external ROM to the 8031, it lost 2 ports out of 4 ports. To solve this problem, we can add an external I/O to the 8031
Comparison between 8051 Family Members
下表比较了 8051、8052 和 8031 中可用的功能。
The following table compares the features available in 8051, 8052, and 8031.
Feature |
8051 |
8052 |
8031 |
ROM(bytes) |
4K |
8K |
0K |
RAM(bytes) |
128 |
256 |
128 |
Timers |
2 |
3 |
2 |
I/O pins |
32 |
32 |
32 |
Serial port |
1 |
1 |
1 |
Interrupt sources |
6 |
8 |
6 |
Features of 8051 Microcontroller
8051 微控制器随以下功能捆绑提供 −
An 8051 microcontroller comes bundled with the following features −
-
4KB bytes on-chip program memory (ROM)
-
128 bytes on-chip data memory (RAM)
-
Four register banks
-
128 user defined software flags
-
8-bit bidirectional data bus
-
16-bit unidirectional address bus
-
32 general purpose registers each of 8-bit
-
16 bit Timers (usually 2, but may have more or less)
-
Three internal and two external Interrupts
-
Four 8-bit ports,(short model have two 8-bit ports)
-
16-bit program counter and data pointer
-
8051 may also have a number of special features such as UARTs, ADC, Op-amp, etc.