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

EMBEDDED SYSTEM FILE

Submitted in partial fulfillment of the required for the award of


diploma of engineering in electronic and telecommunication

Submitted to:

File submitted by:

Poornima Pandit Tanu Pal


(21038E03018) (21038E03027)

UNDER THE GUIDANCE OF


Mr. TARIQ ALI

GOVTERNMENT WOMEN`S POLYTECHNIC COLLEGE BHOPAL


Session (2023-24)
INDEX

S.no Particular Date Signature

1. Introduction to embedded system

2. Applications of embedded systems

3. Introduction to C language

4. Data type of C, C variables, C-operators

5. Introduction to ARM core Architecture

Assembly language programming for LED


6. interfacing, Seven segment display
interfacing

Embedded C language programming and


7. conversion of Embedded C language to
Assembly Language
Introduction to Embedded System:

An embedded system is an applied computer system. It is a combination of


electronics hardware. Mechanical parts and microcontroller & microprocessor.
Microcontroller is essentially small and self a computer on chip, used to control
devices.
It has all the memory and input and output it needs on board.

Applications of embedded systems:

❖ Phone / mobile phone


❖ Refrigerator
❖ Microwave
❖ Washing Machine
❖ Oven/Rice or bread cooker
❖ T.V
❖ Remote control

Introduction to C language:

C is a basic of all the other programming language.


Computer is a Machine and it understand only 0 and 1.
C is a compiler-based programming language.
Brief history of C language:

Here's a brief overview of its history:


C is a general-purpose programming language developed by Dennis Ritchie at Bell
Labs in the early 1970s.
It evolved from the B language and was created to write the Unix operating
system. In 1978, "The C Programming Language" by Kernighan and Ritchie was
published, becoming the de facto standard.
ANSI standardized C in 1989 (ANSI C), followed by ISO in 1990 (C90).
Subsequent revisions include C99 (1999), C11 (2011), and C18 (2018).
C has significantly influenced many languages and remains crucial in systems
programming and performance-critical applications.

Data types of C:
Data types are the type of data stored in a C program. Data types are used while
defining a variable or functions in C.
C provides several built-in data types, such as integer (int), character (char),
floating-point (float). Each data type has its own set of possible values and
operations that can be performed on it.

C variables:
In C, a variable is a named storage location in memory that holds a value which
can be modified during program execution. Variables must be declared with a
specific data type (e.g., int, float, char) before they can be used.
For Example:
Int age;
Float temperature;
Char initial;

C operators:

Arithmetical operators: An arithmetic operator in C is a symbol


used to perform mathematical operations on operands, such as addition,
subtraction, multiplication, division, and modulo. Common arithmetic operators in
C include +, -, *, /, %.

Conditionally statements: The conditional statements (also


known as decision control structures) such as if, if else, switch, etc. are used for
decision-making purposes in C programs.

Loops: Loops in C are control flow statements that repeat a block of code
as long as a specified condition is true. Example: - for loop, while loop, do-while
loop.

Function: Functions in C are blocks of code that perform a specific task,


are reusable, and help in modularizing the program.
A function in C is defined using the following syntax. For example: - a simple
function to add two integers.
Array: In C, an array is a collection of elements of the same data type
stored in contiguous memory locations. It allows you to store multiple values in a
single variable, accessed by an index.

Introduction to ARM core architecture:


Arm architecture Specifies a set of rules that dictate how the hardware works when
a particular instruction is executed.
It is a contract between the hardware and the software, defining how they interact
with one another.

Assembly language programming for LED interfacing:


Interfacing peripherals like LEDs, seven-segment displays, LCDs, and matrix
keyboards with a microcontroller using assembly language involves understanding
the hardware and how to manipulate the microcontroller's registers to control these
peripherals. Here’s a brief overview of each task:
LED Interfacing Single LED:
❖ Configure the microcontroller pin connected to the LED as an output.
❖ Use assembly instructions to set or clear the pin to turn the LED on or off.

Seven segment display interfacing:


➢ Seven-Segment Display Interfacing Common Cathode/Anode Display:

❖ Connect each segment to a microcontroller pin.


❖ Define the binary patterns for numbers 0-9.
❖ Send the appropriate pattern to the display.
Multiplexed Seven-Segment Display Counter:

Multiple Digits:

Connect each digit's common pin to a microcontroller pin.


Use a timer interrupt to multiplex the display.

LCD display:

Interfacing an LCD display with a microcontroller using assembly language


involves several steps. Here, I’ll provide an example for interfacing a common
character LCD (like the HD44780) with an 8051 microcontroller. This example
assumes an 8-bit data interface.

Matrix keyboard:

Interfacing a matrix keyboard with a microcontroller using assembly language


involves scanning the rows and columns of the keyboard to detect key presses.
Here, I'll provide an example for interfacing a 4x4 matrix keyboard with an 8051
microcontroller.

Matrix Keyboard Configuration


Matrix Keyboard Pins:
Rows: R1, R2, R3, R4
Columns: C1, C2, C3, C4
Connection to Microcontroller:
Rows connected to P1.0 to P1.3 (as outputs)
Columns connected to P1.4 to P1.7 (as inputs)

Embedded C language programming and conversion


of Embedded C language to Assembly Language:

Embedded C is a high-level programming language used to develop applications


for embedded systems. It's an extension of the C programming language, designed
to work on microcontrollers and other hardware devices with limited resources.
Converting Embedded C code to assembly language can be helpful for
optimization and understanding how high-level code translates into low-level
instructions.
Here's a basic overview of Embedded C and its conversion to assembly language:
Embedded C Programming Embedded C includes several features that
make it suitable for embedded systems:
Direct access to hardware: Allows manipulation of hardware registers and
memory.
Optimization: Ability to write time-critical code that needs to run efficiently.
Concurrency: Manage multiple tasks or processes simultaneously.
Converting Embedded C to Assembly Most compilers for embedded systems
can generate assembly code from C code. Here’s how the conversion process
typically works:
Compile the C Code: Use a compiler (like GCC) to convert C code into assembly
language.
Inspect the Assembly Code: Review the generated assembly code for
optimization or understanding.
Introduction to internal peripherals of LPC2148:

The LPC2148 microcontroller has several internal peripherals, including:


1. UART (Universal Asynchronous Receiver-Transmitter): for serial
communication.
2. SPI (Serial Peripheral Interface): for serial data transfer
3. I2C (Inter-Integrated Circuit): for communication with other devices
4. ADC (Analog-to-Digital Converter): converts analog signals to digital
5. DAC (Digital-to-Analog Converter): converts digital signals to analog
6. Timer/Counter: for timing and counting applications
7. PWM (Pulse Width Modulation): for generating digital signals with variable
width
8. GPIO (General Purpose Input/Output): for digital input/output operations
9. RTC (Real-Time Clock): for keeping track of time
10. SSP (Synchronous Serial Port): for serial data transfer

These peripherals enable the microcontroller to interact with external devices and
perform various tasks.

You might also like