Embedded
Embedded
Digital Filters: A digital filters takes a digital signal as input & produces another signal with certain
characteristics removed
Sampling Rate (Ts) : is the number of samples in a fixed amount of time or space taken from continuous
signal to make a discrete signal.
-Sampling criteria means sampling frequency Fs must satisfy: Fs >=2Fmax where Fmax is the maximum
frequency of composite input signal.
Lec2
Memory:
-Stores binary data for a specific time.
-It can be read and/or written via the Data Path, Address Path, Control Path.
-Reading and writing are controlled using the control path (CE, RE, WE).
-memory consists of locations Each location is selected by an address and holds
specific data.
Access Methods
Read-Only Memory (ROM): Nonvolatile, random access, read-only.
Read/Write Memory (RAM): Volatile, allows reading and writing.
Data Retention Methods
Volatile Memory: Loses data when power is off (RAM).
Nonvolatile Memory: Retains data without power (ROM, FLASH, EEPROM, magnetic disks).
Memory Registers: A register is a storage device capable of holding binary data, best viewed as a collection of flip-flops
(usually D flip-flops). To store N bits, a register must have N flip-flops, one for each bit to be stored.
CPU Components
Arithmetic Logic Unit (ALU): Performs all arithmetic and logic operations required by the CPU.
Control Unit (CU): Selects the required operations and determines data source and destination registers.
Registers:
1-User Accessible Registers: Read or written by machine instructions.
Accumulator: Stores intermediate results of arithmetic and logic operations, reducing the need to access main memory.
Address Registers: Hold addresses for indirect access to primary memory (e.g., Index Register, Stack Pointer).
General Purpose Registers (GPRs): Combined data/address registers, sometimes including floating-point support.
Special Purpose Registers (SPRs): Have specific functionalities, such as:
1-Status Register: Holds program status.
2-Program Counter: Holds the address of the next instruction to be executed.
2-Internal Registers: Not accessible by instructions, used for internal processor operations.
Instruction Register (IR): Holds the instruction currently being executed.
Memory Buffer Register (MBR): Stores data being transferred to and from immediate access storage,
preparing it for the next cycle.
Lec3
The Basic Architecture of the Computer Systems or Embedded Systems
It has single path with its memories It has dual paths with its memories
Likes microprocessor 8086, i9 Likes the most microcontrollers such as 8051, AVR
8051 microcontroller: is widely used in embedded systems, aerospace, robotics, automotive, security, and industrial
control due to its low cost, small size, and ease of programming. It is an 8-bit microcontroller with an 8-bit data bus and
features a CISC architecture along with Harvard architecture, meaning it has separate program and data memory,
making it ideal for various applications where space and efficiency are crucial.
External access pin to select either the internal or external program memory
Address latch enable pin to separate the address bus from the address/data bus.
Program strobe enable pin to connect with the chip select (CS) pin of external ROM.
Types or resetting:
1- Automatic restarting
After Powering-on the 8051, positive pulse (with time duration > 2 machine cycles) will apply to pin “pin 9”.
2- Manual restarting
After pressing the push-button, positive pulse will apply to reset-pin “pin 9”.
Important note the PC will load by random address in case powering-on MC without resetting therefore the
CPU will start fetching any random instruction from the program memory.
Lec 4
Assembler: A SW tool that converts assembly language into machine code (binary) that a computer's processor can
execute.
Assembly Language: Human-readable instructions that correspond to machine code, allowing programmers to write
code that is easier to understand and manipulate.
Emulator: A combination of hardware and software used to run programs and test/debug external systems.
Linker: A program that combines several object files into one. It produces a link file (with a .EXE extension) and a link
map file (with a .MAP extension) that contains address information for the linked files.
Debugger: A tool that allows you to load and troubleshoot object code programs, especially when they don't require
external hardware.
Locator : A program that assigns specific memory addresses to segments of object code, converting .EXE files to .bin
files with physical addresses.
Assembler Instructions:
• DW (Define Word): Reserves memory for words (16-bit), e.g., WORDS DW 1234H.
• ORG (Origin): Sets the start address for the current machine code, e.g., ORG 0.
• END: Marks the end of the assembly code; any instructions after this are treated as comments.
• EQU (Equate): Assigns a label to a constant value or symbol, improving code readability and
maintainability. Example: MAX_VALUE EQU 255 assigns the label MAX_VALUE to the value 255.
Assembly Language vs. Machine Code: Assembly language is designed for human readability and manipulation,
while machine code is executed directly by the computer.
Assembler Instructions vs. Directives: Assembler instructions generate machine code and contribute to program
size, while directives do not create machine code and serve to control the assembly process.