Embd Missing Topics Units-1,2,3,4
Embd Missing Topics Units-1,2,3,4
1.Write an 8051 ALP to create a square wave of 66% duty cycle on bit 3 of port 1.
To create a square wave of 66% duty cycle on bit 3 of port 1 using an 8051 microcontroller
assembly language program, you can use timer interrupts. Below is an example assembly
language program:
EXPLANATION:
• ORG 0H: This directive sets the origin of the program counter to the start of program
memory.
• MOV TMOD, #01H: Configures Timer 0 in Mode 1, which is 16-bit auto-reload mode.
• MOV TH0, #0CH and MOV TL0, #0CH: Load the initial values into Timer 0. These values are
chosen to generate a 66% duty cycle.
• MOV P1, #0FFH: Initializes port 1 with all bits set to high.
• SETB TR0: Starts Timer 0.
• SETB EA and SETB ET0: Enable global interrupts and Timer 0 interrupt respectively.
• MAIN:: The main loop of the program.
• SJMP MAIN: Infinite loop to keep the program running.
• TIMER0_ISR:: Timer 0 interrupt service routine.
• CPL P1.3: Toggles bit 3 of port 1.
• RETI: Returns from the interrupt.
2.How does one interface a 16 x 2 LCD display using 8051 microcontroller.
Interfacing a 16x2 LCD display with an 8051 microcontroller involves connecting the LCD
to the microcontroller's GPIO pins and sending commands and data to the LCD using a
suitable communication protocol, usually either 4-bit or 8-bit parallel communication mode.
Here's a basic overview along with a diagram:
Hardware Connections:
Here's a diagram illustrating the connections between the 16x2 LCD and the 8051
microcontroller:
Initialization Sequence:
The initialization sequence for the LCD typically involves sending specific commands to
configure the display. These commands can vary depending on the specific LCD controller
used (e.g., HD44780). Common initialization commands include setting the display mode
(number of lines, font), clearing the display, setting the cursor position, etc.
Sending Data/Commands:
To send data (characters to be displayed) to the LCD, set the RS pin to 1 to indicate data
mode, and then send the data byte on the data lines (D0-D7). To send commands (e.g., clear
display, set cursor position), set the RS pin to 0 to indicate command mode, and then send
the command byte on the data lines.
Writing a Display Function:
Write functions in your code to interact with the LCD. These functions should encapsulate
the necessary commands to perform actions such as writing characters to the display,
positioning the cursor, clearing the display, etc.
UNIT 2
1.With Neat Diagram, describe the functional blocks for one ARM microcontroller.
Timer is a specific type of clock which is used to measure the time intervals. It
provides/measures the time interval by counting the input clocks. Every timer needs a clock to
work. We can provide/measure any time interval if we know the time of one clock period.
e.g. Let’s say we have 1 kHz input clock frequency for the timer unit, then,
We can calculate time of one clock period as,
= 1 / 1000
= 1milliSecond
i.e. 1000 clock counts provide a time interval of 1 second, and hence we can provide 1 second
delay with these 1000 clock counts.
Now, once we have the time period of one clock, we can use this time period to generate delays
that are integer multiples of it. We can also use the time period to measure the time interval
between specific events of a received signal.
Counter is the unit which is similar to Timers but works in a reverse manner to the timers. It
counts the external events or we can say external clock ticks. It is mostly used to measure
frequency from the counts of clock ticks.
e.g. Let’s say Counter is measuring counts of external clock ticks, and frequently its count
reaches 2000 in one second i.e. 2000 clock ticks/second.
= 2000 / 1
= 2 kHz
There are many applications for which we can use these timers and counters in real world.
• LPC2148 Timer has input of peripheral clock (PCLK) or an external clock. It counts the
clock from either of these clock sources for its operation.
• LPC2148 Timer/Counter can generate an interrupt signal at specified time value.
• LPC2148 has match registers that contain count value which is continuously compared
with the value of the Timer register. When the value in the Timer register matches the
value in the match register, specific action (timer reset, or timer stop, or generate an
interrupt) is taken.
• For information about LPC2148 compare and match operation refer Timer Compare
Mode.
• Also, LPC2148 has capture registers which can be used to capture the timer value on a
specific external event on capture pins. For information about LPC2148 capture operation
refer Input Capture Mode.
Here, we will see how to use timer 0 registers to configure the timer 0. Timer 1 can be used in a
similar manner by using its corresponding registers.
Timer0 Registers
· It is incremented when the Prescale Counter (PC) reaches its maximum value held by
Prescaler Register (PR).
Note : When TC overflow occurs, it does not generate any overflow interrupt. Alternatively, we
can use match register to detect overflow event if needed.
• It is a 32-bit register.
• It holds the maximum value of the Prescale Counter.
• It is a 32-bit register.
• It controls the division of PCLK by some constant value before it is applied to the Timer
Counter.
• It is incremented on every PCLK.
• When it reaches the value in Prescale Register, the Timer Counter is incremented and
Prescale Counter is reset on next PCLK.
• It is a 16-bit register.
• It controls what action is to be taken on a match between the Match Registers and Timer
Counter.
UNIT 4
BACnet is used as a tool by owners of buildings & system specifiers for the specification
of the interoperable system. This protocol does not change the need for indicating what a
consumer needs. So, it provides simply some consistent tools to assist the creation &
specification of systems that can interoperate.
BACnet protocol is used in all types of automated building systems. So, there are
interoperable products available within different categories like security, fire, lighting, elevators,
HVAC, etc. This protocol simply addresses the interoperability goal through simply defining a
general working model of automation devices, a technique used for defining the data that they
include, & also a technique used for explaining protocols that a single device can utilize to
inquire one more device to execute some preferred action.
The upper layers of BACnet do not depend on the physical layer. So the Physical layer of
BACnet makes it feasible for BACnet to be executed on different networks. The physical layers
of BACnet have been specified with ARCNET, Ethernet, IP tunnels, BACnet/IP, RS-232,
RS485, and Lonworks/LonTalk. RS232 is for point-to-point communication. RS485 supports up
to 32 nodes with a distance of 1200 m at 76Kbps.
IP BACnet Virtual Link Layer encapsulates required control data in a header of BACnet
virtual link control information. Because of IP, BVLL, and BACnet protocol devices can directly
communicate over IP networks without the requirement of any router device.
BACnet protocol utilizes BBMD (BACnet broadcast management device) concept which
executes the required broadcast for the preferred link layer. So, the BACnet broadcast message is
changed into IP-based broadcast or multicast messages
This layer simply specifies the required addresses of the network for routing. BACnet
network includes a minimum of one or above segments that are connected with bridges once
they utilize similar LAN technologies. If they utilize various LAN protocols then they are
connected through routers.
Application Layer
BACnet does not separate presentation as well as application layers. So it takes care of
reliability & sequencing or segmentation mechanisms generally connected with both the session
& transport layers. BACnet includes devices like objects to exchange service primitives which
are described with ASN.1 syntax & serialized with ASN.1 BER.
BACnet Security Layer
The concept of BACnet security can be understood easily with an example say when BACnet device-A
requests a session key from the key server for establishing secure communication through device-B, then
this key is transmitted to both the device-A & device-B through the key server which is known as ‘SKab’.
BACnet protocol uses 56-bit DES encryption.
MODbus
Modbus is a request-response protocol implemented using a master-slave relationship. In a
master-slave relationship, communication always occurs in pairs—one device must initiate a
request and then wait for a response—and the initiating device (the master) is responsible for
initiating every interaction. Typically, the master is a human machine interface (HMI) or
Supervisory Control and Data Acquisition (SCADA) system and the slave is a sensor,
programmable logic controller (PLC), or programmable automation controller (PAC). The
content of these requests and responses, and the network layers across which these messages are
sent, are defined by the different layers of the protocol.
The PDU and the code that handles it comprise the core of the Modbus Application Protocol
Specification. This specification defines the format of the PDU, the various data concepts used
by the protocol, the use of function codes to access that data, and the specific implementation
and restrictions of each function code.
The Modbus PDU format is defined as a function code followed by an associated set of data. The
size and contents of this data are defined by the function code, and the entire PDU (function code
and data) cannot exceed 253 bytes in size. Every function code has a specific behavior that
slaves can flexibly implement based on their desired application behavior. The PDU
specification defines core concepts for data access and manipulation; however, a slave may
handle data in a way that is not explicitly defined in the specification.
It is all about connecting devices that have their own unique identities, as well as network & are
connected to the Internet, embedded with sensors, electronics, & software which allow it to
collect & exchange data over the Internet without any human interaction.
Main goal of IOT is to convert a dumb device that has no processing capabilities, into a
smarter device that has its own computing capability so that they can exchange data over the
internet and also allowing the device to communicate real-time data without involving a human
being. Using IOT you can connect objects which you use in your daily life, such as thermostats,
irrigation pumps, kitchen appliances, television to the internet. Example, A light bulb that can be
switched ON using a smartphone application is an IoT device.
S.no IIOT IOT
1. It focuses on industrial applications such as It focuses on general applications
manufacturing, power plants, oil & gas, etc. ranging from wearables to robots &
machines.
2. It uses critical equipment & devices Its implementation starts with small
connected over a network which will cause a scale level so there is no need to worry
life-threatening or other emergency situations about life-threatening situations.
on failure therefore uses more sensitive and
precise sensors.
3. It deals with large scale networks. It deals with small scale networks.
4. It can be programmed remotely i.e., offers It offers easy off-site programming.
remote on-site programming.
5. It handles data ranging from medium to high. It handles very high volume of data
6. It requires robust security to protect the data. It requires identity and privacy.
7. It needs stringent requirements. It needs moderate requirements
8. It having very long life cycle. It having short product life cycle.
9. It has high- reliability. It is less reliable.
1. Lack of encryption –
Although encryption is a great way to prevent hackers from accessing data, it is also
one of the leading IoT security challenges.
These drives like the storage and processing capabilities that would be found on a
traditional computer.
The result is an increase in attacks where hackers can easily manipulate the
algorithms that were designed for protection.
2. Insufficient testing and updating –
With the increase in the number of IoT(internet of things) devices, IoT
manufacturers are more eager to produce and deliver their device as fast as they can
without giving security too much of although.
Most of these devices and IoT products do not get enough testing and updates and
are prone to hackers and other security issues.
3. Brute forcing and the risk of default passwords –
Weak credentials and login details leave nearly all IoT devices vulnerable to
password hacking and brute force.
Any company that uses factory default credentials on their devices is placing both
their business and its assets and the customer and their valuable information at risk
of being susceptible to a brute force attack.
4. IoT Malware and ransomware –
Increases with increase in devices.
Ransomware uses encryption to effectively lock out users from various devices and
platforms and still use a user’s valuable data and info.
Example –
A hacker can hijack a computer camera and take pictures.
By using malware access points, the hackers can demand ransom to unlock the
device and return the data.
5. IoT botnet aiming at cryptocurrency –
IoT botnet workers can manipulate data privacy, which could be massive risks for
an open Crypto market. The exact value and creation of cryptocurrencies code face
danger from mal-intentioned hackers.
The blockchain companies are trying to boost security. Blockchain technology itself
is not particularly vulnerable, but the app development process is.
6. Inadequate device security : Inadequate device security refers to the lack of proper
measures to protect electronic devices such as computers, smartphones, and IoT
devices from cyber attacks, hacking, data theft, and unauthorized access. This can
happen due to outdated software, weak passwords, unpatched vulnerabilities, lack
of encryption, and other security risks. It is important to regularly update the
software and implement strong security measures to ensure the security and privacy
of sensitive information stored on these devices. Many IoT devices have weak
security features and can be easily hacked.
7. Lack of standardization: Lack of standardization refers to the absence of agreed-
upon specifications or protocols in a particular field or industry. This can result in
different systems, products, or processes being incompatible with each other,
leading to confusion, inefficiency, and decreased interoperability. For example, in
the context of technology, a lack of standardization can cause difficulties in
communication and data exchange between different devices and systems.
Establishing standards and protocols can help overcome this and ensure uniformity
and compatibility. There is a lack of standardization in IoT devices, making it
difficult to secure them consistently.
8. Vulnerability to network attacks: Vulnerability to network attacks refers to the
susceptibility of a network, system or device to being compromised or exploited by
cyber criminals. This can happen due to weaknesses in the network infrastructure,
unpatched software, poor password management, or a lack of appropriate security
measures. Network attacks can result in data theft, loss of privacy, disruption of
services, and financial loss. To reduce vulnerability to network attacks, it’s
important to implement strong security measures such as firewalls, encryption, and
regular software updates, as well as educate users on safe internet practices. IoT
devices rely on networks, making them vulnerable to attacks like denial-of-service
(DoS) attacks.
9. Unsecured data transmission: Unsecured data transmission refers to the transfer
of data over a network or the internet without adequate protection. This can leave
the data vulnerable to interception, tampering, or theft by malicious actors.
Unsecured data transmission can occur when data is transmitted over an
unencrypted network connection or when insecure protocols are used. To protect
sensitive data during transmission, it is important to use secure protocols such as
SSL/TLS or VPN, and to encrypt the data before sending it. This can help to ensure
the confidentiality and integrity of the data, even if it is intercepted during
transmission. IoT devices often transmit sensitive data, which may be vulnerable to
eavesdropping or tampering if not properly secured.
10. Privacy concerns: Privacy concerns refer to issues related to the collection,
storage, use, and sharing of personal information. This can include concerns about
who has access to personal information, how it is being used, and whether it is
being protected from unauthorized access or misuse. In the digital age, privacy
concerns have become increasingly important as personal information is being
collected and stored on an unprecedented scale. To address privacy concerns,
individuals and organizations need to implement appropriate security measures to
protect personal information, be transparent about how it is being used, and respect
individuals’ rights to control their own information. Additionally, privacy laws and
regulations have been established to provide guidelines and protections for
individuals’ personal information. The vast amount of data generated by IoT
devices raises privacy concerns, as personal information could be collected and
used without consent.
11. Software vulnerabilities: Software vulnerabilities are weaknesses or flaws in
software code that can be exploited by attackers to gain unauthorized access, steal
sensitive information, or carry out malicious activities. Software vulnerabilities can
arise from errors or mistakes made during the development process, or from the use
of outdated or unsupported software. Attackers can exploit these vulnerabilities to
gain control over a system, install malware, or steal sensitive information. To
reduce the risk of software vulnerabilities, it is important for software developers to
follow secure coding practices and for users to keep their software up-to-date and
properly configured. Additionally, organizations and individuals should implement
robust security measures, such as firewalls, antivirus software, and intrusion
detection systems, to protect against potential threats. IoT devices often have
software vulnerabilities, which can be exploited by attackers to gain access to
devices and networks.
12. Insider threats: Insider threats refer to security risks that come from within an
organization, rather than from external sources such as hackers or cyber criminals.
These threats can take many forms, such as employees who intentionally or
unintentionally cause harm to the organization, contractors who misuse their access
privileges, or insiders who are coerced into compromising the security of the
organization. Insider threats can result in data breaches, theft of intellectual
property, and damage to the reputation of the organization. To mitigate the risk of
insider threats, organizations should implement strict access controls, monitor
employee activity, and provide regular training on security and privacy policies.
Additionally, organizations should have a plan in place to detect, respond to, and
recover from security incidents involving insiders. Employees or contractors with
access to IoT systems can pose a security risk if they intentionally or
unintentionally cause harm
Design challenge in IoT :
Design challenges in IoT (Internet of Things) refer to the technical difficulties and trade-offs
involved in creating connected devices that are both functional and secure. Some of the key
design challenges in IoT include:
• Interoperability: Interoperability refers to the ability of different systems, devices,
or components to work together seamlessly and exchange data effectively. In the
context of the Internet of Things (IoT), interoperability is a critical challenge, as a
large number of diverse devices are being connected to the internet. The lack of
standardization in the IoT can lead to difficulties in communication and data
exchange between devices, resulting in an fragmented and inefficient system. To
overcome this challenge, organizations and industry groups are working to establish
standards and protocols to ensure interoperability between IoT devices. This
includes the development of common communication protocols, data formats, and
security standards. Interoperability is important for enabling the full potential of the
IoT and allowing connected devices to work together effectively and efficiently.
Ensuring that different IoT devices can work together seamlessly and exchange data
effectively.
• Security: Security is a critical concern in the Internet of Things (IoT) as it involves
the protection of sensitive data and systems from unauthorized access, theft, or
damage. IoT devices are often vulnerable to cyber attacks due to their increased
exposure to the internet and their limited computing resources. Some of the security
challenges in IoT include:
1. Device security: Ensuring that IoT devices are protected from malware and
unauthorized access.
2. Network security: Protecting the communication between IoT devices and the
network from cyber attacks.
3. Data security: Securing the data collected and transmitted by IoT devices from
unauthorized access or tampering.
4. Privacy: Protecting the privacy of individuals whose personal information is
collected and transmitted by IoT devices.
To address these security challenges, organizations should implement robust
security measures such as encryption, firewalls, and regular software updates.
Additionally, they should conduct regular security audits and assessments to
identify and address potential security risks. By prioritizing security, organizations
can help to protect the sensitive data and systems involved in IoT and reduce the
risk of cyber attacks.Protecting IoT devices and the sensitive data they collect and
transmit from cyber threats and unauthorized access.
• Scalability: Scalability refers to the ability of a system to handle increasing
workloads or numbers of users without a significant decline in performance. In the
context of the Internet of Things (IoT), scalability is a major challenge as the
number of connected devices is rapidly growing, leading to an increased volume of
data and communication. Scalability challenges in IoT include:
1. Data management: Effectively managing and storing the large amounts of data
generated by IoT devices.
2. Network capacity: Ensuring that networks have sufficient capacity to handle the
increased volume of data and communication.
3. Device management: Efficiently managing the growing number of IoT devices and
ensuring that they can be easily configured and maintained.
To address these scalability challenges, organizations should adopt scalable architectures,
such as cloud computing, that can accommodate the growing number of IoT
devices and the data they generate. Additionally, they should implement efficient data
management and storage solutions, such as distributed databases and data lakes, to
handle the increased volume of data. By prioritizing scalability, organizations can ensure that
their IoT systems can handle the growing number of connected devices and continue
to deliver high performance and efficiency. Designing systems that can accommodate large
numbers of connected devices and manage the resulting data flow effectively.
• Reliability: Reliability refers to the ability of a system to perform its intended
function consistently and without failure over time. In the context of the Internet of
Things (IoT), reliability is a critical concern, as the failure of even a single IoT
device can have significant consequences. Some of the reliability challenges in IoT
include:
1. Device failure: Ensuring that IoT devices are designed and built to be reliable and
function correctly even in harsh environments.
2. Network connectivity: Maintaining stable and reliable connections between IoT
devices and the network, even in the face of hardware or software failures.
3. Data accuracy: Ensuring that the data collected and transmitted by IoT devices is
accurate and reliable.
To address these reliability challenges, organizations should implement robust and
reliable hardware and software designs for IoT devices, and conduct regular testing and
maintenance to identify and resolve any issues. They should also implement redundant systems
and failover mechanisms to ensure that the system continues to function in the event of a
failure. By prioritizing reliability, organizations can help ensure that their IoT systems perform
consistently and without failure, delivering the intended benefits and results. Ensuring that IoT
systems remain functional and accessible even in the face of hardware or software failures.
• Power consumption: Power consumption refers to the amount of energy that a
system or device uses. In the context of the Internet of Things (IoT), power
consumption is a critical challenge, as many IoT devices are designed to be small,
low-power, and operate using batteries. Some of the power consumption challenges
in IoT include:
1. Battery life: Ensuring that IoT devices have sufficient battery life to operate without
frequent recharging or replacement.
2. Energy efficiency: Making sure that IoT devices are designed to use energy
efficiently and reduce the overall power consumption of the system.
3. Power management: Implementing effective power management techniques, such as
sleep modes, to reduce the power consumption of IoT devices when they are not in
use.
To address these power consumption challenges, organizations should adopt low-power
technologies and energy-efficient designs for IoT devices. They should also implement
effective power management techniques, such as sleep modes, to reduce the power
consumption of IoT devices when they are not in use. By prioritizing power consumption,
organizations can help ensure that their IoT systems are energy efficient, reducing costs and
environmental impact. Minimizing the power consumption of IoT devices to extend battery life
and reduce costs.
• Privacy: Privacy is a critical concern in the Internet of Things (IoT), as IoT devices
collect, store, and transmit large amounts of personal and sensitive information.
Some of the privacy challenges in IoT include:
1. Data collection: Ensuring that only the necessary data is collected and that it is
collected in a way that respects individuals’ privacy rights.
2. Data storage: Ensuring that the data collected by IoT devices is stored securely and
that access to it is strictly controlled.
3. Data sharing: Controlling who has access to the data collected by IoT devices and
ensuring that it is not shared without proper authorization.
To address these privacy challenges, organizations should implement robust privacy
policies and procedures, such as data protection, data minimization, and data retention. They
should also educate users on the privacy implications of using IoT devices and encourage them
to take steps to protect their privacy. Additionally, organizations should adopt privacy-
enhancing technologies, such as encryption and anonymization, to protect the privacy of
individuals whose information is collected by IoT devices. By prioritizing privacy,
organizations can help to ensure that individuals’ rights and freedoms are respected, and that
sensitive information is protected from unauthorized access or misuse. Protecting the privacy
of individuals whose personal information is collected and transmitted by IoT devices.
M2M ARCHITECTURE
Machine to machine, or M2M, is a term that refers to systems in which machines interact with
one another autonomously and without the need for human involvement, regardless of the
devices or communication channels involved.
Application Layer:
It is the oneM2M architecture's top layer. IoT applications and services reside in this layer. IoT
applications may take many different forms, from industrial monitoring to smart home
automation. To access and manage IoT resources and data, the application layer communicates
with the services layer. The role of the IoT M2M Application Layer is to integrate IoT devices
with apps, such as connecting smart devices to your phone. Additionally, it ensures that these
gadgets can exchange data with other crucial systems, such as business intelligence tools.
Services Layer :
The service layer acts as a connecting layer between IoT devices and communication networks.
It is essential for abstracting away the difficulties of device connectivity and data transfer. This
layer standardizes data formats and communication protocols, providing interoperability across
IoT platforms and devices. We can also say this layer functions as the background control hub. It
manages the logical parts of the network and the rules they follow to work together efficiently.
Network Layer :
All devices, or "things," connect at the network layer. It also includes the physical network
connections, such as cellular or Wi-Fi networks that link them. The network layer manages the
connectivity and data transmission between IoT devices. It ensures that data is sent quickly and
securely between devices, the cloud, and other data processing facilities.