8051 basic programming tutorial: In the following 8051 tutorial i used books to learn fundamental knowledge about Embedded system. After that i install Kiel compiler and Proteus simulator tool to implement following basic 8051 programming tutorial:
Embedded Systems Introduction:- Embedded Systems are inseparable part of our life. Whether we are at home or office or on the move, we are always surrounded by embedded systems. Starting from home appliances like TV, washing machine and systems like printer and elevator in workplace to the automobiles and automatic traffic control system are all examples of embedded systems. All kinds of magazines and journals regularly dish out details about latest technologies, new devices; fast applications which make us believe that our basic survival is controlled by these embedded products. Embedded system is a combination of Hardware and Software Design to meet a specific need with performance in given time frame.
MICROCONTROLLERS Introduction Circumstances that we find ourselves in today in the field of microcontrollers had their beginnings in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip. That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. Further increasing of the volume of the package resulted in creation of integrated circuits. These integrated circuits contained both processor and peripherals. That is how the first chip containing a microcomputer, or what would later be known as a microcontroller came about. The first microcontroller 8051 was developed by Intel Corporation in the year 1981. it was called as a “System on a chip”. Intel refers to it as MCS-51 now.
Microcontroller, as the name suggests, are small controllers. They are like single chip computers that are often embedded into other systems to function as processing/controlling unit. For example, the remote control you are using probably has microcontrollers inside that do decoding and other controlling functions. They are also used in automobiles, washing machines, microwave ovens, toys ... etc, where automation is needed.
8051 Architecture: The 8051 is a high performance single chip computer intended for use in sophisticated real time applications such as instrumentation, industrial control and computer peripherals. It provides extra features like interrupts, bit address ability and an enhanced set of instructions, which makes the chip very powerful and cost effective.
Standard features of the 8051
8 bit data path and ALU
On chip flash memory
4K X 8 ROM – Program Memory
128 X 8 RAM – Data Memory
Multiple 16 – bit Timer/Counter.
Full duplex UART (serial port).
On chip clock oscillator.
32 Pin IOs.
Pin configuration:
The pins of the micro controller are explained below. I/O Ports: Four 8-bit I/O ports. Most have alternate functions. Port 0 (pin 32-39)
Dual purpose I/O port.
In min. component design, it is used as a general purpose I/O port.In
larger designs with external memory, it becomes a multiplexed data bus:
Low byte of address bus, strobed by ALE.
8-bit instruction bus, strobed by PSEN.
8-bit data bus, strobed by WR and RD.
Port 1 (pin 1-8)
As an I/O port: Standard bi-directional port for interfacing to external
devices as required for I/O.
Alternate functions: Only on some derivatives
Port 2 (pin 21-28)
Dual purpose I/O port.
As an I/O port: Standard bi-directional general purpose I/O port.
Alternate functions: High byte of address bus for external program and data memory accesses
Port 3 (pin 10-17)
is an 8-bit bi-directional I/O port with internal pull-ups. It also serves the
functions of various special features of the 80C51