Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

CH-2 Hardware Architecture and

Interfacing
Team members
Pravin Aryal
Roshan Jaishi
Ranish Panthee
Table of contents

1. Central Processing Unit

2. Memory

3. Clock Circuitry

4. Chip Select

5. Input/output Devices & Interfacing/Interrupt

6. Communication Interfaces

7. Power Supply Unit

8. Sensors & Actuators

2
1. Central Processing Unit (CPU)
● is a silicon chip that is the brain of the computer system
● executes program instructions and data and controls all the devices
within the machine
● it’s internal architecture consists of three parts:

a. Control Unit

b. Memory or Storage Unit

c. Arithmetic Logic Unit(ALU)

3
4
2. Memory

b.
Random Access Memory (RAM)

Read Only Memory (ROM)



We can elaborate memory as a storage component. They are classified as:

a.

The contents of the RAM will be erased if power is switched off to the chip, whereas ROM
retains the contents even if the power is switched off. So, the firmware is stored in the ROM.

When power is switched on, the processor reads the ROM, the program is transferred to RAM
and the program is executed.

5
Three main forms of memory
● Sensor Memory

here we get data from sensor, store them process them until we get
desired data

● Short Term Memory

Eg Buffer where data is stored for a shorter period of time like data is
stored before moving from an input to output system ( usually STM
stores for 30 sec)

● Long Term Memory

ROM

6
Process Architecture

7
Registers

- fastest memory in computer system


- use to store information on temporarily basis which could be data to be
processed

- an address pointing to the data which is to be fetched.

Opcode

- Specifies the operation to be performed

Instruction decoder

- Convert opcode bits into settings for all internal control lines
- It’s purpose is to translate the instruction code into address in micro memory
where micro code for instruction starts

8
Stack Pointer

- Points to the top of the stack / the last address of the program request

Instruction Pointer

- Holds the address of the next instruction to be performed

Memory Address Register

- is the CPU register that either stores the memory address from which data will be fetched to
the CPU, or the address to which data will be sent and stored.

Memory Buffer Register

- is the register in a computer's processor, or CPU that stores the data being transferred to
and from the immediate access storage.

9
3. Clock Circuitry
● is a circuit which produces clock signals
● are digital square waveforms which alternates between on and off
● Digital circuits rely on clock signals to know when and how to
execute the functions that are programmed.

10
Timer with a simple clock circuit

11
4. Chip Select: Definition
❏ Chip select (CS), also known as chip enable (CE), is a control signal used in
hardware interfacing.
❏ It selects a specific device or component within an embedded system.
❏ Chip select enables communication and data transfer between the
microcontroller or processor and the selected device.
❏ It ensures that only the intended device is active, preventing conflicts and
data corruption.

Fig: Chip Selection

12
4. Chip Select: Types
❏ Hardware-based chip select:

❏ Dedicated Chip Select Pins: Devices have dedicated pins (CS or CE) to enable/disable specific components. Example:
SPI communication with individual chip select pins (CS1, CS2, CS3) for device selection.

❏ Address Decoding Logic: Generates chip select signals based on address ranges for shared bus systems. Example:
Memory subsystem with address decoding logic for selecting RAM/ROM chips.

❏ Programmable Logic Devices (PLDs): Implement chip select with flexible conditions using CPLDs or FPGAs. Example:
CPLD programming for dynamic chip select based on control signals or input conditions.

13
4. Chip Select: Types
❏ Software-based chip select:

❏ GPIO Pins: Control chip select using microcontroller/processor-controlled GPIO pins.


Example: Using GPIO pins to activate/deactivate chip select signals for peripheral devices.

❏ Software Routines: Chip select control through software instructions executed by the
microcontroller. Example: I2C communication with software routines to initiate chip select
and address specific devices.

14
5. Input/output Devices & Interfacing/Interrupt

❏ Input/Output Devices

❏ Input and output devices facilitate interaction between embedded


systems and the external world.
❏ Common input devices include sensors, switches, keyboards, and
touchscreens.
❏ Common output devices include displays, LEDs, actuators, and
motors.

15
Interfacing Input/Output Devices with
Microcontroller/Processor
1. Microprocessor:
- Central component controlling the system, processing data, and executing instructions.
2. Input Devices:
- Sensors and other input devices connected to the microprocessor.
- Provide data to the system for processing and decision-making.
3. Analog-to-Digital Converter (ADC):
- Converts analog signals from sensors into digital values.
- Enables the microprocessor to understand and process the input data.
4. Memory: Fig: Microprocessor sensor
- Storage space adjacent to the microprocessor.
- Temporarily holds data and instructions for efficient processing and retrieval. actuator connection
5. Output Devices:
- Actuators and other output devices connected to the microprocessor.
- Receive signals from the microprocessor to perform actions or display information.
6. Digital-to-Analog Converter (DAC):
- Converts digital signals from the microprocessor into analog signals.
- Enables control of specific output devices requiring analog input.
7. Pulse Width Modulation (PWM):
- Technique used for precise control of certain output devices.
- Microprocessor generates a waveform with varying pulse widths.
- Adjusting the duty cycle of PWM signal regulates the output device's behavior.

Fig: Pulse Width Modulation 16


Microprocessor vs Microcontroller

17
Interrupts
❏ An interrupt is a signal to the processor emitted by hardware or software indicating an event that
needs immediate attention.

❏ Whenever an interrupt occurs, the controller completes the execution of the current instruction
and starts the execution of an Interrupt Service Routine (ISR) or Interrupt Handler.

❏ Example: If we press a key , an interrupt goes to the processor and then the processor reads the
key pressed. Corresponding to each interrupt, there will be an Interrupt Service Routine (ISR) that
will be executed. But, before executing the ISR, the processor has to temporarily halt the work it
is doing. So it saves the contents of the registers by pushing the register values and stack
pointer onto the stack. Then the processor loads the interrupt vector i.e the address at which the
ISR is lying, into the Program Counter.

18
Interrupts

Fig: Interrupt handling


19
Programmable Interrupt Controller

❏ Manage and prioritize interrupts.


❏ Handle interrupt signals from devices.
❏ Maintain interrupt vector table.
❏ Support daisy chaining for multiple PICs
❏ Enable efficient interrupt handling.

20
6. Communication Interfaces
1. are need to interact with other embedded systems.
2. Very few communication interfaces such as RS232, RS422, RS485,
Universal Serial Bus (USB), IEEE 1394, Ethernet etc
7. Power Supply Unit
● An embedded system power supply has to provide voltages
at all these levels across the entire system.

● Power supplies for embedded systems normally must provide


the primary input power at a standard voltage, and the
power regulation strategy on the PCB provides power at
the particular core voltages.

22
8. Sensors and Actuators
Sensors

- turn physical inputs into electrical signals that are output to the control center.

-can monitor the health of equipment or the status of a sensitive environment.

Actuators

- Sensors turn a physical input into an electrical output, and actuators do the
opposite.
- They take electrical signals from control modules and turn them into
physical outputs.

23
Thank you
24

You might also like