0% found this document useful (0 votes)
2 views14 pages

Module 2 Embedded Hardware

The document provides an overview of embedded hardware architectures, including Von Neumann, Harvard, and Super Harvard architectures, detailing their components and functions. It also discusses on-chip peripherals such as I/O ports, timers, interrupts, ADCs, DACs, and motor interfacing techniques, including stepper and DC motors. Additionally, it covers the hardware architecture of embedded systems, including processors, memory, I/O interfaces, power supply units, and communication protocols.

Uploaded by

pandeajay248
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views14 pages

Module 2 Embedded Hardware

The document provides an overview of embedded hardware architectures, including Von Neumann, Harvard, and Super Harvard architectures, detailing their components and functions. It also discusses on-chip peripherals such as I/O ports, timers, interrupts, ADCs, DACs, and motor interfacing techniques, including stepper and DC motors. Additionally, it covers the hardware architecture of embedded systems, including processors, memory, I/O interfaces, power supply units, and communication protocols.

Uploaded by

pandeajay248
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE 2

EMBEDDED HARDWARE

Von-Neumann Architecture:
The Von Neumann architecture popularized the stored-program concept, making computers
more flexible and easier to reprogram. This design stores both data and instructions in the same
memory, simplifying hardware design and enabling general-purpose computing.

1) It’s also known as an IAS computer, and it’s made up of three fundamental components:
a. The CPU or Central Processing Unit

b. The Main Memory Unit (most important part of the system)

c. The I/O Device or the Input/output Device

2) Memory: This is where data and instructions are stored. It is a crucial part of the
computer system that allows for the storage and retrieval of information.
3) Control Unit: This component manages the operations of the computer. It directs the
flow of data between the CPU and other components.
4) Arithmetic Logic Unit (ALU): The ALU performs arithmetic and logical operations.
It is responsible for calculations and decision-making processes.
5) Input: This refers to the devices or methods through which data is entered into the
computer system.
6) Output: This refers to the devices or methods through which data is presented to the
user or other systems.
7) Processor: The processor, or CPU, is the central component that carries out the
instructions of a computer program. It includes the ALU and Control Unit.
8) Accumulator: This is a register in the CPU that stores intermediate results of arithmetic
and logic operations.

Harvard architecture:

• The Harvard architecture is a computer architecture that separates memory storage and
buses for instructions and data, unlike the von Neumann architecture, which uses a
single memory and bus for both.

Buses:
Buses are used as signal pathways. In Harvard architecture, there are separate buses for
both instruction and data. Types of Buses:
• Data Bus: It carries data among the main memory system, processor, and I/O devices.
• Data Address Bus: It carries the address of data from the processor to the main memory
system.
• Instruction Bus: It carries instructions among the main memory system, processor,
and I/O devices.
• Instruction Address Bus: It carries the address of instructions from the processor to
the main memory system.
Operational Registers:
There are different types of registers involved in it which are used for storing addresses
of different types of instructions. For example, the Memory Address Register and
Memory Data Register are operational registers.
• Program Counter: It has the location of the next instruction to be executed. The
program counter then passes this next address to the memory address register.
• Arithmetic and Logic Unit: The arithmetic logic unit is part of the CPU that operates
all the calculations needed. It performs addition, subtraction, comparison, logical
Operations, bit Shifting Operations, and various arithmetic operations.
• Control Unit: The Control Unit is the part of the CPU that operates all processor
control signals. It controls the input and output devices and also controls the movement
of instructions and data within the system.
• Input/output System: Input devices are used to read data into main memory with the
help of CPU input instruction. The information from a computer as output is given
through Output devices. The computer gives the results of computation with the help
of output devices.

Super Harvard architecture:

• Super Harvard Architecture (SHARC) is an advanced variation of the Harvard


