0% found this document useful (0 votes)
4 views

Embedded Systems

An embedded system is a combination of hardware and software designed for specific tasks, with examples including mobile phones and microcontrollers. Microcontrollers are categorized by memory type, architecture, instruction set, bus-width, and manufacturer, with notable types being CISC and RISC. Additionally, Arduino serves as an open-source platform for easy prototyping, featuring a simple programming structure and various components for interfacing with digital and analog signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Embedded Systems

An embedded system is a combination of hardware and software designed for specific tasks, with examples including mobile phones and microcontrollers. Microcontrollers are categorized by memory type, architecture, instruction set, bus-width, and manufacturer, with notable types being CISC and RISC. Additionally, Arduino serves as an open-source platform for easy prototyping, featuring a simple programming structure and various components for interfacing with digital and analog signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Embedded Systems

An embedded system is a smart system that consists of both hardware


and software designed to perform a set of tasks.

Example of embedded system

 Mobile phones

These consist of many embedded systems, including GUI software and


hardware, operating systems (OSes), cameras, microphones, and USB
(Universal Serial Bus) I/O (Input/output) modules.

 Microprocessor

Microprocessors are the core of any modern computer, they are single chip processing units responsible for computing
each operation stored in the program

 Microcontroller

A microcontroller is a small and low cost microcomputer, which is designed to performing in the specific tasks of
embedded systems.

Microcontroller Components

There are different types of Microcontrollers available and are classified based on Bus-width, Memory, Instruction Set,
Architecture, and Manufacturer.

Microcontroller Types based on Memory

 Based on memory, microcontrollers are


divided into two types: external memory
microcontrollers and embedded memory
microcontrollers.
 External Memory in the case of external
memory microcontrollers memory is not
interfaced within the microcontroller.
Rather, the user heeds to connect an
external memory to store instructions/data
 Embedded Memory For embedded memory
microcontrollers, Greniery & embedded
inside the microcontroller.

Microcontroller Types based on the Architecture

Harvard Architecture Microcontroller. The Harvard architecture


based microcontroller has physically separate memory storage
for program code (instructions) and the data Thus, they have
separate bus lines and can be accessed both at the same time
Therefore, the Harvard architecture based microcontroller can
complete instruction In one machine cycle.

Von
Neumann (or Princeton) Architecture Microcontroller: Von
Neumann or Princeton architecture suggests using a single
memory for both the program and data storage it is the most
used architecture in all computers, desktop and laptops to date.
Comparison Harvard Architecture and Von Neumann

Von Neumann Harvard


1 Here the RAM and ROM is not separated and a single Here the CPU is connected separately with the RAM and
memory connection is given to CPU. ROM.
2 Less space is required More space is required.
3 Speed is somewhat low because there is the bottleneck Speed is faster because it takes less time to fetch data and
problem and fetching data and instruction at the same time instructions at the same time from the 2 memories called
is unable. At a time, it can fetch either data or instruction instruction memory and the data memory.
4 There is a common bus for transferring instruction and There are separate busses to transfer instruction and data.
data.
5 Used in personal computers and the small sized computers. This architecture is used in signal processing and the micro
controllers.
6 This computer architecture is based on stored program This computer architecture is based on Harvard Mark I
computer concept which is a traditional one. Relay based model which is a modern one.
7 Same memory address is used for both instructions and Separate physical memory addresses are used for both
data. instructions and data.
8 Here the two clock cycles are needed to execute a single A single clock cycle is needed to execute an instruction.
instruction.
9 Instructions and read/write operations cannot be accessed CPU can access both instructions and write/read operations
by the CPU at the same time. at the same time.
10 These architecture-based computers are somewhat This is expensive than Von Neumann architecture.
cheaper than Harvard architecture.

Microcontroller Types based on the Instruction set

Based on instruction set, microcontrollers are classified into two types i.e. CISC and RISC.

 Complex instruction set computer (CISC): CISC computers have small programs. It has a huge number of
compound instructions, which takes a long time to perform
 Reduced instruction set computer (RISC): RISC is a computer that only uses simple commands that can be
divided into several Instructions that achieve low-level operation within a single CLK cycle.

Microcontroller Types based on Bus-Width

Microcontrollers come in 8 bit, 16 bit, 32 bit and 64 bit.

 In an 8-bit microcontroller, the point when the internal bus is & bit then the ALU performs the arithmetic and
