8051 Microcontroller Overview & Hardware – Tutorial #1
The intel 8051 series 8bit microcontroller, originally introduced in 1980, remains popular and has had perhaps the longest product life of all such devices. It has become the industry standard for real-time and Boolean control applications.
While some (who should know better) have said that the 8051 is dead, it continues to be a viable choice for both design upgrades and new applications as faster, more advanced versions appear. Most engineering students study this device in order to round out their education. It is generally programmed in assembly code rather than compiled from high level languages. As a result, the speed is optimized and it can often outperform modern devices that are programmed only in high level languages.
Only the also very popular Microchip PIC microcontrollers can touch the 8051 series features and performance etc. –these were introduced some 13years later, but are essentially limited to one vendor and have not caught on as an industry standard.
This is the first of a series of tutorials on these devices. While understanding the basics, I realize the limitations of my knowledge –while I can write code, make things work and pride myself on routine optimization, I freely admit that I am no expert. As a result, there will be some shortcomings in my presentation –it will be from my (perhaps myopic) point of view.
Hardware schematic of LED Chaser
Manufacturers (not an exhaustive list –also some have already discontinued this series –perhaps too many players to corner sufficient market share)
The following vendors have either licensed or cloned the intel 8051 microcode:
Initial 8051 versions
“8051” is simply the generic name given to the entire series because it was the first single chip microcontroller solution of the series. Following are six basic intel versions with which the reader should be familiar –other vendors generally construct part numbers from their own prefix and the last two digits of the these intel versions. The physical package is subsequently denoted by the suffix. Beyond this there are numerous differences, so it is necessary to study the specific datasheets.
- 8031 128 bytes RAM, external code memory (3 chip solution –CPU, address latch, external ROM)
- 8032 256 bytes RAM, external code memory
- 8051 128 bytes RAM, 4K Internal mask ROM for code memory (single chip solution)
- 8052 256 bytes RAM, 8K Internal mask ROM for code memory
- 8751 128 bytes RAM, 4K UV erasable EPROM (quartz window) (single chip, reprogrammable)
- 8752 256 bytes RAM, 8K UV erasable EPROM (quartz window)
The initial devices were power hungry NMOS technology –later, more efficient CMOS devices were introduced –some have various power shutdown modes to further conserve power, but in no way can they match modern “flea power” devices that are designed for long-life battery applications.
Types of memory –FYI
- RAM Static memory for variables and the stack –variables and return address are stacked during interrupts and sub-routines etc.
- ROM or PROM Read only (external program code memory)
- Mask PROM Internal code memory that is masked upon manufacture and cannot be altered
- Flash or EEPROM Electrically Erasable internal, reprogrammable code memory)
- EPROM Read only (internal or external code memory) UV erasable via quartz window –requires programmer in order to generate the high voltage (12V) required for programming
- OTP One time programmable (internal code memory) EPROM without quartz window
Note that the larger microcontroller devices (e.g. 40pin or larger) can access either internal or external code memory via an external data bus –the smaller devices (e.g. 20pin) access only internal code memory and cannot manage a tri-state data bus.
Atmel –best for experimenters
Of the many vendors who offer these devices, Atmel shines brightest. While other vendors have added features, flash program memory, increased the clock rate and reduced the number of clock cycles per instruction, Atmel has both doubled the speed and blown the bottom out of the price with many devices selling for approximately $1 each. Very popular is the bare bones Atmel 89C2051 in a DIP-20 package. It must be programmed in a programmer. Also very popular is the AT89S52 in either a DIP-40 or PLCC-44 package. It may be programmed in a programmer, but also has provision for in-circuit programming via the ISP serial programming interface feature that uses a simple 10pin connector –no, it cannot bootload like the AVR devices. Both devices are very inexpensive and great for the experimenter –software and programmers will also be chosen for minimum cost. Future tutorials will focus on these two Atmel devices.
Someone, pick up the gauntlet of writing a tutorial on the PIC microcontroller.
For the future (partial list)
- LED Chaser (basic AT89C2051 schematic driving 8LEDs)
- AT89 Features
- Assembly code
- Programming tools
- ASM51 assembler software
Undocumented words and idioms –for our ESL friends
- flea power –extremely low power for long battery life –literally, the power of the tiny fea
- bare bones –most simple version –literally the bones of a skeleton
For more detail: 8051 Microcontroller Overview & Hardware – Tutorial #1
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test
Current Project / Post can also be found using:
- establishing a serial connection between to PIC microcontrollers