E Book EmbeddedSystemsandIoT
E Book EmbeddedSystemsandIoT
net/publication/387455806
CITATIONS READS
0 396
2 authors, including:
Sandeep Sharma
Bharati Vidyapeeth College of Engineering, Delhi
43 PUBLICATIONS 52 CITATIONS
SEE PROFILE
All content following this page was uploaded by Sandeep Sharma on 27 December 2024.
i
EMBEDDED SYSTEMS AND IoT
(Author: Dr. J. Sylvia Grace, Mr. Pradeep Sharma, Dr. Aaquil
Bunglowala and Dr. Sandeep Sharma)
ISBN: 978-81-969431-4-1
DOI: https://doi.org/10.59646/embedsysiot/115
Edition 1: January 2024
Published by
San International Scientific Publications
Email: [email protected]
Website: sanpublications.nobelonline.in
Publisher’s Disclaimer
The Publisher of this book states that the
Editors and Authors of this book has taken
the full responsibility for the content of this book,
any dispute and copyright violation arising
based on the content of this book
will be addressed by the editor(s), furthermore,
the authors indemnify the publisher from damages
arising from such disputes and copyright
violation as stated above.
ii
ACKNOWLEDGEMENTS
iii
CONTENTS
PAGE
UNIT TITLE
NUMBER
UNIT I 8-BIT EMBEDDED PROCESSOR 1
1.1 Bit Microcontroller 1
1.2 Microcontroller Architecture 3
1.2.1 Types of Interrupts 6
1.2.2 Data Types 8
1.2.3 Addressing Modes 9
1.2.4 Applications of 8051 Microcontroller 13
Architecture
1.3 8051 Instruction Set 14
1.3.1 Data moving or handling Instructions 15
1.3.2 Loop and Jump Instructions 18
1.3.3 Shifting Operators 19
1.3.4 Bit-Oriented Instructions 20
1.4 Programming Parallel Ports 22
1.4.1 Crystal Oscillator 23
1.4.2 Configuring ports 27
1.5 Timers and Serial Port 29
1.5.1 Timer Mode 29
1.5.2 Counter Mode 29
1.5.3 TMOD Register 30
1.5.4 Mode 0 of Timer/Counter 32
1.5.5 Mode 1 of Timer/Counter 33
1.5.6 Mode 2 of Timer/Counter 34
1.5.7 Mode 3 of Timer/Counter 35
1.5.8 Serial Port 36
1.6 Interrupt Handling 38
1.6.1 Types of interrupt in 8051 38
Microcontroller
1.6.2 Interrupt programming in 8051 41
iv
UNIT II EMBEDDED C PROGRAMMING 45
2.1 Programming Embedded System 45
2.1.1 Embedded C Programming Language 45
2.1.2 Basics of Embedded C Program 46
2.1.3 Data Types in Embedded C 47
2.1.4 Basic Structure of an Embedded C 48
Program
2.1.5 Different Components of an Embedded 49
C Program
2.2 Memory And I/O Devices Interfacing 49
2.2.1 Memory Interfacing 50
2.2.2 I/O interfacing 51
2.2.3 8279 Programmable Keyboard 51
2.2.4 8257 DMA Controller 52
2.2.5 Intel 8257 53
2.2.6 8257 Architecture and Pin Description 53
2.3 Programming Embedded Systems in C 56
2.3.1 Embedded C Programming with Keil 56
Language
2.3.2 Basic Embedded C Programming Steps 58
2.4 Real-Time Operating System (RTOS) 64
2.4.1 RTOS scheduling 64
2.4.2 Zephyr RTOS 65
2.5 Multiple Tasks and Processes 66
2.5.1 OS and RTOS 66
2.5.2 Task and process 66
2.5.3 Release time and deadline 66
2.5.4 Process State and Scheduling 69
2.5.5 Task Characteristics for a single CPU 73
in a system
2.6 RTOS Task Context Switching 73
2.6.1 Context Switching Basics 74
2.6.2 Implementation Details 75
2.6.3 Memory Allocation 75
2.6.4 Context Switching Flow 76
v
2.7 Priority Based Scheduling Policies 78
2.7.1 Earliest-Deadline-First Scheduling 78
2.7.2 EDF properties 80
2.7.3 Rate Monotonic Scheduling 80
2.7.4 Priority Inversion 82
2.7.5 Wait for graph 83
vii
4.3 Bluetooth 149
4.4 Wi-Fi 152
4.4.1 Working 153
4.4.2 Types of Wi-Fi Connections 154
4.5 ZigBee 156
4.5.1 ZigBee Frequency 158
4.5.2 ZigBee vs Wi-Fi 158
4.5.3 ZigBee vs Bluetooth 159
4.5.4 System Structure 159
4.5.5 Topologies 160
4.5.6 ZigBee Architecture 162
4.5.7 ZigBee Applications 163
4.6 GPS 164
4.7 GSM modules 167
4.7.1 GSM/GPRS Module 167
4.7.2 AT commands for GPRS Module 168
4.7.3 IoT using GSM/GPRS Module 169
4.8 Open Platform 169
4.9 Raspberry Pi Architecture 171
4.10 Programming 172
4.10.1 Basics of the Python Programming 173
language
4.10.2 Programming Raspberry Pi using the 176
terminal
4.11 Interfaces 176
4.12 Accessing GPIO Pins 177
4.12.1 Pin Numbering 179
4.12.2 Control LED with Push Button using 180
Raspberry Pi
4.12.3 Control LED using Python 181
4.12.4 Functions Used 181
4.13 Sending and Receiving Signals Using GPIO 184
Pins
4.14 Connecting to the Cloud 186
viii
UNIT V APPLICATIONS DEVELOPMENT 190
5.1 Complete Design of Embedded Systems 190
5.1.1 Embedded Systems Design Cycle 190
5.1.2 Analysis of Requirements 191
5.2 Development of IoT Applications 193
5.2.1 Define the requirements for the 194
application
5.2.2 Choosing the right hardware 195
5.2.3 Find the right connectivity protocols 195
5.2.4 Ensure the firmware is well equipped 196
5.2.5 Pick the right cloud platform 197
5.2.6 Embedded System Design Examples 197
5.2.6 Design Metrics 199
5.3 Home Automation 202
5.3.1 Home Automation System 205
Components
5.3.2 Cloud Computing with Home 208
Automation
5.3.3 Home Automation 512
5.4 Smart Farm 215
5.4.1 The IoT-Based Smart Farming Cycle 217
5.4.2 IoT Solutions to Agricultural Problems 218
5.4.3 Third Green Revolution 220
5.5 Smart Cities 221
5.5.1 Benefits of IoT in Smart Cities 226
5.5.2 Smart City Implementation Model 228
5.6 Smart Healthcare 228
5.6.1 IoT for Patients 229
5.6.2 IoT for Physicians 229
5.6.3 IoT for Hospitals 230
5.6.4 IoT for Health Insurance Companies 230
5.6.5 Simple Healthcare System Architecture 232
5.7 Layers of IoT Architecture 236
ix
Embedded Systems and IoT
UNIT I
In the 1980s, Intel was the company that developed the 8051
microcontroller. It was constructed on top of Harvard Architecture,
and its primary objective from the beginning was to make it easier to
integrate embedded devices. In order to reduce the amount of power
required for operation, Intel updated the Microcontroller 8051 to
make use of CMOS technology rather than NMOS technology. In
order to accommodate this modification, a new version of the chip,
known as the 80C51, was made available. The NMOS technology was
first used for its design, despite the fact that it consumes more power
than other available choices. When compared to their predecessors,
modern microcontrollers are able to perform their functions with a
much lower amount of power consumption. An 8051 microprocessor
may be used in a wide variety of different ways. As a result, the
engineering projects that students do in their final year employing
8051 microcontrollers are quite important. The purpose of this article
is to provide an introduction to the 8051 microcontroller and its inner
workings. One kind of integrated circuit is known as a
microcontroller. A dual inline package, sometimes known as a DIP
for short, is the housing for the 40-pin device. Additionally, it has two
16-bit timers, 128 bytes of random access memory (RAM), and 4
kilobytes of read/write memory. In order to fulfil the criteria, it is
equipped with four programmable 8-bit ports that are addressable
and operate in parallel. The system bus is an essential component of
the architecture of the 8051 microprocessor. The primary purpose of
this device is to establish connections between the various devices
and the primary computer. This bus is comprised of a multitude of
components, including control signals, an 8-bit data bus, and a 16-bit
address bus, amongst others. A number of additional devices,
including memory, interrupt control, timers, the central processing
unit (CPU), and the serial interface, may also be connected to the
system bus. The data bus and the programme bus are two distinct
interfaces on the 8051 microcontroller.
1
Embedded Systems and IoT
Along with its 8-bit processor unit, the microcontroller also has an 8-
bit accumulator. Not only that, but the 8051 microcontroller is
programmed using the Keil software package and embedded C
language, and it contains an 8-bit B register as one of its main
functional blocks. It also has many more registers that are 8-bit or 16-
bit in size. An integral built-in RAM makes the internal processing
and operation of the 8051 microcontroller much easier. For storing
information that is only needed temporarily, this is called prime
memory. Because the microcontroller's power source is always on, the
contents of its volatile memory may be corrupted at any moment.
The design and instruction set of this microcontroller are quite
simple, making it a breeze to work with. Furthermore, its processing
power is somewhat limited.
Features
2
Embedded Systems and IoT
3
Embedded Systems and IoT
Interrupts:
Memory:
4
Embedded Systems and IoT
Bus
Oscillator
5
Embedded Systems and IoT
The following are the sources of the interrupts that are generated by
the 8051 microcontrollers:
6
Embedded Systems and IoT
Registers
7
Embedded Systems and IoT
PSW Register
Register Banks
The RAM that is utilized for stacks and register banks has a capacity
of 32 bytes, and this memory is partitioned into four distinct kinds of
banks.
8
Embedded Systems and IoT
Therefore, each back has eight registers that go from R0 all the way
up to R7. In this context, R0 and R7 signify the locations of RAM,
namely the zeroth and seventh positions, respectively. The second
bank register may be found starting at spot 8 and continuing all the
way to 05H. The 10H site is where the third bank register is started,
and the 17H location is where it is finished. The last bank may go
anywhere between the 18H-1FH.
Stack
Organization of Memory
There are several ways that microprocessors may get data. In most
cases, the data that has been saved in the memory, register, and
elsewhere may be utilized immediately. These many approaches of
gaining access to data are collectively referred to as addressing
modalities. There are several varieties of microcontrollers, each with
its own unique way of addressing that is determined by the
manufacturer's design.
9
Embedded Systems and IoT
When using this style of addressing, the source must be a value that
may be followed by the '#' character, and the destination can be either
SFR registers, general purpose registers, or an address. It is used for
instantly saving the value in the memory registers as soon as it is
acquired.
10
Embedded Systems and IoT
Both the source and the destination of the address in this mode must
be registers; however, general purpose registers cannot be used. This
prevents the data from being transferred around inside the general-
purpose bank registers.
11
Embedded Systems and IoT
12
Embedded Systems and IoT
13
Embedded Systems and IoT
14
Embedded Systems and IoT
Mov Rx,a The data from acc will be copied to Rx per this
command.
15
Embedded Systems and IoT
Mov a,add This command will copy the information from the
direct address location and add it to the acc.
Mov add,a The data should be copied from acc and added to
direct address add per this command.
Mov add,#num These are the instructions The instant data number
should be copied into the direct address.
Mov add,Rx This instruction will copy the data from Rx and
add it to the direct address.
16
Embedded Systems and IoT
Push add During this instruction, the Stack Pointer (SP) will be
incremented, and then the data will be copied from the
source and added to the location stored in the SP.
Xch a, add The data between acc and provided add are to be
exchanged per this command.
17
Embedded Systems and IoT
18
Embedded Systems and IoT
The shift operators are put to use in order to transmit and receive
data in the most effective manner. The 8051 microcontroller is made
up of four shift operators, which are as follows:
19
Embedded Systems and IoT
During this shifting process, the most significant bit (MSB) moves to
the least significant bit (LSB), and all of the bits shift bit-by-bit,
serially, towards the right side.
Syntax:
MOV A, #25h
RR A
20
Embedded Systems and IoT
During this shifting process, the most significant bit (MSB) moves to
the least significant bit (LSB), and all of the bits shift bit-by-bit,
serially, toward the left side.
Syntax:
MOV A, #25h
RL A
During this shifting operation, the least significant bit (LSB) will
become the carry, and the most significant bit (MSB) will become the
LSB. Additionally, all of the bits will be pushed towards the right side
bit by bit.
21
Embedded Systems and IoT
Diagram of the ports and pins on the 8051 Members of the 8051
family are available in a variety of IC packages, including DIP (duo
in-line packaging), QFP (quad flat package), and LLC (leadless chip
carrier), but they all contain the same number of pins—40—that are
devoted to a variety of purposes, including I/O (input/output), RD
(reset), WR (write), address, data, and interrupts. For less demanding
applications, several vendors provide 20-pin variants of the 8051
microcontroller, which have a lower number of input and output
ports. Since the 40-pin chip is used by the vast majority of developers,
we will focus on it.
22
Embedded Systems and IoT
Each of the four ports, P0, P1, P2, and P3, need a total of eight pins,
thus a group of 32 pins has been reserved for them. The chip receives
its supply voltage via the pin 40. The source of the electricity is +5V.
The ground is located at pin 20. The remaining pins have the
following designations: XTAL1, XTAL2, RST, EA, PSEN, and ALE.
The microcontroller receives its clock pulse via the oscillator, which is
controlled by the XTAL2/XTALI inputs. The port0 (AD0/AD7) is
formed by the pins from 32 to 39 on the board. Multiplexed pins P0.0
to P0.7 are utilized for both address and data communications. The
pins numbered 1 through 8 correspond to port 1 (P1.0 to P1.7), and
pins numbered 21 through 28 correspond to port 2. The transmission
of addresses into memory requires (P2.0 to P2.7), which is utilized.
The 8051 microcontroller may be restarted by using the RST pin,
which is located on the ninth position. The tenth through the
seventeenth pins are for port3, which is a specialized port that serves
many purposes. The address latch enable function is located on the
30th pin. When the pin is switched to the 1 position, the address is
sent via the pins AD0 through AD7. If the value of the pin is 0, data
will be sent across the pins AD0 through AD7 when the transfer takes
place. PSEN stands for "Program Strobe Enable" and is located on the
29th pin. This pin is used to enable reading the program from
external memory.
While the 8051 does have an oscillator integrated into the chip, it
cannot operate without an external clock. A quartz crystal oscillator is
often connected to the inputs XTAL (pin 19) and XTAL (pin 18). The
quartz crystal oscillator connected to XTAL1 and XTAL2 inputs also
need two 30-pF capacitors. One terminal of every capacitor is linked
to the earth as seen in Figure 1.2. Keep in mind that the 8051 family as
a whole operates at varying speeds. As used above, "speed" means
the maximum oscillator frequency that may be achieved via the
XTAL connection. Such a crystal must also have a frequency of 12
MHz or lower in order to be linked to a chip that runs at that
frequency. Similarly, a crystal must not exceed 20 MHz in order for a
microcontroller running at that frequency to function properly.
23
Embedded Systems and IoT
RST
The reset button is located on pin 9. It takes incoming data and has an
active high state. When an excessive amount of voltage is provided to
the pin, the microcontroller will reset and then shut down.
EA
Members of the 8051 family will be equipped with ROM that is on-chip for
the purpose of storing programs. In situations like these, the EA pin is wired
up to the VCC supply. Because there is no ROM on-chip for family
members like the 8031 and 8032, the program code must be saved in
external ROM, from whence it is then retrieved by the 8031 and 8032. The
fact that the EA pin is linked to GND indicates that the code is stored on an
external device. External Access, sometimes known as EA, is represented by
the DIP package pin number 31. It is a pin that is used for input and may be
connected to either ground or Vcc. This pin, in conjunction with PSEN, is
used by the 8031 to access programs that are stored in ROM memory that is
situated outside of the 8031. The following two pins are mostly used in
systems that are based on the 8031.
PSEN
24
Embedded Systems and IoT
ALE
It is a pin for output and has an active high state. When an 8031 is
connected to external memory, port 0 is responsible for providing
both the address and the data. Through a connection to the G pin of
the 74LS373 chip, the address and data may be demultiplexed using
the ALE pin.
Each of the four ports on the 8051 can handle bidirectional data
transfer. Built into the design of each one are input buffers, output
drivers, and latches. P0, P2, and P3 will not only be responsible for
information and operations, but also for specialised tasks. As seen in
the figure below, there are four ports numbered P0, P1, P2, and P3.
We call them 8-bit ports because there are eight pins used by each
port. Because FFH is printed on each of the three ports (P0-P3), they
are immediately configured to function as inputs upon system reset.
To access the external memory, the procedure makes use of the Port 0
input buffers and the Ports 0 and 2 output drivers. For this
programme to work, Port 0 must time-multiplex the current byte's
output with the low byte of the address of the external memory. Port
2 will output the highest byte of an address when reading it from
external memory that is 16 bits wide. See figure 1.5 for an illustration
of how port 0 may be labelled as AD0-AD7; this provides it the
versatility to transmit both data and addresses.
25
Embedded Systems and IoT
The address and data for an external memory connection to the 8051
are provided via port 0. Using port 0 to multiplex address and data
allowed the 8051 to save pins. You can find out whether P0 contains
data or an address by using ALE. Data in the range D0-D7 is sent
when ALE is set to 0, while the address range A0-A7 is supplied
when ALE is set to 1. Therefore, in order to demultiplex the address
and data, ALE is used. In the absence of an external memory
connection, a ten thousand ohm pull-up resistor must be connected
externally to the P0 pins. This is due to the fact that PO is an open-
ended drain, unlike P1, P2, and P3. The term "open drain" describes
MOS chips in the same manner that "open collector" describes TTL
chips. The phrase "open drain" may also be used to describe an open
collector. Unlike Port 0, which requires a pull-up resistor, Ports 1, 2,
and 3 already have one on the circuit board, so there's no need to add
another one. At reset, all three of the device's ports—P1, P2, and P3—
are configured to accept input signals.
P1 and P2
Port 3
A set of eight pins, numbered 10–17, are required. You may use it as
an input or an output, depending on your preference. None of the
three ports (P1, P2, and P3) need pull-up resistors. Along with its
principal function, Port 3 is in charge of sending many critical signals,
including interrupts. P3.0 and P3.1 represent the RxD and TxD serial
communication signals, respectively. So, you may use the 8051 with
either serial or parallel connections. For usage with external
interrupts, P3.2 and P3.3 are reserved.
26
Embedded Systems and IoT
27
Embedded Systems and IoT
Port 2 is the output port, where the data kept in the accumulator is
sent from port2, after having been supplied to the accumulator by
port P0. Port 0 also performs the functions AD0-AD7. It has the
address and info as well. Port 0 is used to transmit the address and
data of the external memory to an 8051/31. Through Port 1, data is
entered and outputted. An input configuration will be applied to port
1 after the reset. Through port 2, data may be inputted and outputted.
An input configuration will be applied to port 2 after the reset. Using
Port 2 and P0, you may get the device's 16-bit address from the
external memory. Pins A8–A15 from port 2 and AD0-AD7 from port 0
must be linked if 16 bits are needed to access the external memory.
Port 2 will hold the higher-order byte and port 0 will hold the lower-
order byte as a consequence of this.
JB and JNB are the instructions that are utilized when operating with
a single bit. These instructions keep track of a bit and act accordingly
according on whether or not that bit is set to 0 or 1. These two
instructions may be used for any bit on I/O ports 0 through 3,
including zero, one, and three. The instructions for functioning with a
single bit are detailed in Table 1.2. The single bit operations are
broken out in Table 1.2.
28
Embedded Systems and IoT
Access 1 or 2 bits
You may use these steps to access either one or two bits of the port.
Complement P0.4 with SETB P1.4, set P1.4 to CLR P2.2, clear P2.2
with SETB P1.0, and set just bit 0 of port 1 as high CPL P0.4. Clear
P2.2 with SETB P1.0. I will begin by making the following claim:
Along with the P0.4 bit, the CPL bit operates. It is changed to 0 if the
P0.4 bit is set to 1, and to 1 if it is set to 0 otherwise. The above
example uses SETB routines to convert the bit values P1.0 and P1.4 to
1. The CLR command will clear this particular bit.
There are two timer registers that are each 16 bits in size on an Intel
8051. Timer 0 and Timer 1 are the names given to these registers.
There are two different ways that the timer registers may be utilized.
Timer mode and Counter mode are the names of these two modes.
The only distinction that can be made between these two modes is
the origin of the incrementing signals for the timer registers.
29
Embedded Systems and IoT
30
Embedded Systems and IoT
In the table that follows, we shall examine the intricacies of the bits
and the many operations associated with their high or low values.
hen the timer or counter is in mode 0 to 2, the Gate bit will be set to
the high state.
Examples
MOVTMOD, #25H
31
Embedded Systems and IoT
After the above command has been carried out, the program will
proceed to take control of the timer and the counter. If you want to
setup the system such that it operates in hardware controlled mode,
then you must set the gate bits to 1. Therefore, the bit patterns will be
1 0 1 0 1 1 0 1 = ADH, and the following command may be used:
MOVTMOD, #0ADH
The 8-bit timer or counter with a 5-bit prescaler is used in the Mode 0
functioning of the microcontroller. Therefore, it is a timer/counter
that has 13 bits. It makes use of 5 bits of either TL0 or TL1, in
addition to all 8 bits of either TH0 or TH1.
32
Embedded Systems and IoT
In the software that was just described, the Timer1 is set to operate in
timer mode 0. In this scenario, Gate equals 0. After that, the value
F0H will be stored into TH1, and the Timer1 interrupt will be
enabled. At long last, initialize the timer by setting the TR1 bit in the
TCON register.
The timer or counter with 16 bits is used for the Mode 1 operation. In
the accompanying diagram, the Timer0 component is represented by
Mode 1.
In the software that was just described, the Timer0 is set to operate in
timer mode 1. In this scenario, Gate equals 0. After that, the TL0
register will be filled with F0H, and the TH0 register will be loaded
33
Embedded Systems and IoT
with FFH. Finally, the Timer0 interrupt will be enabled. At long last,
initialize the timer by setting the TR0 bit in the TCON register.
34
Embedded Systems and IoT
In the software that was just described, the Timer1 is set to run in
timer mode 2. In this scenario, Gate equals 0. After that, the F0H is
loaded into the TL1 and the TH1. then turn on the interrupt for the
Timer1. At long last, initialize the timer by setting the TR1 bit in the
TCON register. When the serial port is operating in Mode 1 or Mode
3, the required baud rate is generated by Timer1 in Mode 2, which is
the default mode.
Timer0 controls the bits, T0, and INT0 inputs. On the other hand, the
TH0 isn't a counter but an 8-bit timer. The TR1-labeled Timer1
Control bit is in charge of this. Set the TF1 counter to 1 if the TH0
counter overflows from FFH to 00H. Here is a visual representation
of what is shown: In Mode 3, Timer1 only keeps track of the count
and does not actually do any counting.
35
Embedded Systems and IoT
The following describes the significance of the gate bit for mode 3 in
both Timer0 and Timer1:
TxD:
In most modes, this pin performs the function of a transmitter (that is,
it sends data), however in other modes, it does not perform the
function of a transmitter. Due to the fact that it is a serial connection,
the data is sent one bit at a time. The CPU delivers 8 bits at a time,
and those 8 bits are saved in a register that is called SBUF. The
processor sends one byte of data that is going to be conveyed to the
SBUF, and from there, the data is sent bit by bit, beginning with the
LSB of the byte that is stored in the SBUF and ending with the MSB.
After the whole byte has been transferred, an interrupt is generated
and sent to the processor by setting some flag to 1, allowing the CPU
to submit further data for transmission as soon as it receives the
interrupt. Following the transmission of each bit, there is a necessary
wait before moving on to the next bit.
36
Embedded Systems and IoT
RxD:
This pin is mostly used for the receiving of data. It received the data
one bit at a time, beginning with the least significant bit (LSB) since
that is the order in which the transmitter delivers it. Additionally,
there is a register known as SBUF that saves all 8 bits that were
received.
37
Embedded Systems and IoT
Once the 8 bits have been received, rather than immediately issuing
an interrupt, it does a check for errors (errors that occurred as a result
of the transmission; the method by which error checking is performed
will be covered in forthcoming lessons). Once it has been determined
that the information that was received has no errors, the Ri flag will
be set, and the processor will be interrupted. After that, the processor
will enter ISR; similarly, Ri will not be cleaned automatically during
this phase. Data is sent from the processor to the SBUF storage area in
TxD's SBUF. When data is processed in RxD's SBUF, it is transmitted
from SBUF to the processor. The CPU is able to discern between the
two registers in this manner. There is a byte termed SM2; if the value
of SM2 is 1, then an error check will be performed after the SBUF of
RxD has been filled. And if that doesn't happen, there won't be any
kind of error check; instead, as soon as the SBUF in RxD is full, an
interrupt will be delivered immediately to the CPU.
When another program with a higher priority than the one that is
now running requests access to the system buses, the microcontroller
will instead issue a call to a function rather than interrupting the
program that is currently being executed. Interrupts provide a way to
postpone or delay the operation that is now being carried out, carry
out a job that is part of a subroutine, and then begin the regular
program once more.
Let's have a look at the five different interrupts that may occur in an
8051 Microcontroller:
38
Embedded Systems and IoT
39
Embedded Systems and IoT
40
Embedded Systems and IoT
41
Embedded Systems and IoT
42
Embedded Systems and IoT
When using level triggering, a low signal at pin 3.2 activates the
interrupt. On the other hand, an edge triggered interrupt requires a
transition from high to low at pin 3.2. First, let's have a look at the
programmable features of the 8051 microcontroller, which are as
follows:
43
Embedded Systems and IoT
Let's have a look as the software that uses Serial Interrupt to transmit
the letter 'E' across a serial port at a baud rate of 9600:
i. void main()
ii. {
iii. TMOD = 0x20:
iv. TH1= 0xFD; // baud rate for 9600 bps
v. SCON = 0x50;
vi. TR1=1;
vii. EA=l;
viii. while(l);
ix. }
x. void ISR_Serial(void) interrupt 4
xi. {
xii. if(TI==l)
xiii. {
xiv. SBUF= ?E?;
xv. TI=0;
xvi. }
xvii. else
xviii. RI =0;
xix. }
44
Embedded Systems and IoT
UNIT II
EMBEDDED C PROGRAMMING
45
Embedded Systems and IoT
Keywords in Embedded C
46
Embedded Systems and IoT
• bit
• sbit
• sfr
• small
• large
47
Embedded Systems and IoT
The following is a list of the additional data types that may be used in
Embedded C when using the Keil's Cx51 Compiler.
• bit
• sbit
• sfr
• sfr16
48
Embedded Systems and IoT
49
Embedded Systems and IoT
50
Embedded Systems and IoT
For this reason, the circuit that interfaces the two devices should be
constructed in such a manner that it accommodates the signal needs
of the memory while also accommodating the signals of the CPU.
51
Embedded Systems and IoT
52
Embedded Systems and IoT
• While the CPU is now in the HOLD state, the DMA controller
is responsible for managing the actions that take place on the
buses that connect the CPU, memory, and I/O devices.
53
Embedded Systems and IoT
Each of the A4–A7 lines produces a tri-state output while the master
mode is active. The Intel 8257 generates a 16-bit memory address, and
these outputs (D0–D7) relay bits 4–7 of that address. Here are the data
lines. Here you may find the bidirectional boundaries of three states.
Whenever the controller is being programmed, the central processing
unit (CPU) will use these data lines to communicate with the DMA
address register, the byte count register, and the mode set register.
54
Embedded Systems and IoT
55
Embedded Systems and IoT
• Easy to understand
• High Reliability
• Portability
• Scalability
56
Embedded Systems and IoT
57
Embedded Systems and IoT
#include<microcontroller name.h>
First, let's have a look at the block diagram that represents the
Embedded C Programming Steps:
58
Embedded Systems and IoT
1. 00000001
2. 00000010
59
Embedded Systems and IoT
3. 00000100.....
4. .... And so on up to 10000000.
1. #include<reg51.h>
2. void main()
3. {
4. unsigned int k;
5. unsigned char l,b;
6. while(1)
7. {
8. P0=0x01;
9. b=P0;
10. for(l-0;l<3000;l++);
11. for(k=0;k<8;k++)
12. {
13. b=b<<1;
14. P0=b;
15. }
16. }
17. }
1. 00000001
2. 00000011
3. 00000111.....
4. .... And so on up to 11111111.
1. #include<reg51.h>
2. void main()
3. {
4. unsigned int i;
5. unsigned char j,b;
6. while(1)
7. {
8. P0=0x01;
9. b=P0;
10. for(j-0;j<3000;j++);
11. for(j=0;j<8;j++)
60
Embedded Systems and IoT
12. {
13. bb=b<<1;
14. b=0x01;
15. P0=b;
16. }
17. }
18. }
Consider the following as the software for showing the number range
'0 to F' on a seven-segment display:
61
Embedded Systems and IoT
62
Embedded Systems and IoT
63
Embedded Systems and IoT
An RTOS is valued for how rapidly it can react, and the most
important component of this is the advanced scheduling
algorithm.The time-criticality of embedded systems may range from
soft-real time control systems like those found in washing machines
to hard-real time safety systems like those found in airplanes. In
circumstances such as the latter, the essential demand to satisfy real-
time requirements can only be made if the behavior of the OS
scheduler can be properly anticipated. This is necessary in order to
meet the criteria. There are a lot of operating systems out there that
offer the idea that they can run numerous applications at the same
time, but this multi-tasking is mostly an illusion.
64
Embedded Systems and IoT
65
Embedded Systems and IoT
66
Embedded Systems and IoT
67
Embedded Systems and IoT
68
Embedded Systems and IoT
The procedure will take place in only one of the states. There is a
ready state, an executing state, and a waiting state.
69
Embedded Systems and IoT
Each each process will be equipped with its very own process control
block (PCB). The printed circuit board (PCB) is a data structure that
stores the information with which the operating system (OS) manages
the current state of the operation. The printed circuit board (PCB)
may be found in the memory section of the kernel. It is made up of
the details on the current stage of the procedure. The primary
constituents of a PCB are as follows:
• Process ID
• Process priority
• Parent process
• Child process and address to the PCB of the next process
which will run.
Task
• Idle state
• Ready State
• Running state
• Blocked (waiting) state
• Delayed for a preset period
Idle state
job has been formed, and memory has been allocated to the structure
of the task; but, if the task is not ready, the kernel will not schedule it.
Ready State
70
Embedded Systems and IoT
Execution of task codes is halted during the blocked state when the
necessary parameters have been saved into the context of the task. In
order for it to be allowed to execute after blocking, it requires some
IPC, which stands for input, or it needs to wait for an event, or it has
to wait for a job with a higher priority to complete its block.
Deleted Task
Memory that was allocated to the job that was created has been
removed. Memory is unlocked as a result. It will be necessary to
recreate the task. Figure 2.13 depicts the many components that make
up a task control block. The Task Control Block (TCB) is made up of a
Task ID, which is an integer that ranges from 0 to 255. Within the
context of Tasks, the Program Counter (PC) is the variable that stores
the address of the next instruction that will be carried out.
71
Embedded Systems and IoT
In addition, the stack pointer, the central processing unit (CPU), and
the processor status register are all accessible inside the tasks context.
The job priority in TCB is a number that ranges from 0 to 255 and is
represented by bytes. This number determines the priority of a
particular job. Task priority is also used to preserve the relationship
between parent and child tasks.
72
Embedded Systems and IoT
Task is its own self-contained entity, and it is unable to call any other
tasks. A TCB is used to identify each individual task. In the same way
that each function has a name, each job also has its own unique
identifier. If the ID, also known as the task ID, is between 0 and 255,
then it is a byte. ID does double duty as an index to the job. A priority
criterion may be assigned to each individual job. A byte is used to
indicate the priority if it falls between 0 and 255 on the scale. The OS
Scheduler is responsible for context switching between the numerous
activities that are being worked on, which is how multitasking
operations are completed. Each job has to either have a re-entrant
procedure or a mechanism to address the issue of shared data in
order to be considered complete. If it is possible to call a function
while the process is already running, then the function is said to be
re-entrant. The following conditions need to be met for a function to
be considered entrant:
73
Embedded Systems and IoT
Real-time operating systems aren't the only ones that make use of the
context switching method. When an exception occurs and a service
routine has to be carried out, every microprocessor makes use of a
context switching mechanism of some kind. The handling of
exception context switching is often split between the hardware
(certain registers are stored automatically), which is present in the
majority of contemporary CPU architectures, and the code that is
created by the compiler.
The ability to transition between tasks and their contexts while using
real-time operating systems is built into their source code. Despite the
fact that it is managed by software, context switching is reliant on the
hardware. This is because the resources that are required may vary
from one CPU to another. This indicates that the code for task context
switching will need to be adapted for each different architecture of
CPU.
74
Embedded Systems and IoT
Now that we have that out of the way, let's examine the several ways
that task context switching may be accomplished. To get things
rolling, we need to ensure that each job has its own individual private
stack. This private stack will, in addition to serving as a typical
application stack, be used to record the status of the task (including
CPU registers, the return address, the value of the stack pointer, and
so on). We often only use a single stack for the whole of the program
when it comes to the most fundamental or "bare-bone" applications.
The issue that naturally arises is how we may construct separate
stacks for each activity. Changing the value of the stack pointer
register is the method by which this may be achieved. The stack is just
a part of the volatile memory (RAM) that we "reserve" for stack
action. RAM is short for random access memory. The stack pointer is
now pointing in the direction of this section's position. The
fundamental idea is that each job will have a dedicated portion of
memory for its stack. This section of memory will be specified. When
the task is initiated, the start address of this stack will be saved in a
variable so that it may be loaded. This will allow the stack to be used.
• Committing the space to the activity only the once, and then
never releasing it
• The space on the heap that was allotted to a job is released
after that task has finished its activity.
75
Embedded Systems and IoT
Each new job that is formed need to contain a stack memory area in
addition to a task control information memory area. The left-hand
side of Fig. 2.14 illustrates this point.
The size of the task control information area is fixed, and it may
contain the following:
76
Embedded Systems and IoT
77
Embedded Systems and IoT
Figure 2.15: Stack content before and after saving of task state
(context)
78
Embedded Systems and IoT
When adding a new task to the ready queue, give precedence to the
one that is closest to complete in the allocated time. If the running
task was not prioritised at the last sorting, the system will take action
to move it to the head of the queue. If the two tasks have identical
absolute deadlines, choose one at random (the arbitrator may decide
how to break a tie). Since it changes for different tasks within the
same job, we say that the priority is dynamic. Another possible use
case for EDF is aperiodic task sets. As a result of its efficiency, EDF
will always aim to minimise maximum latency.
Any real-time system has to be able to guarantee that all jobs and
tasks will complete their executions before their due dates for it to
work. When people can do what needs doing, we say that the task is
schedulable. To meet the schedulability requirement, the total
utilisation of the task set can't be more than one. To begin, the earliest
potential start time for the deadline's implementation: Is it really true
that EDF scheduling cannot be implemented?
T1 0 10 33
T2 4 3 28
T3 5 10 29
79
Embedded Systems and IoT
• Since the absolute due dates are different for each new
iteration of the job, the priority needs to be modified each time
the work goes back to the ready queue.
• Even more importantly, absolute deadlines are always being
pushed back, so how can we assign a fixed priority value to a
date that is perpetually being pushed back?
• The most essential point is that it is not feasible to determine
absolute deadlines a-priori.
80
Embedded Systems and IoT
81
Embedded Systems and IoT
82
Embedded Systems and IoT
83
Embedded Systems and IoT
Every task that has a resource is denoted by a vertex in the graph that
faces away from the resource and in the direction of the job. In a wait-
for graph, deadlock is indicated by the presence of a cyclic route. J3
has successfully locked the solitary unit of resource R, and J2 is now
in the process of doing so. In order to avoid a deadlock, your system
must have a minimum of two available resources.
84
Embedded Systems and IoT
UNIT III
3.1.1 IoT
85
Embedded Systems and IoT
The Internet of Things has made it feasible for the digital world
and the real world to interact with one another and work
together. It enables enterprises to automate and simplify the
day-to-day processes they do, which provides them with a
wide range of advantages. Companies are capitalizing on the
enormous economic benefits that the Internet of Things (IoT)
may provide as it continues its exponential growth year after
year.
86
Embedded Systems and IoT
Benefits of IoT:
87
Embedded Systems and IoT
88
Embedded Systems and IoT
Computers:
89
Embedded Systems and IoT
90
Embedded Systems and IoT
91
Embedded Systems and IoT
MQTT bridge
92
Embedded Systems and IoT
HTTP bridge
Things or Devices
93
Embedded Systems and IoT
User Interface
Cloud
Cloud storage is used for the purpose of storing data that has
been gathered from a variety of devices or other types of items.
The term "cloud computing" refers to nothing more than a
network of interconnected servers that are always on and
accessible over the internet. The Internet of Things generates
vast volumes of data, which has to be handled effectively. This
data comes from devices, apps, and people.
94
Embedded Systems and IoT
Analytics
95
Embedded Systems and IoT
Network Interconnection
System Security
96
Embedded Systems and IoT
97
Embedded Systems and IoT
98
Embedded Systems and IoT
99
Embedded Systems and IoT
Out of the fourteen digital input and output pins on the board,
six are for pulse width modulation (PWM) and six are for
analogue inputs. In addition to the power connector, reset
button, and USB port, the board also has one. You may connect
the Arduino UNO board to a computer using a USB port,
which also lets the device take electricity from the computer.
Data saved in the Arduino UNO is made use of via the device's
32 KB of flash memory. Another aspect of the Arduino UNO is
its ability to be connected with other Arduino devices and its
compatibility with other shields.
100
Embedded Systems and IoT
101
Embedded Systems and IoT
102
Embedded Systems and IoT
Create some code, then hit the upload button. For the purpose of
uploading the code, the Arduino toolchain is put through its
paces.
103
Embedded Systems and IoT
AVR Studio
104
Embedded Systems and IoT
However, this will not let you to use the bootloader. Because the
bootloader takes a second each time to check for new programs,
this may shorten the amount of time it takes for the board to
load.
105
Embedded Systems and IoT
3.8.1 Overview
106
Embedded Systems and IoT
107
Embedded Systems and IoT
108
Embedded Systems and IoT
109
Embedded Systems and IoT
Example
110
Embedded Systems and IoT
In the first step of the setup code, the pin mode is initialized;
specifically, pin 8 has been configured as an OUTPUT. After a
delay of one thousand milliseconds, the status of the LED will
either be HIGH or LOW depending on whether the loop
function is being used. In a similar vein, we may argue that a
loop function is responsible for carrying out the
implementation of the setup function.
3.9 Sketches
3.9.1 Comments
The Blink sketch begins with a statement that spans its first few
lines:
111
Embedded Systems and IoT
3.9.2 Variables
112
Embedded Systems and IoT
3.9.3 Functions
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as
output
}
113
Embedded Systems and IoT
digitalWrite(ledPin, HIGH);
114
Embedded Systems and IoT
115
Embedded Systems and IoT
116
Embedded Systems and IoT
3.10 Pins
117
Embedded Systems and IoT
118
Embedded Systems and IoT
119
Embedded Systems and IoT
120
Embedded Systems and IoT
121
Embedded Systems and IoT
• Using the alligator clip, connect the long leg of the LED
to the other end of the resistor. Connect the Arduino to your
computer using the USB cable. Launch the Arduino
integrated development environment. Open up the
drawing for this part of the chapter.
• In the upper left corner of the screen, you'll see a button
labeled "Verify." Click on that button. As soon as it is
done, it will change from blue to orange, and then back to
blue again.
• Next to the Verify button, you'll see an Upload button;
click it. As soon as it is done, it will change from blue to
orange, and then back to blue again. Open the window for
the serial monitor; data from the sensor, both input and
output, should be flowing through it.
• You should see a change in the brightness of the LED as
you turn the knob on the potentiometer.
122
Embedded Systems and IoT
The circuit:
123
Embedded Systems and IoT
The Sketch
124
Embedded Systems and IoT
sensorValue = analogRead(analogInPin);
125
Embedded Systems and IoT
analogWrite(analogOutPin, outputValue);
126
Embedded Systems and IoT
The third statement contains code that will insert a tab character
into the string. Compared to the previous Serial.println()
method, which just included "print," the most recent one uses
"println" instead. To ensure that everything is in its proper place,
the println() method writes the value of the outputValue
variable and then begins a new line in the window that displays
the serial monitor. Adding a newline effectively inserts a new
line, much like hitting the return key in a word processor. At the
very end of the sketch is the delay() function, which controls the
timing of the analog-to-digital converter's initialization before it
receives new inputs in the loop() function. Now, we will go over
the function's purpose:
127
Embedded Systems and IoT
Types of Shields
Ethernet shield
The Arduino board may be connected to the internet via the use
of Ethernet shields. It is necessary for us to attach the shield to
the top of the Arduino board that has been stated. The familiar
function of uploading drawings onto the board will be
performed through the USB port.
128
Embedded Systems and IoT
A slot for a micro SD card has been included in the most recent
iteration of Ethernet shields.With the assistance of the SD card
library, the microSD card slot may be made into an interface.In
addition, we are able to attach a second shield directly on top of
the Ethernet shield. This indicates that we are able to place a
total of two shields on the top of the Arduino board.
Xbee Shield
129
Embedded Systems and IoT
Proto shield
Relay shield
130
Embedded Systems and IoT
through them. To get over this kind of difficulty, the relay shield
is used.
Motor shield
Through the use of the Arduino board and the motor shield, we
are able to control the motor. It determines the motor's working
direction as well as its operating speed. Either an external power
source connected to the input terminal of the motor shield, or
the Arduino itself, may be used to provide power to the shield.
131
Embedded Systems and IoT
The L298 chip, which is included into the motor shield, has the
capability of driving either a step motor or two DC motors. A
complete bridge IC may be found on the L298 chip. The
performance of the motor shield is improved because to the
inclusion of the heat sinker, which is also a part of it. It is able to
drive inductive loads, such as solenoids and other similar
components. There is a range of 5V to 12V in the operational
voltage. Applications of the motor shield include things like
intelligent cars and microrobots, amongst other things.
LCD shield
The LCD (Liquid Crystal Display) shield has five buttons that
are referred to as up, down, left, and right, as well as the select
button. On the shield, there is a total of six push buttons that
may collectively function as a control panel for a bespoke menu.
It is made up of 1602 white characters, which can be seen on the
blue backlight LCD screen.
132
Embedded Systems and IoT
Bluetooth shield
133
Embedded Systems and IoT
134
Embedded Systems and IoT
UNIT IV
135
Embedded Systems and IoT
Client-Server Model
136
Embedded Systems and IoT
Publish-Subscribe Model
137
Embedded Systems and IoT
Push-Pull Model
Data publishers, data consumers, and data queues are the three
components that make up the Push-Pull communication
paradigm. The publishers and the customers are not conversant
with one another. The data is pulled out of the queue by
consumers after being pushed in by publishers, who add new
messages or data to the queue. When there is a disparity in the
rates at which the publisher and the consumer are pushing or
pulling data, the queue steps in to function as a buffer for the
messages.
138
Embedded Systems and IoT
139
Embedded Systems and IoT
140
Embedded Systems and IoT
141
Embedded Systems and IoT
With the help of Websocket APIs, clients and servers may have
bidirectional conversations at the same time. Websocket APIs
follow the principle of exclusive pair communication. When
compared to request-response formats like REST, WebSocket
APIs provide full duplex communication without requiring the
creation of a new connection before each message is sent.
Through the submission of a connection setup request, the
client establishes communication with the server. After then,
the server handles this request. Once sent over HTTP, the
server interprets the request—known as a websocket
handshake—as a request for an update. If the server is
websocket capable, it will respond to the websocket handshake
response. Once the connection has been successfully
established, the client and server may engage in full duplex
communication. The Websocket API drastically reduces latency
and network traffic as there is no cost for connection formation
and termination requests per message. Internet of Things
applications requiring low latency or high throughput may be
met by a websocket. Internet of Things (IoT) systems are best
served by the Web socket protocol, which is an API for Internet
of Things communication.
142
Embedded Systems and IoT
4.2.1 AMQP
143
Embedded Systems and IoT
4.2.3 Cellular
144
Embedded Systems and IoT
4.2.4 CoAP
4.2.5 DDS
145
Embedded Systems and IoT
4.2.7 LWM2M
4.2.8 MQTT
146
Embedded Systems and IoT
4.2.9 Wi-Fi
147
Embedded Systems and IoT
4.2.10 XMPP
4.2.11 Zigbee
4.2.12 Z-Wave
148
Embedded Systems and IoT
4.3 Bluetooth
149
Embedded Systems and IoT
150
Embedded Systems and IoT
151
Embedded Systems and IoT
4.4 Wi-Fi
152
Embedded Systems and IoT
4.4.1 Working
153
Embedded Systems and IoT
signal that the wireless adapter in the computer will pick up.
This is because the wireless network is a bidirectional network.
Router
Hotspot
154
Embedded Systems and IoT
4G LTE
5G
155
Embedded Systems and IoT
Wi-Fi In IoT
4.5 ZigBee
156
Embedded Systems and IoT
157
Embedded Systems and IoT
158
Embedded Systems and IoT
159
Embedded Systems and IoT
4.5.5 Topologies
160
Embedded Systems and IoT
161
Embedded Systems and IoT
162
Embedded Systems and IoT
163
Embedded Systems and IoT
4.6 GPS
164
Embedded Systems and IoT
you did not anticipate enjoying. In this day and age, when
everything is connected to the internet, it is feasible to collect
massive volumes of data from a broad range of different
sources. The information that is contained consists of things like
face mapping and medical records. We have been able to locate
our missing cellphones by utilizing the GPS technologies that
are built into them up to this point. We are now able to find the
luggage that were misplaced. These high-tech backpacks, known
as Symphonia Bags, are capable of being monitored via GPS.
Parents are able to use the backpack as a tool to locate their
children in situations when they cannot see them. You won't
need to worry about leaving any of your items behind at the
airport or when traveling since you'll have this bag with you.
The keen expectation that people have for the day when they
will be able to relax in a driverless car as they put their feet up
and let it take them away is something that nobody can dispute.
There is a possibility that the children and teenagers of today
may never put their driving abilities to use. Fully autonomous
driving capabilities will be available in automobiles that are
fitted with GPS technology.
165
Embedded Systems and IoT
166
Embedded Systems and IoT
167
Embedded Systems and IoT
168
Embedded Systems and IoT
169
Embedded Systems and IoT
170
Embedded Systems and IoT
171
Embedded Systems and IoT
• The RAM is shared between the ARM CPU and the GPU,
and the proportion of each may be customized via the
software settings.
• In addition, the operating system and all user data are
stored on a microSD card that may be inserted into the
slot.
• In addition to a variety of input/output (I/O) ports, the
Raspberry Pi is equipped with 40 GPIO pins, often known
as general purpose input/output pins. These pins make it
possible to connect the Raspberry Pi to a variety of
sensors, actuators, and other devices.
4.10 Programming
172
Embedded Systems and IoT
Raspberry Pi
Printing a string:
173
Embedded Systems and IoT
Now that the string has been formatted, we will print it out
without saving it in the variable:
The for loop and the while loop are both available to us, just as
they are in other programming languages. The syntax for the
for loop in the Python programming language is as follows:
The following is what comes out of the for loop in Python that
was just mentioned:
174
Embedded Systems and IoT
The following is what comes out of the for loop in Python that
was just mentioned:
i=1
while(i<5):
print(i)
i=i+1
x=5
if x > 0:
print("Number is greater than zero")
else:
print("Number is less than zero")
175
Embedded Systems and IoT
$nano LinuxHint.py
print(“Welcome to LinuxHint”)
You may quit the editor after saving the file using the nano
editor's shortcut key, which is CTRL+S, and then execute the
script of the file by entering the following command:
$python LinuxHint.py
4.11 Interfaces
Data may be sent over the Raspberry pi via its Serial, SPI, and
I2C interfaces.
176
Embedded Systems and IoT
Serial
SPI
I2C
177
Embedded Systems and IoT
Some of the GPIO pins may perform various tasks at the same
time, such as I2C, SPI, or UART, for example. For our
application, we are free to utilize any of the available GPIO pins.
178
Embedded Systems and IoT
• GPIO Numbering
• Physical Numbering
179
Embedded Systems and IoT
Example
180
Embedded Systems and IoT
RPi.GPIO
181
Embedded Systems and IoT
This function is used to set whether the GPIO pin will act as an
input or an output in the system.
182
Embedded Systems and IoT
Through the usage of this function, the output state of the GPIO
pin may be changed.
183
Embedded Systems and IoT
GPIO.input(channel)
e.g. GPIO.input(9)
Example:
184
Embedded Systems and IoT
Receive procedure:
185
Embedded Systems and IoT
186
Embedded Systems and IoT
187
Embedded Systems and IoT
4.14.2 Cloud4RPi
• Home automation
• Gardening automation
• Remote control of a machine
188
Embedded Systems and IoT
When I tried to extract and analyze data that had been gathered
over a period of time in order to analyze a pattern in anything, I
realized that it was a little difficult to do so. It is doable; the
process is simply not as straightforward as it is with some other
providers.
189
Embedded Systems and IoT
UNIT V
APPLICATIONS DEVELOPMENT
190
Embedded Systems and IoT
191
Embedded Systems and IoT
192
Embedded Systems and IoT
193
Embedded Systems and IoT
• Device Management
• Dashboarding
• Device to Mobile Communication
• Remote Shell
• Over-the-air updates
• Device Shadow
• Metadata management
• Data visualization
194
Embedded Systems and IoT
195
Embedded Systems and IoT
196
Embedded Systems and IoT
If you choose the correct IoT platform, it will provide you with
the tools you need to build an application that fulfills your
requirements. In order to choose an Internet of Things platform
that meets your needs, you will need to check for the following
characteristics:
• Uptime
• Data security
• Debugging
• Feature stability
• Security
• Migration capabilities
• Connectivity, and
• Scalability
197
Embedded Systems and IoT
Design Steps
• Requirements
• Specifications
• Hardware and software functioning.
Requirements
Inputs
Outputs
• Chocolate
• Refund
• A message is displayed on LCD like date, time, welcome
message.
198
Embedded Systems and IoT
System Function
Power Dissipation
The design has to take into account the size of the display as
well as the mechanical components.
Process Deadline
199
Embedded Systems and IoT
Specifications
When the youngster puts the coin in the ACVM system, the
following information is obtained. The coins are separated into
their respective piles according to the ports that are available:
Port1, Port2, and Port5. An interrupt is created by the port
whenever coins are received, and this interrupt is then
delivered to read the current amount's value and raise it.
200
Embedded Systems and IoT
Hardware
• Microcontroller 8051
• 64 KB RAM and 8MB ROM
• 64 KB Flash memory
• Keypad
• Mechanical coin sorter
• Chocolate channel
• Coin channel
• USB wireless modem
Software of ACVM
201
Embedded Systems and IoT
You may program your lights to turn out at the same time you
do, or you can set your thermostat to begin blasting the air
conditioner an hour before you get home from work to avoid
coming home to a steamy house.
202
Embedded Systems and IoT
Automating your home not only makes your life easier, but it
may also save your utility costs. Security cameras and systems,
which are examples of Internet of Things devices, may improve
home security.
203
Embedded Systems and IoT
Monitoring
Control
204
Embedded Systems and IoT
Automation
Remote Control
205
Embedded Systems and IoT
206
Embedded Systems and IoT
207
Embedded Systems and IoT
Control Protocols
208
Embedded Systems and IoT
209
Embedded Systems and IoT
First things first, choose the "smart home ecosystem" that you
wish to participate in, which most likely refers to either Amazon
or Google's offerings. This will define the voice assistant you
choose, which in turn will determine which Internet of Things
devices are compatible with your system. Sticking to one or the
other voice assistant is something we encourage since it may be
difficult to keep track of which one to use with which Internet of
Things device.
210
Embedded Systems and IoT
211
Embedded Systems and IoT
212
Embedded Systems and IoT
213
Embedded Systems and IoT
214
Embedded Systems and IoT
215
Embedded Systems and IoT
216
Embedded Systems and IoT
217
Embedded Systems and IoT
Precision Farming
218
Embedded Systems and IoT
Agricultural Drones
219
Embedded Systems and IoT
220
Embedded Systems and IoT
221
Embedded Systems and IoT
222
Embedded Systems and IoT
Traffic signals, roads, and cars may all benefit from having
Internet of Things (IoT) sensors placed to gather data on traffic
flow, congestion, and accidents. This information may be
utilized to enhance road safety, decrease congestion, and
enhance the efficiency of traffic movement. These systems
indicate a vehicle's position and speed using data gathered
from sensors and the rider's smartphone's GPS. Furthermore,
preferred routes may be predicted using previous data, which
helps avoid congestion issues.
Smart Parking
Public Safety
223
Embedded Systems and IoT
Waste Management
Utility Management
224
Embedded Systems and IoT
Remote Monitoring
Environmental Well-being
Public Transport
225
Embedded Systems and IoT
226
Embedded Systems and IoT
227
Embedded Systems and IoT
228
Embedded Systems and IoT
229
Embedded Systems and IoT
230
Embedded Systems and IoT
231
Embedded Systems and IoT
232
Embedded Systems and IoT
233
Embedded Systems and IoT
The following are some of the primary benefits that the Internet
of Things brings to healthcare:
234
Embedded Systems and IoT
235
Embedded Systems and IoT
Perception Layer
Transport Layer
236
Embedded Systems and IoT
DTP Protocols
237
Embedded Systems and IoT
Edge Layer
238
Embedded Systems and IoT
Data Pre-Processing
Processing Layer
239
Embedded Systems and IoT
Application Layer
Business Layer
240
Embedded Systems and IoT
Security Layer
241
Embedded Systems and IoT
References
242
View publication stats