0% found this document useful (0 votes)
12 views5 pages

EIOT IA1 Answer

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

EIOT IA1 Answer

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

PART A(2MRK)

1. What is an embedded system? How is it used for automation?


 Embedded System: An embedded system is a dedicated computing system that performs a specific
function or task within a larger system. It combines hardware (such as microcontrollers or
microprocessors) with software to carry out real-time operations.

 Used in Automation: Embedded systems are essential for automation in various industries like
manufacturing, healthcare, and home automation. They control machinery, manage sensors,
actuators, and other electronic systems without human intervention. Examples include automated
robotic arms in factories, smart home devices (like thermostats), and medical equipment.

2. Why does the program reside in ROM in an embedded system?


 In embedded systems, the program resides in Read-Only Memory (ROM) because ROM retains
data even when power is turned off, making it ideal for storing firmware or embedded application
code. Since embedded systems are designed for specific, repetitive tasks, their programs are rarely
changed after production. ROM provides the stability and permanence needed for such applications.

3. Distinguish between microprocessors and microcontrollers.


 Microprocessor:

o Central Processing Unit (CPU) only.

o Requires external components (RAM, ROM, I/O ports) for operation.

o Used in complex tasks like general-purpose computing.

o Example: Intel Core i7.

 Microcontroller:
o Contains CPU, memory (RAM, ROM), and peripherals (I/O ports, timers) on a single chip.

o Designed for specific control tasks like automation in embedded systems.

o Example: ATmega328 (used in Arduino UNO).

4. What is the work of PSEN and EA pin, PSW of 8051?


 PSEN (Program Store Enable): It is an active-low signal used to read external program memory. It
is activated when 8051 fetches code from external ROM.

 EA (External Access): When connected to ground, the 8051 fetches code from external memory. If
connected to Vcc, the microcontroller runs code from internal memory.
 PSW (Program Status Word): A special function register in the 8051 that contains flag bits (such as
carry, auxiliary carry, overflow, and parity) and control bits used in arithmetic and logical operations.
5. List and draw timer modes TMOD, TCON of 8051 microcontroller.
 TMOD (Timer Mode Register): Controls the mode of operation of Timer 0 and Timer 1.

o Mode 0: 13-bit timer.

o Mode 1: 16-bit timer.

o Mode 2: 8-bit auto-reload timer.

o Mode 3: Split timer mode (Timer 0 becomes two 8-bit timers).

 TCON (Timer Control Register): Controls the operation of timers and external interrupts.

o TF1, TF0: Timer 1, Timer 0 overflow flags.


o TR1, TR0: Timer 1, Timer 0 run control bits.

o IE1, IE0: External interrupt 1, 0 flags.

o IT1, IT0: External interrupt 1, 0 type control bits.

Here's a rough drawing of TMOD and TCON:

 TMOD: GATE | C/T | M1 | M0 | GATE | C/T | M1 | M0 (8 bits, divided into two 4-bit fields for
Timer 1 and Timer 0).

 TCON: TF1 | TR1 | TF0 | TR0 | IE1 | IT1 | IE0 | IT0 (8 bits controlling timers and interrupts).

6. Write a program to load values into the accumulator, DPH, and DPL registers.
assembly
Copy code

MOV A, #55H ; Load 55H into the Accumulator

MOV DPH, #22H ; Load 22H into Data Pointer High (DPH)

MOV DPL, #33H ; Load 33H into Data Pointer Low (DPL)

7. Write a program to find 2’s complement using 8051.


assembly

Copy code

MOV A, #25H ; Load 25H into accumulator

CPL A ; Complement the value (1's complement)


INC A ; Add 1 to get the 2's complement
8. Write a program to add, subtract, multiply 2 numbers, and swap two numbers.
assembly

Copy code

; Add two numbers

MOV A, #05H ; Load 05H into Accumulator

ADD A, #03H ; Add 03H to Accumulator, result is 08H

; Subtract two numbers


MOV A, #07H ; Load 07H into Accumulator

SUBB A, #02H ; Subtract 02H from Accumulator, result is 05H

; Multiply two numbers

MOV A, #04H ; Load 04H into Accumulator

MOV B, #02H ; Load 02H into Register B

MUL AB ; Multiply A and B, result in A (low byte) and B (high byte)

; Swap two numbers

MOV A, #0AH ; Load 0AH into A

MOV R0, #05H ; Load 05H into R0

XCH A, R0 ; Swap contents of A and R0

9. How to interface I/O devices with 8051?


 Interfacing I/O devices with the 8051 microcontroller involves connecting external components
(like sensors, motors, LEDs, etc.) to the I/O ports (P0-P3). Each pin can be configured as input or
output, allowing communication with the connected device. The microcontroller sends/receives
signals to/from the device based on its programmed logic.

10. What is a special function register?


 Special Function Registers (SFRs): These are memory locations in the 8051 that control specific
functions of the microcontroller, such as timers, interrupts, I/O ports, and serial communication.
Examples include ACC, B, PSW, TMOD, TCON, and IE.
11. What is RTOS and when should it be used in an embedded system?
 RTOS (Real-Time Operating System): An OS designed to handle tasks in real-time, ensuring that
responses to inputs are predictable and occur within a specific time limit. It manages task scheduling,
inter-task communication, and resource management.

 When to Use: RTOS is used in time-sensitive embedded applications such as industrial automation,
medical devices, and automotive systems where real-time processing is critical.

12. What is context switching and priority scheduling?


 Context Switching: The process of storing and restoring the state (context) of a CPU when
switching between tasks. This allows multitasking in a system.

 Priority Scheduling: A scheduling method in which tasks are assigned different priorities. Tasks
with higher priority are executed first. It's used in systems where some operations are more critical
than others.

13. Differentiate multiprocessing and multitasking.


 Multiprocessing: Refers to the use of multiple CPUs or cores to execute different processes
simultaneously. It increases computational power.

 Multitasking: Refers to a single CPU handling multiple tasks by quickly switching between them,
giving the illusion that multiple tasks are happening concurrently.

14. What are IoT testing tools?


 Some IoT testing tools include:

o IoTIFY: For simulating IoT devices and networks.


o ThingWorx: For functional testing and performance testing.

o Shodan: A search engine that tests IoT devices for vulnerabilities.

o Wireshark: For network traffic analysis.

o Postman: For testing APIs in IoT platforms.

15. What are the pins to read analog and digital data in Arduino?
 Analog Data: Pins A0-A5 are used to read analog input signals (0-5V, 10-bit resolution).

 Digital Data: Pins D0-D13 can read or write digital signals (either HIGH or LOW).
16. How to store a large amount of data in Arduino?
 Use external memory modules such as:

o SD Card: Interface with SD card modules to store large datasets.

o EEPROM: Store smaller amounts of data (1KB for Arduino UNO).

o External Flash or SRAM chips: To store more data than the internal memory.

17. How to add a library in Arduino?


 Steps:
1. Open Arduino IDE.

2. Go to Sketch > Include Library > Manage Libraries.

3. Search for the desired library and click Install.

4. Alternatively, if you have a ZIP file, go to Sketch > Include Library > Add .ZIP Library,
select the ZIP file, and add it.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy