Pavi Internship Report 2 PDF
Pavi Internship Report 2 PDF
Pavi Internship Report 2 PDF
An internship report on
“DESIGN AND DEVELOPMENT OF EMBEDDED SYSTEM AND IOT”
A Project Report submitted in partial fulfillment of the requirements for the VIII
Semester degree of Bachelor of Engineering in Electronics & Communication
Engineering of Visvesvaraya Technological University, Belagavi
Submitted by
PRAVEEN SHANTU RATHOD 2SR17EC028
Dr. ARUNKUMAR K M
Assistant Professor
Dept. of Elecronics and Comunication Engineering
S.T.J.I.T Ranebennur
CERTIFICATE
This is to certify that the Internship report entitled “DESIGN AND DEVELOPMENT OF
EMBEDDED SYSTEM AND IOT” submitted by PRAVEEN SHANTU RATHOD
(2SR17EC028) to the VISVESVARAYA TECHNOLOGICAL UNIVERSITY(VTU),
BELGAUM towards Partial fulfillment of the requirements for the award of the degree of
BACHELOR OF ENGINEERING(B.E) in ELECTRONICS AND COMMUNICATION
ENGINEERING
(ECE) is a bonafied record of the work carried out by her under supervision and guidance of
Dr. Arunkumar K M Assistant Professor, Dept of ECE, STJIT,Ranebennur during the
Academic year 2020-2021.
The information and data in the report is authentic to the best of my knowledge. This internship
training report is not being published or submitted to any other university for award of any other
degree, diploma or other similar titles.
From 30th September 2020 to 30th October 2020, I had the privilege and pleasure of joining a
team of dedicated leaders from INVENTERON TECHNOLOGIES AND BUSINESS
SOLUTIONS LLP, MYSORE. The goal of the internship was to help students by giving an
opportunity to work in their organization with their entire team and to make understand the
company working style and corporate standards, under the direction of Mr. Mohammed
AthaRazvi.
Finally, it is a pleasure and happiness to appreciate the friendly co-operations showed by all the
staff members of Electronics and Communication department, STJIT, Ranebennur.
1 CHAPTER 1
1.1 Introduction about the company 1
1.1(a) Company Profile 1
1.1(b) Services Offered 1
1.2 Company Strategy 2
1.2(a) Core Values 2
1.2(b) Goals 2
1.3 Company Products 2
1.4 Domains 3
1.5 Organizational Chart 3
2 CHAPTER 2
INTRODUCTION TO C LANGUAGE
2.1 Introduction and Programing Language 4-5
2.1(a) History of C 6
2.1(b) Characteristics of C 6
2.1(C) Structure of C Program 6
2.2 Identifiers 7
2.3 Data types 8
2.4 Operators 9-13
2.5 Control Statements 14-18
2.6 Functions 19-20
2.7 Pointers 20-21
3 CHAPTER 3
INTRODUCTION TO EMBEDDED SYSTEM
3.1 Embedded System 22
3.2 Feature of Embedded System 22-24
3.3 Application of Embedded System 24-25
4 CHAPTER 4
4.1 Introduction to 8051 microcontroller 26-33
4.2 Feature and Application of 8051 microcontroller 33-34
4.3 Introduction to IOT 35-36
5 CHAPTER 5
5.1 Introduction to keil and proteus software 37
5.2 Steps 38-39
DESIGN AND DEVELOPMENT OF EMBEDDED SYSTEM
CHAPTER 1
INTRODUCTION
1.1INTRODUCTION ABOUT COMPANY:
Inventeron’s core products are Embedded components (including IC’s, control boards,
Controllers, Microprocessors, fuel systems, Water Level controllers, Security Systems,
Biometric login systems, Wireless devices etc.), industrial products (Network Tower
Management systems) and Apps (E-commerce apps, website design and development).
COMPANY STATERGY:
1.2(b) GOALS:
• To improve, grow and become more efficient in the field electronics engineering and
Software development and develop a strong base of key clients.
• To understand customer requirements and fulfill them.
• Increase the assets and investments of the organization to support the development
Of services and expansion of the organization.
• To increase the productivity and improve the customer service satisfaction.
• To do Innovations in Embedded Electronics and provide quality services to deliver a
Range of products.
COMPANY PRODUCTS:
Inventeron Technologies and Business Solutions LLP have it company products like-
• Smart Surveillance system
• Safety and Security Systems
• Biometrics
• Smart Traffic Systems
• Vehicle Tracking Systems
• Tower Management System
• Education Management Systems
• Hotel Management System
• Personal safety Equipment’s
• Wireless Communication Devices
• LED Products
• Water Controlling Units
DOMAINS:
Inventeron Technologies and Business Solutions LLP have working with several
Domains like:
• Information Technology
• Government
• Food and Beverages
• Health Care
• Outsourcing
ORGANISATIONAL CHART:
CHAPTER 2
INTRODUCTION TO C LANGUAGE
INTRODUCTION
Software is a collection of programs and a program is a collection of instructions given to the
computer. Development of software is a stepwise process. Before developing software, number
of processes is done. The first step is to understand the user requirements. Problem analysis
arises during the requirement phase of software development. Problem analysis is done for
obtaining the user requirements and to determine the input and output of the program.
For solving the problem, an "algorithm" is implemented. Algorithm is a sequence of steps that
gives method of solving a problem. This "algorithms" creates the logic of program. On the basis
of this “algorithm", program code is written. The steps before writing program code are as-
User requirements
Problem analysis
Designing algorithm
Program coding
Process of program development
DESIGN METHOD:
Designing is the first step for obtaining solution of a given problem. The purpose of
designing is to represent the solution for the system. It is really difficult to design a large
system because the complexity system cannot be represented easily. So various methods
have been evolved for designing.
BOTTOM UP DESIGN:
Bottom-Up design method is the reverse of Top-Down approach. It starts from the lowest
level component to the highest-level component. It first designs the basic components
and from these basic components the higher-level components are designed.
PROGRAMMING LANGUAGE
Before learning any language, it is important to know about the various types of languages and
their features. It is interesting to know what the basic requirements of the programmers were and
what difficulties they faced with the existing languages. The programming languages can be
classified into two types
1. Low level languages
2. High level languages
The languages in this category are the Machine level language and Assembly language.
Computers can understand only digital signals, which are in binary digits i.e. 0 and 1. So the
instruction given to the computer can be only in binary codes. The machine language consists of
instructions that are in binary 0 or 1. Computers can understand only machine level language.
Writing a program in machine level language is a difficult task because it is not easy for
programmers to write instructions in binary code. A machine level language program is error-
prone and its maintenance is very difficult. Furthermore machine language programs are not
portable. Every computer has its own machine instructions, so the programs written for one
computer are not valid for other computers.
2. HIGH-LEVEL LANGUAGE:
High-level languages are designed keeping in mind the features of portability i.e. these languages
are machine independent. These are English like languages, so it is easy to write and understand
the programs of high-level language. While programming in a high level language, the
programmer is not concerned with the low level details, and so the whole attention can be paid to
the logic of the problem being solved. For translating a high-level language program into
machine language, compiler or interpreter is used. Every language has its own compiler or
interpreter. Some languages in this category are- FORTRAN, COBOL, BASIC, Pascal etc.
2.1(a) HISTORY OF C
In earlier days, every language was designed for some specific purpose. For example FORTRAN
(Formula Translator) was used for scientific and mathematical applications, COBOL (Common
Business Oriented Language) was used for business applications. So need of such a language
was felt which could withstand most of the purposes. "Necessity is the mother of invention".
From here the first step towards C was put forward by Dennis Ritchie.
The C language was developed in 1970's at Bell laboratories by Dennis Ritchie. Initially it was
designed for programming in the operating system called UNIX. After the advent of C, the
whole UNIX operating system was rewritten using it. Now almost the entire UNIX operating
system and the tools supplied with it including the C compiler itself are written in C.
2.1(b) CHARACTERISTICS OF C
It is a middle level language. It has the simplicity of a high level language as well as the power
of low level language. This aspect of C makes it suitable for writing both application' programs
and system programs. Hence it is an excellent, efficient and general-purpose language for most
of the application I such as mathematical, scientific, business and system software applications.
C is small language, consisting of only 32 English words known as keywords (if, else, for, break
etc…) the power of C is augmented by the library functions provided with it. Moreover, the
language is extendible since it allows the users to add their own library functions to the library.
2.1(c) STRUCTURE OF C
C program is a collection of one or more- functions. Every function is a collection of statements
and performs some specific task. The general structure of C program is-
Comments
Preprocessor directives
Global variables
Main ( ) function
{
Local variables
Statements
………..
………..
}
Func 1( )
{
Local variables
Statements
………..
………..
}
Func 2 ( )
{
Local variables
Statements
………..
………..
}
Comments can be placed anywhere in a program and are enclosed between the delimiters /* and
*/. Comment are generally used for documentation purposes
IDENTIFIERS
All the words that we'll use in our C programs will be either keywords or identifiers. Keywords
are predefined and can't be changed by the user, while identifiers are user defined words and are
used to give names to entities like variables, arrays, fUi1ctions, structures etc. Rules for naming
identifiers are given below-
(1) The name should consist of only alphabets (both upper and lower case), digits and
Underscore sign (_).
(2) First character should be an alphabet or underscore.
(3) The name should not be a keyword.
(4) Since C is case sensitive, the uppercase and lowercase letters are considered different. For
example code, Code and CODE are three different identifiers.
(5) An identifier name may be arbitrarily long. Some implementations of C recognize only the
first eight characters, though most implementations recognize 31 characters. ANSI standard
compilers recognize 31 characters.
The identifiers are generally given meaningful names. Some examples of valid identifier names-
Value a
Net _pay rec1 _data MARKS examples of invalid identifier names are-
DATA TYPES
C supports different types of data. Storage representation of these data types is different in
memory. There are four fundamental data types in C, which are int, char, and float and double..
'char' is used to store any single character, ‘int’ is used to store integer value, 'float' is used for
storing single precision floating point number and 'double' is used for storing double precision
floating point number. We can use type qualifiers with these basic types to get some more types.
There are two types of type qualifiers
1. Size qualifiers - short, long
2. Sign qualifiers signed, unsigned
When the qualifier unsigned is used the number is always positive, and when signed is used
number may be positive or negative. If the sign qualifier is not mentioned, then by default signed
qualifier is assumed. The range of values for signed data types is less than that of unsigned type.
This is because in signed type, the leftmost bit is used to represent the sign, while in unsigned
type this bit is also used to represent the value.
The size and range of different data types on a 16-bit machine is given in the following table.
The size and range may vary on machines with different word sizes.
Basic data type Data type with type qualifier Size(Byte) Range
Char Char or signed char 1 -128 to 127
Unsigned char 1 0 to 255
int int or signed int 2 -32768 to 32767
unsigned int 2 0 to 65535
short int or signed short int 1 -128 to 127
unsigned short int 1 0 to 255
long int or signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
Float float 4 3.4E-38 to 3.4E+38
double double 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932
OPERATORS
An operator specifies an operation to be performed that yields a value. The variables, constants
can be joined by various operators to form an expression. An operand is a data item on which an
operator acts. Some operators require two operands, while others act upon only one operand. C
includes a large number of operators that fall under several different categories, which are as
1. Arithmetic operators
2. Assignment operators
3. Increment and Decrement operators
4. Relational operators
5. Logical operators
6. Conditional operator
7. Comma operator
8. Size of operator
9. Bitwise operators
10. Other operators
1. ARITHMETIC OPERATORS:
Operators Purpose
+ Addition
- Subtraction
* Multiplication
/ Division
% Gives the remainder in integer division
% (modulus operator) cannot be applied with floating point operands. There is no exponent
operator in C. However there is a library function pow () to carry out exponentiation operation.
Note that unary plus and unary minus operators are different from the addition and subtraction
operations.
2. ASSIGNMENT OPERATORS:
A value can be stored in a variable with the use of assignment operator. This assignment operator
" = " is used in assignment expressions and assignment statements.
The operand on the left hand side should be a variable, while the operand on the right hand side
can any variable, constant or expression. The value of right hand operand is assigned to the left
hand operand. Here are some examples of assignment expressions
x = 8/* 8 is assigned to x*/
y = 5/* 5 is assigned to y*/
s = x+y-2/* Value of expression x+y-2 is assigned to s*/
y = x /* Value of x is assigned to y*/
x = y /* Value of y is assigned to x*/
The value that is being assigned is considered as value of the assignment expression. For
Example = 8 is an assignment expression whose value is 8.
We can have multiple assignment expressions also, for example
x = y = z = 20
Here all the three variables x, y, t will be assigned value 20, and the value of the whole
expression will be 20.
If we put a semicolon after the assignment expression then it becomes an assignment statement.
For example these are assignment statements
x = 8;
y=5;
s = x+y-2;
x = y = z = 20;
When the variable on the left hand side of assignment operator also occurs on right hand side
then we can avoid writing the variable twice by using compound assignment operators. For
example
x=x+5
Similarly we have other compound assignment operators
x =5 is equivalent to = x – 5
Y*=5 is equivalent to y = y* 5
Sum/=5 is equivalent to sum = sum / 5
K%= 5 is equivalent to k = k % 5
C has two useful operators increment (++) and decrement (- -). These are unary operators
because they operate on a single operand. The increment operator (++) increments the value of
the variable by 1 and decrement operator (- -) decrements the value of the variable by 1.
++x is equivalent to x = x + 1
- -x is equivalent to x = x - 1
These operators should be used only with variables; they can't be used with constants or
expressions. For example the expressions ++5 or ++(x+y+z) are invalid.
These operators are of two types:
1. Prefix increment / decrement - operator is written before the operand (e.g. ++x or - -x)
2.Postfix increment / decrement - operator is written after the operand (e.g. x++ or x - -)
4. RELATIONAL OPERATORS:
Relational operators are used to compare values of two expressions depending on their relations.
An expression that contains relational operators is called relational expression. If the relation is
true "then we value of relational expression is 1 and if the relation is false then the value of
expression is O. The relational operators are
Operators Meaning
< Less than
<= Less than or equal to
== Equal to
!= Not equal to
> Greater than
>= Greater than or equal to
5. LOGICAL OPERATORS:
An expression that combines two or more expressions is termed as a logical expression. For
combining these expressions we use logical operators. These operators return 0 for false and 1
for true. The operands may be constants, variables or expressions. C has three logical operators.
Operators Meaning
&& AND
|| OR
! NOT
This operator gives the net result true if both the conditions are true, otherwise the result is false.
Boolean Table
Here both the conditions a = = 10 and b <a are true, and hence this whole expression is true.
Since the logical operators return 1 for true hence the value of this expression is 1.
2. OR (||) OPERATOR:
This operator gives the net result false, if both the conditions have the value false, otherwise the
result is true.
Boolean Table
3. NOT (!)OPERATOR:
This is a unary operator and it negates the value of the condition. If the value of the condition is
false then it gives the result true. If the value of the condition is true then it gives the result false.
Boolean Table
Condition Result
False True
True False
6. CONDITIONAL OPERATORS:
Conditional operator is a ternary operator (? And :) which requires three expressions as operands.
This written as
Test Expression? expression1: expression2
Firstly the Test Expression is evaluated.
(1) If Test Expression is true (nonzero), then expression1 is evaluated and it becomes the
value of the overall conditional expression.
(2) If Test Expression is false (zero), then expression2 is evaluated and it becomes the value
of overall conditional expression.
For example consider this conditional expression-
a >b? a: b
7. COMMA OPERATORS:
The comma operator (,) is used to permit different expressions to appear in situations where only
one expression would be used. The expressions are separated by the comma operator. The
separated expressions are evaluated from left to right and the type and value of the rightmost
expression is the type and value of the compound expression.
For example consider this expression-
a = 8, b = 7, c = 9, a+b+c
Here we have combined 4 expressions. Initially 8 is assigned to the variable a, then 7 is assigned
to the variable b, 9 is assigned to variable c and after this a+b+c is evaluated which becomes the
value of whole expression. So the value of the above expression is 24. Now consider this
statement
Sum = (a = 8, b = 7, c = 9, a+b+c);
8. SIZE OF OPERATORS:
Size of a unary operator, this operator gives the size of its operand in terms of bytes. The operand
can be a variable, constant or any data type (int, float, char etc.). For example size of (int) gives
the bytes occupied by the int data type i.e.2
9. BITWISE OPERATORS:
C has the ability to support the manipulation of data at the bit level. Bitwise operators are used
for operations on individual bits. Bitwise operators operate on integers only. The bitwise
operators are as
CONTROL STATEMENT:
In C programs, statements are executed sequentially in the order in which they appear in the
program. But sometimes we may want to use a condition for executing only a part of program.
Also many situations arise where we may want to execute some statements several times.
Control statements enable us to specify the order in which the various instructions in the program
are to be executed. This determines the flow of control. Control statements define how the
control is transferred to other parts of the program. C language supports four types of control-
statements, which are as
1. if...else
2. go to
3. Switch
4. loop
-while
- do...while
-for
1. if…else:
This is a bi-directional conditional control statement. This statement is used to test a condition
and take one of the two possible actions. If the condition is true then a single statement or a block
of statements is executed (one part of the program), otherwise another single statement or a block
of statements is executed (other part of the program). Recall that in C, any nonzero value is
regarded as true while zero is regarded as false.
Syntax:
if (condition) if (condition)
Statement 1; {
Statement; ………
}
Condition
True
False
Statement 1
Next Statement
Here if the condition is true (nonzero) then statement! Is executed, and if it is false (zero), then
the next statement which is immediately after the if control statement is executed.
2. go to:
This is an unconditional control statement that transfers the flow of control to another part of the
program.
The go to statement can be used as-
go to label;
……..
……..
label:
Statement;
………
……..
Here label is any valid C identifier and it is followed by a .colon. Whenever the statement go to
label; is encountered, the control is transferred to the statement that immediately after the label.
3. Switch:
Case constant 1:
Statement
…………
Case constant 2:
Statement
…………
………....
…………
Case constant N:
Statement
………..
default:
Statement
………..
}
4. loops:
loops are used when we want to execute a part of the program or a block of statements several
times. For example, suppose we want to print "e is the best" 10 times. One way to get the desired
output. We write 10 printf statements, which is not preferable. Other way out is - use loop. Using
loop can write one loop statement and only one printf statement, and this approach is definitely
better the first ·one. With the help of loop we can execute a part of the program repeatedly till
some condition is true.
There are three loop statements in C-
1. While
2. do while
3. for
1. While loop:
While statement can be written as:
While (condition) while (condition)
Statement; {
Statement; ……...
Statement; }
False
While (condition)
True
Body of loop
Next Statement out of
loop
Like if-else statement here also we can have a single statement or a block of statements, a here it
is known as the body loop. Now let's see how this -loop works.
2. do while loop:
The 'do...while' statement is also used for looping. The body of this loop may contain a single
statement or a block of statements. The syntax for writing this loop is:
do do
Statement; {
While (condition); statement;
Statement;
While (condition); }
Body of loop
False
Condition
True
Next statement out of
loop
Flow chart of do ... while loop
Here firstly the statements inside loop body are executed and then the condition is evaluated. If
the condition is true, then again the loop body is executed and this process continues until the
conditional becomes false. Note that unlike while loop, here a semicolon is placed after the
condition.
3. for loop:
The 'for' statement is very useful while programming in C. It has three expressions and
semicolons are used for separating these expressions. The 'for' statement can be written as-
for (expression1; expression2; expression3)
Statement;
for (expression1; expression2; expression3)
{
Statement;
Statement;
………..
}
The loop body can be a single statement or block of statements.
Expressional is an initialization expression, expression2 is a test expression or condition and
expression3 .is an update expression. Expression1 is executed only once when the loop starts and
is used to initialize the loop... variables. This expression is generally an assignment expression.
Expression2 is a condition and is tested before each iteration of the loop. This condition
generally uses relational and logical operators. Expression3 is an update expression and is
executed each time after the body of the loop is executed.
Initialization expression
False
Condition
True
Body of loop
Update expression
FUNCTIONS:
A function is a self-contained subprogram that is meant to do some specific, well-defined task.
A (program consists of one or more functions. If a program has only one function then it must be
the main) function.
1. FUNCTION DEFINITION:
The function definition consists of the whole description and code of a function. It tells what the
functional is doing and what are its inputs and outputs. A function definition consists of two
parts - a functional header and a function body. The general syntax of a function definition is-
return_ type func_ name (type1 arg1, type2 arg2,……)
{
local variables declarations;
Statement;
………….
return (expression);
}
The first line in the function definition is known as the function header and after this the body of
the function is written enclosed in curly braces.
The return type denotes the type of the value that will be returned by the function. The return_
type is optional and if omitted, it is assumed to be int by default. A function can return. Either
one value 0 no value if a function doe~ not return any value then void should be written in place
of return_ type func_ name specifies the name of the function and it can be any valid C
identifier.
2. FUNCTION DECLARATION:
The calling function needs information about the called function. If definition of the called
function placed before the calling function, then declaration is not needed.
Here the definition of sum ( ) is written before main ( ), so main ( ) knows everything about the
function sum ( ). But generally the function main ( ) is placed at the top and all other functions
are placed after it. In this case, function declaration is needed. The function declaration is also
known -as the function prototype, and it informs the compiler about the following three things
1. Name of the function
2. Number and type of argument received by the function.
3. Type of value returned by the function.
Function declaration tells the compiler that a function with these features will be defined and
used later in the program. The general syntax of a function declaration is-
return type func_ name (type1, arg1, type2 arg2, ....... );
3. FUNCTION CALL:
The function definition describes what a function can do, but to actually use it in the program the
function should be called somewhere. A function is called by simply writing its name followed
by the argument list inside the parentheses.
func_ name (arg1, arg2, arg3 ... )
These arguments arg1, arg2, , .. are called actual arguments.
main ( ) func1 ( )
{ {
Statement 1; ………….
func 1( ); ………….
Statement 2; }
Statement 3;
func 2(9, 3);
Statement 4; func2 (int a, int b)
Statement 5; {
} ………….
………….
}
POINTERS:
C is a very powerful language and the real power of C lies in pointers. The concept of pointers is
interesting as well as challenging. It is very simple to use pointers provided the basics are
understood thoroughly. So it is necessary to visualize every aspect of pointers instead of just
having a superficial knowledge about their syntax and usage. The use of pointers makes the code
more efficient and compact.
Some of the uses of pointers are-
(i)Accessing array elements.
(ii) Returning more than one value from a function.
POINTER VARIABLE:
Finally after this brief introduction, it is time to introduce pointers. A pointer is a variable that
store memory address. Like all other variables it also has a name, has to be declared and
occupies some space memory. It is called pointer because it points to a particular location in
memory by storing the address of that location.
POINTER TO POINTER:
We know that pointer is a variable that can contain memory address. This pointer variable takes
some space in memory and hence it also has an address. We can store the address of a pointer
variable in some other variable, which is known as a pointer to pointer variable. Similarly we can
have a pointer to pointer to pointer variable and this concept can be extended to any limit, but in
practice only pointer to pointer IS used. Pointer to pointer is generally used while passing pointer
variables to functions.
The syntax of declaring a pointer to pointer is as-
data type **pptr;
Here variable pptr is a pointer to pointer and it can point to a pointer pointing to a variable of
type data type. The double asterisk used in the declaration informs the compiler that a pointer to
pointer is being declared.
CHAPTER 3
EMBEDDED SYSTEM:
It is a combination of hardware & software which is designed to perform one or more specific set
of functions. In an embedded system, there is only one application software that is typically
burned into ROM.
Modern embedded systems are often based on microcontrollers (i.e. microprocessors with
integrated memory and peripheral interfaces), but ordinary microprocessors (using external chips
for memory and peripheral interface circuits) are also common, especially in more complex
systems.
In either case, the processor(s) used may be types ranging from general purpose to those
specialized in certain class of computations or even custom designed for the application at hand.
A common standard class of dedicated processors is the digital signal processor (DSP).Since the
embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the
size and cost of the product and increase the reliability and performance.
• Embedded systems are small size, low power consumption, rugged operating ranges &
Low per unit cost.
• Embedded systems are based on microcontroller that is CPUs with integrated memory
Or peripheral interfaces.
• Wide variety of operating systems and processors are used in embedded systems.
• They are highly reliable. Internship on DESIGN AND DEVELOPMENT OFEMBEDDED
SYSTEM and IOT Dept. of. ECE, MYCEM, Mysore.
• The power consumption is very low. An embedded system is a controller with a
Dedicated function within a larger mechanical or electrical system.
Embedded system Hardware components are as follows:
• Power supply
• Processor
• Memory
• Timers/Counters
• Communication ports
• Assembler
• Application specific circuits
• Reset & oscillator circuits
• Input devices interfacing / Driver circuits
• Output devices interfacing / Driver circuits
• Interrupt controller
An embedded system is a system that has software or firmware embedded in computer hardware.
It makes a system dedicated to a specific part of an application or product of a larger system.
Depending on the application, embedded system may be programmable or non-programmable.
Examples of embedded systems include various products such as washing machine, microwave
ovens, cameras, printers and automobiles. They use microprocessors and microcontrollers as
well as specially designed processors such as digital signal processors (DSP).
Embedded systems find wide applications in day to day situations and in real time applications,
few of them have been listed below.
The main intention of this project is to design a highway speed-checker device that identifies
rash driving on highways and alarms the traffic authorities if the speed checker finds any vehicle
violating the set speed limits on highways.
The main intention of this project is to detect the movement of vehicles on highways and to
switch on street lights ahead of it, and then to switch off the street lights as the vehicle go past
the street lights to conserve energy. In this project, a PIC microcontroller is programmed by
using embedded C or assembly language.
The main goal of this project is to design a density-based traffic signal system. At every junction,
the signal timing changes automatically according to the traffic density at every junction. Traffic
jam is a major problem in many cities across the world and gives regular nightmares to the
commuters and travelers.
The main purpose of this project is to find the exact location of a vehicle by using a GPS modem
and in order to reduce vehicle thefts. The GSM modem sends an SMS to a predefined mobile
which stores the data in it. An LCD display is used to display the location information in terms
of latitude and longitude values. The microcontroller (AT89C52) is preprogrammed with the
Kiel software and therefore, continuously checks the GPS modem.
The main purpose of this project is to design a home automation system with the Android
application based remote control. Remote operation is performed by Android OS based smart-
phone or Tablet etc., upon a Graphical User Interface based touch screen operation. In order to
achieve this, Android application act as a transmitter that sends on/off commands to the receiver
where in loads are connected.
This project is designed to auto intensity control of LED based street lights by using solar power
from the photovoltaic panels. The awareness for solar energy is increasing, and many institutions
and peoples are opting solar energy. In this project, photovoltaic panels are used for charging
batteries by converting the sun energy into electrical energy. A solar charge controller circuit is
used to control the charging.
CHAPTER 4
The 8051 is an 8-bit microcontroller with 8-bit data bus and16-bit address bus.
The 16-bit address bus can address a 64K (216) byte code memory space and a
separate 64K byte of data memory space.
The 8051 has 4K on-chip read only code memory and 128 bytes of internal Random
Access Memory (RAM).
Besides internal RAM, the 8051 has various Special Function Register (SFR) such as
the Accumulator, the B register, and many other control registers.
34 8-bit general purpose registers in total.
The ALU performs one 8-bit operation at a time.
Two 16 bit/counter timers.
3 internal interrupts (one serial), 2 external interrupts.
Four 8-bit I/O ports.
Some 8051 chips come with UART for serial communication and ADC for analog to
digital conversion.
MICROCONTROLLER MICROPROCESSOR
A microcontroller is a dedicated chip A microprocessor is a general
which is also called single chip purpose device which is called a
computer. CPU.
A microcontroller includes RAM, A microprocessor do not contain on
ROM, serial and parallel interfaces, chip I/O ports, Timers, Memories etc.
timers, interrupt circuitry (in addition
to CPU) in a single chip.
Microcontrollers are used in small , Microprocessors are most commonly
minimum component designs used as the CPU in microcomputer
performing control-oriented systems.
applications
PINS 1-8: port1 each of these pins can be configured as an input or an output.
PIN 9: RST A logic one on this pin disables the microcontroller and clears the contents
of most registers. In other words, the positive voltage on this pin resets the
microcontroller. By applying logic zero to this pin, the program starts execution from the
beginning.
PINS 10-17: port 3 similar to port 1, each of these pins can serve as general input or
output. Besides, all of them have alternative functions.
PIN 10: RXD serial asynchronous communication input or serial synchronous
communication output.
PIN 11: TXD serial asynchronous communication output or serial synchronous
communication clock output.
PIN 12: INT0 Interrupt 0input.
PIN 13:INT1 Interrupt 1 input.
PIN 14: T0 Counter 0 clock input.
PIN 15: T1 Counter 1 clock input.
PIN 16: WR Write to external (additional) RAM.
PIN 17: RD Read from external RAM.
PIN 18, 19:XTAL2/XTAL1 is for oscillator input.
PIN 20: GND –Ground.
PIN 21-28: Port 2–If there is no intention to use external memory then these port pins are
configured as general inputs/outputs. In case external memory is used, the higher address
byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity
of 64Kb is not used, which means that not all eight port bits are used for its addressing,
the rest of them are not available as inputs/outputs.
PIN 29: PSEN –Program store Enable. If external ROM is used for storing program, then
a logic zero (0) appears on it every time the microcontroller reads a byte from memory.
PIN 30: ALE-Address latch enable.
1- Address on AD0 to AD7.
0- Data on AD0 to AD7.
PIN 31: EA- it indicates the presence of external memory.
PIN 32-39: Port 0 similar to P2.
PIN 40: VCC +5V power supply.
The CPU is the brain of the microcontrollers expected task reading user’s programs and
executing as per the instruction stored there in.
Its primary elements are an Accumulator (AC), Stack Pointer (SP), Program Counter
(PC), Program Status Word (PSW), Data Pointer (DTPR) and few more 8-bit register.
The Arithmetic logic unit performs the computing functions; it includes the accumulator,
temporary register, arithmetic and logic circuits.
The temporary register is used to hold data during an arithmetic /logic operation.
The result is stored in accumulator register.
ACCUMULATOR:
The accumulator register has been allotted on address in the on –chip special function
register
This set of flags contains the status information and is considered as one of the special function
registers.
D7 D6 D5 D4 D3 D2D1 D0
PSW.7 PSW.6 PSW.5 PSW.4 PSW.3 PSW.2 PSW.1 PSW.0
The bits PSW.3 and PSW.4 are denoted as RS0 and RS1. These bits are used to select the bank
register of the RAM location.
This 8-bit register is incremented before the data is stored onto the stack using PUSH or
CALL instructions.
This registers contains 8-bit stack top address. The stack may be defined anywhere in the
on-chip 128 byte RAM. After reset, the SP register is initialized to 07.
After each write two stack operation, the 8-bit contents of the operand are stored onto the
stack, after incrementing the SP register by 1.
Thus if SP contains 07H, the forthcoming PUSH operation will store the date at address
08H in the internal RAM.
The SP content will be incremented to 08.the 8051 stack is not a top-down data structure,
like other Intel processors. This register has also been allotted on address in the special
function register bank.
This 16-bit register contains a higher byte (DPH) and the lower byte (DPL) of a 16-bit
external data RAM address.
It is accessed as a 16-bit register or two 8-bit registers as specified above. It has been
allotted to two address in the special function register bank, for its two bytes DPH and
DPL.
This four latches and driver pairs are allotted to each of the four on-chip I/O ports.
These latches have been allotted address in the especial function register bank.
Using the allotted addresses, the users can communicate with these ports. These are
identified as P0, P1 and P3.
TIMER REGISTER
These two 16-bit register can be accessed as the lower and upper bytes.
For examples, TL0 represents the lower byte of the timing register 0, while TH0
represents the upper byte of the timing register 0.
Similarly, TL1 and TH1 represent lower and higher byte of the timing register 1.
All these registers as be accessed using the four addresses allotted to them which lie in
the special function register (SFR) address range,i.e.80Hto FF.
CONTROL REGISTER
The special function register IP, IE, TMOD, TCON, SCON and PCON contain control
and status information for interrupts, Timer / Counters and serial port.
All of the registers have been allotted addresses in the special function register bank of
8051.
This unit derives all the necessary timing and control signals recovered for the internal
operation of the circuit.
It also derives control signals recovered for controlling the system bus.
OSCILLATOR
This circuit generates the basic timing clock signal for the operation of the circuit using
crystal oscillator.
INSTRUCTION REGISTER
This register decodes the OPCODE of an instruction to be executed and gives information to
the timing and control unit to generate necessary signal for the execution of the instruction.
These blocks provide internal 128 bytes of RAM and a mechanism to address it internally.
This is a set of special function registers, which can be addressed using their respective
addresses which lie in the range of 80H to FFH.
Finally, the interrupt, serial port and timer units control and perform their specific
function under the control of the timing and control unit.
The microcontroller 8051 applications include a large amount of machines, principally because it
is simple to incorporate in a project or to assemble a machine around it. The following are the
key spots of the spotlight:
2. Touch screens: A high degree of microcontroller suppliers integrate touch sensing abilities in
their designs. Transportable devices such as media players, gaming devices & cell phones are
some illustrations of micro-controller integrated with touch sensing screens.
4. Medical Devices: Handy medicinal gadgets such as glucose & blood pressure monitors bring
into play micro-controllers, to put on view the measurements, as a result, offering higher
dependability in giving correct medical results.
INTRODUCTION TO IOT:
The internet of Things (IOT) is the network of physical objects or “things” embedded with
electronics, software, sensors, and network connectivity, which enables these objects to collect
and exchange data.
IOT has many applications in agriculture, smart cities, smart home, healthcare, business sectors,
Traffic monitoring, transport and logistics etc. This is growing mega trend that will influence
everything from businesses to our daily personal lives.
The internet of things, or IOT, is a system of interrelated computing devices, mechanical and
digital machines, objects, animals or people that are provided with unique identifiers (UIDs) and
the ability to transfer data over a network without requiring human-to human or human-to-
computer interaction.
The definition of the Internet of things has evolved due to the convergence of multiple
technologies, real-time analytics, machine learning, commodity sensors, and embedded systems.
Traditional fields of embedded systems, wireless sensor networks, control systems, automation
(including home and building automation), and others all contribute to enabling the Internet of
things.
In the consumer market, IOT technology is most synonymous with products pertaining to the
concept of the "smart home", covering devices and appliances (such as lighting fixtures,
thermostats, home security systems and cameras, and other home appliances) that support one or
more common ecosystems, and can be controlled via devices associated with that ecosystem,
such as smart phones and smart speakers.
APPLICATIONS OF IOT
Internet of Things (IOT) has introduced wide spectrum of applications. Few of the applications
have been discussed in following sections.
Consumer Applications: A growing portion of IOT devices are created for consumer use,
including connected vehicles, home automation, wearable technology (as part of Internet of
Wearable Things (IOWT), connected health, and appliances with remote monitoring capabilities.
Smart Home: IOT devices are a part of the larger concept of home automation, which can
include lighting, heating and air conditioning, media and security systems. Long-term benefits
could include energy savings by automatically ensuring lights and electronics are turned off.
A smart home or automated home could be based on a platform or hubs that control smart
devices and appliances. For instance, using Apple's Home Kit, manufacturers can have their
home products and accessories controlled by an application in IOS devices such as the iPhone
and the Apple Watch. This could be a dedicated app or IOS native applications such as SIRI.
This can be demonstrated in the case of Lenovo's Smart Home Essentials, which is a line of
smart home devices that are controlled through Apple's Home app or SIRI without the need for a
Wi-Fi bridge.
There are also dedicated smart home hubs that are offered as standalone platforms to connect
different smart home products and these include the Amazon Echo, Google Home, Apple's
Home Pod, and Samsung's Smart Things Hub. In addition to the commercial systems, there are
many non-proprietary, open source ecosystems; including Home Assistant, Open HAB and
Demotic.
Elder care: One key application of a smart home is to provide assistance for those with
disabilities and elderly individuals. These home systems use assistive technology to
accommodate an owner's specific disabilities. Voice control can assist users with sight and
mobility limitations while alert systems can be connected directly to cochlear implants worn by
hearing-impaired users.
They can also be equipped with additional safety features. These features can include sensors
that monitor for medical emergencies such as falls or seizures. Smart home technology applied in
this way can provide users with more freedom and a higher quality of life. The term "Enterprise
IOT" refers to devices used in business and corporate settings. By 2019, it is estimated that the
EIOT will account for 9.1 billion devices.
The Internet of Medical Things (also called the internet of health things) is an application of the
IOT for medical and health related purposes, data collection and analysis for research, and
monitoring. This 'Smart Healthcare', as it is also called, led to the creation of a digitized
healthcare system, connecting available medical resources and healthcare services.
IOT devices can be used to enable remote health monitoring and emergency notification systems.
These health monitoring devices can range from blood pressure and heart rate monitors to
advanced devices capable of monitoring specialized implants, such as pacemakers, Fit bit
electronic wristbands, or advanced hearing aids.
Some hospitals have begun implementing "smart beds" that can detect when they are occupied
and when a patient is attempting to get up. It can also adjust itself to ensure appropriate pressure
and support is applied to the patient without the manual interaction of nurses.
CHAPTER 5
This manual is an introduction to the KEIL development tools designed for Cortex-MX, ARM7,
ARM9, C166, XE166, XC2000, and 8051 microcontrollers. It introduces the µVision Integrated
Development Environment, Simulator, and Debugger and presents a step-by-step guided tour of
the numerous features and capabilities the KEIL embedded development tools offer.
INTRODUCTION TO PROTEUS:
Proteus is one of the most famous simulators. It can be used to simulate almost every circuit on
electrical fields. It is easy to use because of the GUI interface that is very similar to the real
prototype board. Moreover, it can be used to design Print Circuit Board (PCB).
STEPS
The project development cycle is similar to any other software development project.
1. Create a project, select the target device from the Device Database, and configure the
tools settings.
2. Create source files in c
3. Build applications with project manager
4. Debug and correct errors in source files, verify and optimize application
5. Download code to flash ROM or SRAM and test the linked application
PROCEDURE:
STEP1: After opening Keil uV4, Go to PROJECT tab and create new uVision project.
Now select new folder and give name to project.
STEP2: After creating project now select your device model. E.g.: NXP-LPC2148.
STEP3: So now your project is created and message window will appear to add startup file of
your Device click on YES so it will be added to your project folder.
STEP4: Now go to file and create new file and save it with .C extension if you will write
program in c language or save with .asm for assembly language. E.g. led.c
STEP6: After that on left you can see project window [if it’s not there….. go to view tab and
click on project window] ---And now come on project window.
Click output tab here and check create hex file if you want to generate hex file. Now click on
ok so it will save changes.
STEP7: Now Expand target and you will see source group.
Right click on group.
Now add your program file which you have written in C/assembly. You can see program file
added under source group.
STEP8: Now click on Build target. You can find it under project tab or in toolbar. It can also
be done by pressing F7 key.
STEP9: You can see status of your program in Build output window [if it’s not there go to
view and click on build output window].
Sbit led=P2^1;
Int i, j;
Void main ()
While (1)
Led =1;
Delay (20);
Led =0;
Delay (20);
Output in keil:
Output in Proteus:
PROJECT
This project describes the evolving role of robotics in healthcare and allied areas with
special concerns relating to the management and control of the spread of the novel corona
virus disease 2019 (covid-19).
The prime utilization of such robots is to minimize person to person contact and to ensure
cleaning, sterilization and support in hospitals and similar facilities such as quarantine.
This well result in minimizing the life threat to medical staff and doctors taking an active
role in the management of the covid -19 pandamic.
PROGRAM
#include <reg51.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
//DEFINE CONSTANT
#define Baud_rate 0xFD // BAUD RATE 9600
//DEFINE PROTOTYPES
void SerialInitialize (void);
void SendByteSerially (unsigned char);
void cct_init (void);
void Send_string (unsigned char);
void forward ()
{
Motor1 = 1;
Motor2 = 0;
Motor3 = 1;
Motor4 = 0;
}
void Backward ()
{
Motor1 = 0;
Motor2 = 1;
Motor3 = 0;
Motor4 = 1;
void right ()
{
Motor1 = 1;
Motor2 = 0;
Motor3 = 0;
Motor4 = 1;
}
void left()
{
Motor1 = 0;
Motor2 = 1;
Motor3 = 1;
Motor4 = 0;
void stop ()
{
Motor1 = 1;
Motor2 = 1;
Motor3 = 1;
Motor4 = 1;
void forward1 ()
{
Motor4 = 1;
Motor5 = 0;
}
void Backward1 ()
{
Motor4 = 0;
Motor5 = 1;
}
void stop1 ()
{
Motor5 = 1;
Motor4 = 1;
}
void main ()
{
cct_init ();
SerialInitialize ();
//lcd initialise
EA = 1;
ES = 1;
while (1) {
}
}
if (chr=='f')
{
Send_string ("robot forward");
forward ();
}
else if (chr=='b')
{
RI = 0;
}
Output in keil
Output in proteus