architecture, a computer architecture that separates the memory for instructions and
data. This enhancement aims to improve performance, efficiency, and parallelism in
computing systems.
• In the super Harvard architecture, the program memory can also store secondary data
to balance the load on both program memory and data memory.
• Additionally, the super Harvard architecture incorporates an instruction cache within
the processor, which helps in speeding up access to frequently used instructions.
Study of on- chip peripherals like I/O ports, timers, counters, interrupts, on-
chip ADC, DAC, LCD, UART, PWM etc.
1) I/O Ports:

• Enable communication between the microcontroller and external devices like sensors,
actuators, and displays.
• Types:
a) GPIO (General-Purpose I/O): GPIO stands for General Purpose Input and Output.
It can be configured as either input or output.
The basic functionality of a GPIO controller includes:
• setting the GPIO pins as either input or output,
• reading the voltage level, if they are set as input
• writing the voltage to 0 or 1 if they are set as output.
• can be routed to other peripherals such as ADCs and DACs to serve some
alternate functions as needed by the peripherals.
b) Dedicated I/O: Specific for functions like SPI, I2C, UART, etc.

2) Timers:
• Timing is a crucial part of any embedded system, be it controlling the blinking rate of
the LEDs or controlling the sampling rate of the ADCs, or a simple delay on the source
code.
• Timers can operate in 2 modes
a) One-time mode: In One-time mode, we can set the timer to go off after a
particular time duration, say 10ms. Once started, the timer counts down and
once it runs out it notifies the core through a mechanism called interrupts and
the timer gets disabled. This action is very similar to using a stopwatch in count
down mode.
b) Periodic mode: In periodic mode, once the timer runs out, it notifies the core,
then instead of getting disabled, it automatically reloads the initial value and
starts counting down again.

3) Counters:
a. Count external or internal events (e.g., pulses from a sensor).
b. Can be incremental or decremental based on input signals.

4) Interrupts:
a. Interrupt controllers listen to the peripherals for events and reports to the
processor once an event occurs.
b. Mechanism to handle urgent tasks without continuously polling.
c. Types:
i. External Interrupts: Triggered by external events (e.g., button press).
ii. Internal Interrupts: Generated by on-chip peripherals (e.g., timer
overflow, UART transmission complete).

5) On-chip DAC (Digital to Analog Converter):


• Converts digital values into analog signals.
• Used for applications like audio signal generation and motor control.

6) On-chip ADC (Analog to Digital Converter):


• Converts analog signals (e.g., from sensors) into digital values.
• Common resolutions: 8-bit, 10-bit, 12-bit, etc.
• Used in applications like temperature sensing and audio signal processing.

7) LCD (Liquid Crystal Display) Interface:


• Some microcontrollers have built-in support for LCD displays.
• Used for displaying data, messages, or real-time values.

8) UART
• Serial communication between microcontroller and other devices (PC, GPS,
Bluetooth, etc.).
• Features:
a. Full-duplex: Can send and receive data simultaneously.
b. Baud Rate: Defines transmission speed (e.g., 9600, 115200 bps).
• Applications:
c. Debugging via serial monitor.
d. Communicating with GSM, GPS, and Wi-Fi modules
9) Pulse Width Modulation Controllers:

• Purpose: Generates analog-like signals using digital pulses.


• Parameters:

• Duty Cycle (%): Determines the ON-time of the pulse.


• Frequency (Hz): Defines how fast the signal oscillates.

• Applications:

• Motor speed control


• LED brightness control
• Audio signal generation

Stepper Motor Interfacing