logic operations.
 The 16-bit microcontroller performs performance as compared to the 8-bit greater precision and performance
as compared to the 8-bit
 The 32-bit microcontroller uses the 32-bit instructions to perform the arithmetic and logic operations. These are
used in automatically controlled devices including implantable medical devices, engine control systems, office
machines, appliances, and other types of embedded systems.

Microcontroller Types based on the Manufacture

 8081 Microcontrollers

8051 is one of the first and most popular microcontrollers also known as MCS-51. Intel introduced it in the year 1981.
Initially, it came out as an N-type metal-oxide-semiconductor (NMOS) based microcontroller, but later versions were
based on complementary metal-oxide-semiconductor (CMOS) technology. The 8051 microcontroller is a great option for
a variety of applications, ranging from straightforward embedded projects to intricate industrial automation systems.

 AVR Microcontrollers

Developed by Atmel, AVR (Alf Vegard RISC) microcontrollers are a family of 8-bit and 32-bit MCUs known for their low
power consumption and high performance. They feature RISC architecture and are easy to program. Perfect for DIY
electronics projects, including hobbyist and educational projects, and commercial products where efficiency and
programmability are key.
 ARM Microcontrollers

Based on ARM (Advanced RISC Machine) processor architecture, these MCUs range from low-power, simple Cortex-M
series to the more powerful Cortex-R and Cortex-A series, offering high performance and energy efficiency. Ideal for
mobile devices, IoT applications, and complex embedded systems that require high processing capabilities, energy
efficiency, and support for advanced operating systems

 PIC Microcontroller

Produced by Microchip Technology, PIC microcontrollers range from 8-bit to 32-bit. They are known for their ease of
programming and versatility, with a wide range of integrated peripherals.

Perfect for DIY electronics projects, including hobbyist and educational projects, and commercial products where
efficiency and programmability are key.

FPGA-based Microcontrollers

These are unique as they combine the flexibility of FPGAs (Field Programmable Gate Arrays with the structure of
microcontroller, allowing users to configure both hardware and software according to their needs

Best suited for specialized applications that require custom hardware configurations, such as signal processing high
speed data analysis, and prototyping of digital systems.

ADC and DAC

 Analog-to-Digital Converter (ADC)

ADCS convert continuous analog signals, such as voltage or current, into discrete digital values. These digital values are
then fed into CPU for further processing

Purpose:

This conversion allows microcontrollers to process and analyze analog data, which is essential for applications like sensor
readings audio processing, and control systems.

 Digital-to-Analog Converter (DAC)

Digital-to-Analog Converter (DAC) converts digital pulses into analog voltage or current signals.

Purpose:

This conversion allows microcontrollers to output digital data in a way that can be understood by analog devices, such as
actuators, displays, and audio output circuits.

In Summary:

ADCs and DACs are essential for bridging the gap between the analog and digital words in microcontrollers.
Understanding their functions, types, and key specifications is crucial for designing and implementing applications that
require interfacing with analog sensors actuators, and other devices
Arduino Microcontroller

Arduino is an open-source electronics platform based on easy-to-use hardware software. Arduino boards are able to
read inputs and turn it into an output. You can tell your board what to do by sending a set of instructions to
microcontroller programming on language (based IDE) based on Processing.

Arduino was born at the Ivrea interaction design institute as an easy tool for fast prototyping, aimed at students without
a in electronics and programming. As soon as it reached a wider community, The Arduino board started changing to
adapt a new needs and challenges, differentiating offer from simple 8- bit boards applications, wearable, 3D printing,
and embedded systems.

Different types of Arduino

Boarduino Kit Arduino Lilypad

Arduino Mega 2560 DIY Arduino

The Importance of Arduino

 Inexpensive  Open source and extensible software

 Cross platform  Open source and extensible hardware

 Simple, clear programming environment

The Features of Arduino Boards:

The following are some of the key features of Arduino boards

 Microcontroller: It acts as Arduino's "brain" by processing tasks and providing access to input/output pins (I4O)
handling all.
 Power Supply Source: An external power source, such as a battery or USB port is needed. Some models also
offer alternative methods, like solar powering up.
 Digital outputs & panels or AC adapters that allow more flexibility when Analog read complex signals elements
connect easily.
 I/O Pins: General-purpose digital inputs from sensors or buttons while analogs enable like distance sensors or
motor
 USB Interface (e.g., FTDI): The serial communication protocol used by most Arduinos is UART over a mini-USB
port. It enables connection with programming, performance computers for simple data.
 Clock Speed & Memory Capacity: Higher clock speeds result in faster while complex projects. These larger are
selecting an appropriate Arduino model. Memory important and controllers transfer
Program Structure

The basic structure of the Arduino programming language is fairly simple and runs in at least two parts. These two
required parts, or functions, enclose blocks of statements.

void loop()

Statements;

}void loop()

