EMBEDDED SYSTEM TUTORIAL
- What is an Embedded system
- History of Embedded system
- Characteristics of Embedded system
- Advantages of Embedded system
- Disadvantages of Embedded system
- Types of Embedded System
- Application of Embedded systems
- Embedded system Processor
- Structure of an Embedded System
- Important terminologies used in embedded system
- What is Microcontroller
- What is Microprocessor
- Difference between Microprocessor and Microcontroller
- Embedded System tools and peripheral devices
- 8051 Microcontroller
- Application of 8051 Microcontroller
- 8051 Microcontroller architecture
- 8051 Microcontroller Pin Diagram
- Addressing Modes of 8051 Microcontroller
What is an embedded system?
An embedded system is defined as a mixture of Computer Hardware and Software, either fixed incompetence or Programmable, implemented for a specific task or function within a more extensive system.
In other words, “Embedded System is a devoted system which is designed to perform one or more specific tasks or functions.”
Some common examples of Embedded systems are Cameras, airplanes, vending machines, household appliances, and Mobile Devices.
History of Embedded System
Here are some important milestones in the history of Embedded Systems.
- In 1960, the Embedded System was first used to develop the Apollo guidance system by Charles stack Draper at MIT.
- In 1965, Antonetics developed the D-17B, this computer used in the Minuteman Missile Guidance System.
- In 1968, the first embedded system for a vehicle was developed.
- In 1971, Texas Instruments developed the first Microcontroller.
- In 1987, the first embedded OS, VxWorks, was developed by Wind Rivers
- Microsoft’s Windows Embedded CE was released in the year 1996.
- The first embedded Linux system appeared in the year 1999.
- In 2013, the embedded market reached $140 billion.
- Analysts are projecting an Embedded Market more massive than $40 billion by 2030.
Characteristics of Embedded system
- The Embedded system must have connected input and output devices.
- The Embedded system requires memory to store the data, and mostly ROM is used for this purpose. But there is no need for secondary memory.
- Software is used for providing extensibility and attributes. Hardware is used for security and performance.
- An embedded system is mostly used to perform specifically one type of function and does this whole function repeatedly.
- Embedded System is based on Microprocessor.
- Embedded systems needed real-time performance.
Advantages of embedded system
- The Embedded systems are small in size and faster to load.
- It is specially used to perform one task.
- It is easy to Manage.
- Low cost.
- Requirements are fulfilled in fewer resources.
Disadvantages of an embedded system
- Difficult to upgrade.
- Hardware is limited.
- Difficult to troubleshoot
- Difficult to transfer data from one system to another system.
- It is not scalable.
Types of Embedded System
There are three types of Embedded System
- Small scale
- Small scale Embedded System:- Small scale embedded systems can be used to implement with a single 8 or 16-bit microcontroller. The most vital programming tools which are used to implement a small scale Embedded system, an editor, assembler, (IDE), and cross-assembler.
- Medium Scale Embedded System:–Medium scale embedded systems are designed using 16 or 32-bit microcontrollers. This type of system offers both Hardware and software complexities. C, C++, JAVA, and various source code engineering tools, etc. are used to develop this kind of embedded system.
- Sophisticated Embedded Systems:-Sophisticated embedded systems have lots of hardware and software complexities. For the development of an embedded system, you may require hardware and software co-design and various components that need to be combined in the final system.
Applications of Embedded System
There are various applications of embedded system
- Dialysis Machine
- Infusion Pumps
- Cardiac Monitor
- Prosthetic Device
2. Robotic Science
- Ground vehicles
- Underwater Vehicles
- Industrial Robots
- Engine Control
- Ignition system
- Brake System
5. Home Devices
- Digital Alarm
- Air Conditioner
6. Industrial Control
- Control systems
- Space stations
Embedded System Processors
PROCESSOR:-It takes an input and produces an output after processing. The processor is the core element in an embedded system .Processors are essential for an embedded system that takes response from the sensors in the digital form and then processes that respond to produce the output in a real-time environment.
Processors in a system
There are two essentials units of processors
- Processors flow control unit
- Execution unit
- Processor flows control unit:-The processor control unit fetches the instructions from memory.
- Execution unit:-The Execution unit contains a circuit that implements data conversion from one form to another and also provides instructions about the data transfer operation.
Types of processors
- General Purpose Processor
- Micro Processor
- Embedded Processor
- Digital Signature Processor
- Media Processor
2. Application-Specific Instruction Processor
3. Application-Specific System processors
4. ASIP core(s) or GPP core(s)
Structure of Embedded System
The following figure shows the basic structure of an Embedded System:
- Sensor:-Sensor is used to measure the physical Signal, and that is used by an electrical instrument like an A2D convertor and by an Observer.
- A-D Converter:-An A-D convertor stands for the analog-to-digital converter, which is used to convert an analog signal into a Digital Signal sent by the sensor.
- Processors and ASICs:-The task of Processors is to process the data, measure the output, and store it to the memory.
- D-A converter:– D-Aconverter stands for the digital-to-analog converter, which is used to convert the digital data into analog data.
- Actuator:-An actuators match or measure the output that is given by the D-A converter to the expected (actual) output stored in it and then saved the approved output.
Important terminologies used in embedded system
- Reliability:-Reliability is used to measure the survival chances or probability of the system when the system is going to in critical state during the run time.
- Fault-tolerance:-This is used to measure the capability of a computer system to survive in the presence of faults.
- Real-Time:-An embedded system must meet the various constraints like time and other constraints .these type of system works on real-time.
- Flexibility:-flexibility means the system is designed in such a way so that when the need for changes is required, it will be done quickly.
What is Micro-controller?
A microcontroller is a single-chip VLSI unit, and it is also called a microcomputer. The Microcontroller includes memory, input and output interfaces, processors in a single chip. In other words, the microcontroller is defined as a small, low-cost, and self-contained computer on a single chip.
Types of Micro-controller
Microcontroller can be defined on the basis of architecture and service providers.
- Architecture based Microcontroller:
There are basically two types of Architectures of Microcontroller:
- Havard Architecture:-In Havard architecture, proper storage, and signal buses are provided for a different set of instructions and data.
- Von Neumann Architecture:-This Architecture was suggested by scientist john von Neumann. In the von Neumann architecture, both instruction and data are present on a single bus.
- Service Provider Based microcontroller:
On the basis of the Service provider, there are various types of the microcontroller are:
- AVR:-It is developed by Atmel service provider. AVR is based on the Harvard architecture and Reduced Instruction Set Computers (RISC).
- PIC:-PIC stands for the “peripheral interface controller.” It is based on Harvard architecture. PIC microcontroller supports programming in C, Assembly, and BASIC C.
- Hitachi:-This type of microcontroller belongs to the H8 family of the controller. H8 is a name that is used in a large family of 8-bit, 16-bit, and 32-bit microcontroller proposed by Renesas Technology, founded in the early 1990s within Hitachi semiconductors.
- Motorola:-This type of microcontroller is mainly used for high-performance data manipulation operation. Motorola microcontroller unit uses a System Integration Module (SIM), Time Processing Unit (TPU), and Queued Serial Module (QSM).
What is Microprocessor
A Microprocessor is also called a basic input-output System (BIOS).
A Microprocessor is defined as a central processing unit that is built into a single VLSI chip. Microsoft is a general-purpose device, and in this, additional outside circuitry is added on to make it work as a microcomputer.
There are various types of operations performed by the microprocessor such, as adding, subtracting, comparing two numbers, and fetching the data from memory.
The Microprocessor is used for processing the input received from sensors and produced the equivalent output.
Block Diagram of Microprocessor
Components of Microprocessor
- Arithmetic and logical unit:- ALU is used to perform arithmetic and logical operations. ALU performs arithmetical and logical operations on the data stored inside the registers.
2. Accumulator:- Accumulator is a type of register in which the intermediate arithmetic and logical operation data stored inside a microprocessor in different address locations.
3. Working Registers:- Working Register is a storage device which is used to store the data.
4. Program Counter:-Program counter is used to count the number of programs which is executed inside a Microprocessor.
- Stack Pointer:-Stack pointer is a pointer that is used to store the address of the last program request made by the processor inside a stack.
- Clock circuit:-clock circuit is a type of circuit that is used to produce clock signals.
- Interrupt circuit:-Interrupt circuit is used to produce the interrupt signal when the higher priority process used to be served first on the basis of some priority condition.
Difference between Microprocessor and Micro-controller
|A Microprocessor is core of the Computer System.||A Microcontroller is the core of the Embedded System.|
|A Microprocessor Contains a processor, memory, and input-output components.||A Microcontroller that Contains an external processing unit includes internal memory and input-output components.|
|A Microprocessor cannot be used in a compact system, so it is inefficient.||A Microcontroller can be used in a compact system, so it is an efficient technique.|
|The cost of the whole system is increased.||The cost of the whole system is low.|
|In microprocessor numbers of registers are very less, so more operations are memory-based.||In Microcontroller numbers of registers are more, so the Program is more comfortable to write.|
|A microprocessor is primarily used in PC,s.||A Microcontroller is mainly used in washing-machine, cameras, robots, etc.|
|In Microprocessor, the program and data are stored in the same memory module.||In Microcontroller, the program and data are stored in a separate memory module.|
|A Microprocessor is based on Von Neman architecture.||A Microcontroller is based on Harvard architecture.|
Embedded system tools and peripherals
Compiler: –ACompiler is a special type of program which is used to convert the source code into object code. In other words, a compiler is used to convert the high- level programming language code into a low- level programming language code.
The Compiler is used to translate the code of one programming language into another programming language.
There are various types of operations performed by a Compiler.
- Code generation
- Syntax direct translator
Cross compiler:- A cross compiler is a compiler that is able to create executable code for a platform other than the one on which the compiler is running. For example- a compiler that runs on windows, 7 pc can generate a code that runs on the Android Smartphone.
Decompiler:- A Decompiler is a compiler that is used to convert the low-level language code into the high- level language code. Decompiler is just opposite to the compiler.
Assembler:-An Assembler is a program that is used to translate Assembly language code into a machine language code.
Examples of Assembler:- NASM, MASM.
Debugging tools in an Embedded System
Debugging tool is used for reducing the errors or bugs inside a program.
Debugging is difficult in the compact system because a small change in one subsystem can create huge bugs in another system.
Different types of debugging tools in the Embedded System are:
1. Simulators:-Simulator is a debugging tool which is used for debugging in an embedded system.
The task of the Simulator is to monitor the detailed information of source code, provides the working status of RAM, give the full meaning of the command, etc.
- Microcontroller Starter kit:- Microcontroller Starter kit is used for developing an embedded system based project. The advantage of the Microcontroller starter kit is that it works on real-time operating conditions. A microcontroller start kit includes:
- In-system programmer (ISP)
- Hardware Printed Circuit Board (HPCB)
- Some embedded system tools like a compiler, assembler, linker, etc.
3. Emulators:-An Emulator is defined as a software program which is used to emulate the function of one computer system into another computer system.
Peripheral devices in Embedded System
Peripheral devices in an Embedded System are used for communicating with the outside environment.
There are different types of peripheral devices used in an embedded system are:-
- Universal serial bus (USB).
- Networks like Ethernet, local area network (LAN), etc.
- Multimedia cards (SD cards, flash memory).
- Serial Communication Interface (SCI).
- Digital to Analog/Analog to digital.
- General-purpose Input /Output (GPIO).
The 8051 Microcontroller is a type of microcontroller which was invented in the 1980s by Intel. It is based on Havard Architecture. Firstly, it was created by using NMOS Technology, but the NMOS technology consumed more power; therefore, by using another technology CMOS Intel re-launch the Microcontroller 8051, and the new version comes up with an edition of letter C in the name of the title. So, the new name of the modified version of the microcontroller is called by the name 80C51.
The 8051 Microcontroller programming is done in C language by using the Keil software.
Features of 8051 Microcontroller
- 16-bit timers.
- The Microcontroller has 4 registers Banks.
- 64k bytes on-chip programmable memory (ROM).
- 128 user-defined flags.
- 32 general-purpose registers each of 8-bit
- 8051 Microcontroller offers several unique features such as ADC, UART’s, op-amp, etc.
Applications of 8051 Micro-controller
There are various types of applications of Embedded Systems.
- Energy Management
- Touch screen
- Medical devices
8051 Microcontroller Architecture
The essentials components present in 8051 Microcontroller architecture is given below:
- CPU (central processing unit):-CPU is the core of any processing machine. The task of CPU is to manage and synchronize all processes that are carried out in Microcontroller. CPU interprets the program that is stored in ROM and brings out from storage and after that performs its projected duty. CPU also manages the different types of registers.
- Interrupts:-Interrupt is a signal that is sent to the processor when some other process is having high priority requests for CPU resources like hardware and software. Interrupt stop the current execution of operations.
Types of interrupts in 8051 Microcontroller
- Timer 0 Overflow Interrupt-TF0
- Timer 1 Overflow Interrupt-TF1
- External Hardware Interrupt-INTO
- External Hardware Interrupt-INTI
- Serial Communication Interrupt-RI/TI
3. Memory:- For performing the operations, Microcontroller requires a Program. This program guides Microcontroller to fulfill individual tasks. For installing this program in the microcontroller, chip memory is required. It also requires memory for storing data and operands.
4. BUS:- A BUS is a communication system which is used to transfer the data between the components inside a computer from one place to another place.
Types of buses in 8051 Micro-controller
There are two types of buses used in Microcontroller:
1. Address bus
2. Data bus
1. Address Bus: Address Bus is used for transferring the data from one peripheral to another peripheral.
- Oscillator:-An Oscillator is an electronic device which is used for generating a clock signal. In other words, Oscillator is used to perform time operations inside the microcontroller.
8051 Microcontroller Pin Diagram
This figure shows the 8051Microcontroller Pin diagram.
Let’s discuss the 8051 Microcontroller Pin Diagram:
- Pin 1-8:-Pins 1-8 are known as port1.Pin 1-8 is internally pulled up, bi-directional I/O port.
- Pin 9:-Pin 9 is a Port2. Pin 9 is used to reset the Microcontroller to its initial value.
- Pin 10-17:-Pins 10-17 are called as port 3. This port performs some functions like interrupts, timer input, control signals, serial communication signals RxD and TxD, etc.
- Pin 18 And Pin 19:-Pin 18 and 19 are used for interfacing external crystal oscillator with a given system clock.
- Pin 20:-Pin 20 is basically used for providing a power supply to the circuit.
- Pin 21-28:-Pins 21-28 are known as Port 2 of Microcontroller.
- Pin 29:- Pin 29 belongs to PSEN (Program stone enable). It is basically used for interpreting the sign from external program memory.
- Pin 30:-Pin 30 belongs to extended Access (EA) input, which is used to permit out a memory Interfacing.
- Pin 31:-Pin 31 is ALE Pin stands for address latch enable, which is used for de-multiplexing the address-data signal of the port.
10. Pin 32 to 39:-Pins 32 to 39 is known as port 0. It can be used as an input/output port, lower order address, and Data Bus Signal.
11. Pin 40:-Pin 40 is primarily used to provide a power supply to the circuit.
Addressing Modes of 8051 Micro-Controller
Addressing Modes in 8051 Microcontroller are sets of instructions which are used for communicating with the central processing unit (CPU) to perform any specific task.
There are various types of Addressing Modes used for executing the instruction in 8051.
- Immediate Addressing Mode.
- Indexed Addressing Mode
- Direct Addressing Mode
- Register Direct Addressing Mode
- Register Indirect Addressing Mode
Let’s see the brief explanation of each addressing mode.
- Immediate Addressing Mode:-An Immediate Addressing Mode is called Immediate because 8-bit Data is sent immediately to the Accumulator. In Immediate Addressing Mode, the value for a given instruction in an assembly programming is specified direct, it means the value is constant and immediately written.
- Indexed Addressing Mode:-Index Addressing Mode is a kind of displacement addressing mode. In Indexed Addressing mode, the addition of base address and Displacement index values gives the actual physical address of the operand in memory.
- Direct Addressing Mode:-In direct addressing Mode, an address of the data is given as operand. It is mainly used for addressing an operand.
- Register Direct Addressing Mode:-Register Direct addressing is the simplest type of addressing Mode.In Register Direct Addressing Mode, the source and destination of an operand are a Data Register or an address register.
- Register Indirect Addressing Mode:-Register indirect addressing mode is also called Base addressing or Indexed Addressing Mode. In Register Indirect Addressing Mode, the location of an operand is retained in a Register.