• Stepper motor is brushless DC motor.
• Can be rotated in small angles, these angles are called steps.
• Generally, stepper motor use 200 steps to complete 360-degree rotation, means its
rotate 1.8 degree per step.
• Used in many devices which needs precise rotational movement like robots, antennas,
hard drives etc.
• Can rotate stepper motor to any particular angle by giving it proper instructions.
• Stepper motor is made up of a stator and a rotator. Stator represents the four
electromagnet coils which remain stationary around the rotator, and rotator represents
permanent magnet which rotates.
• Stepper motors are basically two types: Unipolar and Bipolar.
a) Unipolar stepper motor generally has five or six wire, in which four wires are
one end of four stator coils, and other end of the all four coils is tied together
which represents fifth wire, this is called common wire (common point).
Generally, there are two common wire, formed by connecting one end of the
two-two coils as shown in figure. Unipolar stepper motor is very common and
popular because of its ease of use.
b) In Bipolar stepper motor there is just four wires coming out from two sets of
coils, means there are no common wire.
• Stepper motor is made up of a stator and a rotator. Stator represents the four
electromagnet coils which remain stationary around the rotator, and rotator represents
permanent magnet which rotates. Whenever the coils energised by applying the current,
the electromagnetic field is created, resulting the rotation of rotator (permanent
magnet).
• Coils should be energised in a particular sequence to make the rotator rotate. On the
basis of this "sequence" we can divide the working method of Unipolar stepper motor
in three modes: Wave drive mode, full step drive mode and half step drive mode.
a) Wave drive mode: In this mode one coil is energised at a time, all four coils
are energised one after another. It produces less torque in compare with Full
step drive mode but power consumption is less. Following is the table for
producing this mode using microcontroller, means we need to give Logic 1 to
the coils in the sequential manner.
b) Full Drive mode: In this, two coils are energised at the same time producing
high torque. Power consumption is higher. We need to give Logic 1 to two coils
at the same time, then to the next two coils and so on.

c) Half Drive mode: In this mode one and two coils are energised alternatively,
means firstly one coil is energised then two coils are energised then again one
coil is energised then again two, and so on. This is combination of full and wave
drive mode, and used to increase the angular rotation of the motor.
DC Motor Interfacing:
• DC motor converts electrical energy in the form of Direct Current into
mechanical energy.
• DC Motor works on DC power.
• It has two leads.
• Motor leads are connected to DC power supply to move it in one direction.
• Reverse the polarity of the power supply to move the motor in opposite direction
• Typical operating voltages are 6V, 12V or 24 V
• Applications - Robotics, toys etc.
• An H-Bridge is a circuit built to change the direction of the voltage and thus
the current flowing to a load. An H-Bridge is made up of four switches: two
in series, and two in parallel, with the load placed in between the switches. In
this configuration the circuit takes an “H” shape. In order to change the
direction of the voltage supplied, the H-Bridge controls the switches that
deliver power to the load (S1). Looking at the diagram, if we close S1 and S4
while leaving the rest open, the voltage will be applied from left to right
across the motor. If S2 and S3 are closed instead and the others open, the
voltage will be applied from right to left.

• DC motor can not connect directly microcontroller 8051 because of following


reasons:
o The power requirements of most of DC motors is higher.
o Back emf produced by the motor may damage the microcontroller.
• To overcome the above two reasons there are two motor drive ICs are used:
o L293D - Supply voltage between 4.5 to 36V with maximum current of
600mA.
o L298N - Supply voltage range is up to 46V and it can provide a current
of 3А.
• L293D H-Bridge IC:

1) L293D is a dedicated Quadruple half H bridge motor driver IC available in 16-pin package
2) Can drive two DC motors.
3) IN1, IN2-control signals for M1 (Motor 1)
4) OUT1, OUT 2-M1 connected
5) EN1 - enables M1
6) IN3, IN4-control signals for M2 (Motor 2)
7) OUT3, OUT4-M2 connected
8) EN2 - enables M2
9) VSS - Supply of IC
10) VS - Supply of motor

Watchdog Timer:
• Watchdog timer is a piece of hardware in micro-controller.
• Watchdog timer is used to generates system reset if system gets stuck somewhere i.e.
if system goes into endless loop of execution watchdog timer will reset the system to
come out of endless loop.
• Watchdog is safety mechanism in embedded system which makes your system reliable,
but it depends on how you make use of watchdog timer.
• Watchdog is basically a counter, which starts from counting zero and reaches to a
certain value.
• If counter reaches to certain value then watchdog hardware will generates a watchdog
reset. To avoid system reset, software needs to kick the watchdog i.e. need to reset the
counter to zero. In case software stuck into endless loop its system will not able to kick
the watchdog hence counter reaches to certain value and resets the system.
• Following figures shows watchdog hardware. Input to watchdog hardware is clock.
Based on every clock tick watchdog internal counter increment. Then there is
comparator which compares count value with loaded count value (timeout value) and
if count matches watchdog hardware generates and reset signal.