Setup() is the preparation

Loop() is the execution

1. Variable declaration:

All variables have to be declared before they can be used. Declaring a variable means defining its value type, as in int,
long, float, etc., setting a specified name, and optionally assigning an initial value. This only needs to be done once in a
program but the value can be changed at any time using arithmetic and various assignments. The following example
declares that inputVariable is an int, or integer type, and that its initial value equals zero. This is called a simple
assignment.

int inputVariable = 0;

A variable can be declared in a number of locations throughout the program and where this definition takes place
determines what parts of the program can use the variable.

2. Variable Scope:

A variable can be declared at the beginning of the program before void setup(), local() of functions, and sometimes
within a statement block such as for loops. Where the variable is declared determines the variable scope, or the ability
of certain parts of a program to make use of the variable.

A global variable is one that can be seen and used by every function and statement in a program. This variable is
declared at the beginning of the program, before the setup() function

The local variable is one that is defined inside a function or as part of a loop. It is only visible and can only be used inside
the function in which it was declared. It is therefore possible to have two or more variables of the same name in
different parts of the same ram that contain different values.

Example:

Int value; // 'value' is visible to any function void setup()

//no setup needed

void loop()

for (int i=0; i<20;) // '1' is only visible

{// inside the for-loop

i++;

float f; // 'f' is only visible


}// inside loop

A. Byte:

Byte stores an 8-bit numerical value without decimal points. They have a range of 0-255.

byte some Variable = 180;// declares 'some Variable' as a byte type

B. Int:

Integers are the primary datatype 'for storage of numbers without decimal points and store a 16-bit value with a range
of 32,767 to -32,768.

Int someVariable = 1500; // declares 'someVariable' as an integer type 319

Note: Integer variables will roll over if forced past their maximum or minimum values by an assignment or comparison.
For example, if x=32767 and a subsequent statement adds 1 to x, x=x+1 or x++, x will then rollover and equal-32,768.

C. Long:

Extended size datatype for long Integers, without decimal points, stored in a 32-bit value with a range of 2,147,483,647
to -2,147,483,648.

long some Variable=90000; // declares 'some Variable' as a long type

D. Float:

A datatype for floating-point numbers, or numbers that have a decimal point. Floating-point numbers have greater
resolution than integers and are stored as a 32-bit value with a range of 3.4028235E+38 to -3.4028235E+38.

float some Variable = 3.14; // declares 'some Variable' as a floating-point type

Compound Assignments:

Compound assignments combine an arithmetic operation with a variable assignment. These are commonly found in for
loops. The most common compound assignments include:

X++ // same as X = X +1, or increments x by +1

X--II same as X=X-1, or decrements x by-1

X+= y ll same as X=X+y, or increments x by +y

X-y ll same as X=X-y, or decrements by -y

X=yll same as X X *y, or multiplies x by y

X/=yll same as X=X/y, or divides x by

1. Setup():

The setup() function is called once when your program starts. Use it to initialize pin modes, or begin serial. It must be
included in a program even if there are no statements to run.

2. Loop():

After calling the setup() function, the loop() function does precisely what its name suggests, and loops consecutively,
allowing the program to change, respond, and control the Arduino board.
3. Curly Braces():

Curly braces (also referred to as just "braces" or "curly brackets") define the beginning and end of function blocks and
statement blocks such as the void loop() function and the for and if statements.

4. Semicolon;:

A semicolon must be used to end a statement and separate elements of the program. A semicolon is also used to
separate elements in a for loop.

5. Block Comments/*..*/

Block comments, or multi-line comments, are areas of text ignored by the program and are used for large text
descriptions of code or comments that help others understand parts of the program. They begin with /* and end with */
and can span multiple lines.