Hardware Architecture of Embedded System:


1. Processor (CPU or Microcontroller)

• The brain of the embedded system that executes instructions.


• Can be a Microcontroller Unit (MCU), Microprocessor Unit (MPU), or Digital
Signal Processor (DSP).
• Common architectures: ARM Cortex, RISC-V, x86, PowerPC, AVR, MSP430.

2. Memory

• Stores program code and data.


• ROM (Read-Only Memory): Stores firmware (e.g., Flash, EEPROM).
• RAM (Random Access Memory): Stores temporary data (e.g., SRAM, DRAM).
• Non-volatile memory: Used for persistent storage (e.g., NAND Flash, SD cards).

3. Input/output (I/O) Interfaces

• Connects the embedded system to external devices.


• Digital and Analog I/O pins: For sensors and actuators.
• Serial Interfaces: UART, SPI, I2C, CAN, USB.
• Parallel Interfaces: GPIO, Parallel LCD interface.

4. Power Supply Unit

• Converts electrical power to required voltage levels.


• Uses DC power sources, batteries, or power adapters.
• Includes Voltage Regulators and Power Management ICs (PMICs).

5. Clock and Timers

• Provides precise timing and synchronization.


• Crystal Oscillator: Generates system clock.
• Timers and Counters: Used for task scheduling, delays, and real-time operations.

6. Peripherals and Controllers

• ADC (Analog-to-Digital Converter): Converts analog signals (e.g., sensor data) to


digital.
• DAC (Digital-to-Analog Converter): Converts digital data into analog signals.
• PWM (Pulse Width Modulation): Used for motor control, LED dimming, etc.
• Interrupt Controller: Manages interrupts for real-time responses.

7. Communication Interfaces

• Enables data transfer between devices.


• Wired Protocols: Ethernet, RS-232, RS-485, USB.
• Wireless Protocols: Wi-Fi, Bluetooth, Zigbee, LoRa, NFC.

8. Sensors and Actuators (Application-Specific)

• Sensors: Measure physical parameters (e.g., temperature, pressure, motion).


• Actuators: Convert electronic signals into physical actions (e.g., motors, relays).

9. Embedded Software/Firmware

• Although not hardware, firmware plays a crucial role in controlling the system.
• Includes real-time operating systems (RTOS), device drivers, and middleware.

Software Architecture of Embedded System:

Operating System: -
• The piece of software with which user interacts with hardware
• When system is switched ON first OS is loaded in main memory RAM
• Jobs performed by OS are called "tasks"
• Managing multiple tasks is done by OS.

1) Kernel:
a. Heart of OS is Kernel
b. It manages tasks by scheduling tasks and by providing inter-task
communication
c. Provides memory management services, time management services, interrupt
handling services and device management services.

2) Device Manager:
a. Manages I/O devices to send and receive data from the embedded system.
b. I/O devices are managed by OS through interrupts and device drivers
c. Device drivers provide an interface between the application and hardware.

3) File System:
a. Most embedded systems do not have secondary storage.
b. If file system is required, a small system can be developed on flash memory
c. Some embedded system uses secondary storage just for booting

4) Communication Software:
a. The protocol such as TCP/IP need to be integrated with the OS to make
Embedded system network enabled.
b. Embedded system has communication interfaces such as Ethernet, USB etc.

5) Libraries:
a. OS may have C/C++ library files in object code
b. These can be used through API calls

Application Programming Interface:

• API is used by developers to write application software.


• Provides function calls to access OS services.

Application Software
• It needs to be developed above OS
• Obtain development tools for that OS

You might also like