6. Line Comments //:

Single line comments begin with // and end with the next line of code. Like block comments, they are ignored by the
program and take no memory space.

// this is a single line comment

Single line comments are often used after a valid statement to provide more information about what the statement
accomplishes or to provide a future reminder.

7. pinMode(pin, mode):

Used in voidsetup() to configure a specified pin to behave either as an INPUT or an OUTPUT.

8. digitalRead(pin):

Reads the value from a specified digital pin with the result either HIGH or LOW. The pin can be specified as either a
variable or constant (0-13).

9. digitalWrite(pin, value):

Ouputs either logic level HIGH or LOW at (turns on or off) a specified digital pin. The pin can be specified as either a
variable or constant (0-13).

10. analogRead(pin):

Reads the value from a specified analog pin with a 10-bit resolution. This function only works on the analog in pins (0-5).
The resulting integer values range from 0 to 1023.

11 analogWrite(pin, value):

Writes a pseudo-analog value using hardware enabled pulse width modulation (PWM) to an output pin marked PWM.

12. delay(ms):

Pauses your program for the amount of time as specified in milliseconds, where 1000 equals 1 second. 13. Milli s():

Returns the number of milliseconds since the Arduino board began running the current program as an unsigned long
value.
Functions:

A function is a block of code that has a name and a block of statements that are executed when the function is called.

Example:

int sum_func(int x, int y)

int z=0; // initialize the value of z

z=x+y; // read potentiometer value

return z; // return final value

Note: In the main program the calling function are:

void loop()

result=sum_func(5,6);

Variables:

A variable is a way of naming and storing a numerical value for later use by the program. As their namesake suggests,
variables are numbers that can be continually changed as opposed to constants whose value never changes. A variable
needs to be declared and optionally assigned to the value needing to be stored.

Example:

if (inputVariable <100) // tests variable if less than 100

InputVariable = 100; // if true assigns value of 100

delay(inputVariable); // uses variable as delay

Comparison operators:

Comparisons of one variable or constant against another are often used in if statements to test if a specified condition is
true.

X==y // x is equal to y

X=y/lx is not equal to y

X<y llx is less than y

X> y llx is greater than y

X<=yll x is less than or equal to y X>= y ll x is greater than or equal to y.


Logical operators

Logical operators are usually a way to compare two expressions and return a TRUE or FALSE depending on the operator.
There are three logical operators, AND, OR, and NOT that are often used in if statements:

Logical AND

if (x>0 && X<5)//true only if both expressions are true

Logical OR

(x>0 ll y > 0) // true if either expression is true

Logical NOT

if (lx>0) // true only if expression is false

Arithmetic:

Arithmetic operators include addition, subtraction, multiplication, and division. They return the sum, difference,
product, or quotient (respectively) of two operands.

y=y+3;

X=X-7;

l=j*6;

r=r/5;

There are 20 different Arduino types, each offering unique features and capabilities. From basic microcontrollers to
more advanced modules, some of the popular types of Arduino boards.

1. Arduino Uno R3 6. Arduino Mega 2560 Rev3

2. Arduino Nano 7. Arduino Nano 33 BLE

3. Arduino Micro 8. Arduino Due

4. Arduino Leonardo 9. LilyPad Arduino Board

5. Arduino Micro 10. Arduino Bluetooth


Arduino Applications

S.No Area Applications


.

1 Smart Homes Motion sensors, outlet control, temperature sensors, blower control garage
door control, air flow control, sprinkler control and bill of materials

2 Defense Arduino-based Ultrasonic Radar System

3 Aero Space Airplane Flap Model, Integration of RC Vehicles in a Robotic Arena

4 Automated Vehicle Control control-system experimentation strategies, and sensors

5 Traffic Signal Control Traffic Light Controller system

6 Medical Cancer Detection, Heart Beat Rate measurement Open source EEG/ECG/EMG
Breathalyzer, Thermometer, WI-FI Body Scale with Arduino Board, Lilypad
Slipper Automatic Foot Massager

7 Data Mining Health care, Industries, defense and other automation sectors

8 Laboratory Digital microscope with automated slide movement, EEG/ECG Sample collectors

9 Body Control HandSight. Heart Rate Monitor, Muscle activity. Temperature, Electrodermal
Respiration, Activity FacialExpression, Eye Tracking

You might also like