Vous êtes sur la page 1sur 5

Embedded Systems (April/May-2012, Set-1) JNTU-Hyderabad

Code No.: 9A61206/R09


III B.Tech. II Semester Examinations

April/May - 2012

S.1

Set-1
Solutions

EMBEDDED SYSTEMS
( Information Technology)

Time: 3 Hours

Max. Marks: 75
Answer any FIVE Questions
All Questions carry equal marks
---

1.

2.

3.

(a)

Develop a requirement description and specification of a handheld robot controller. (Unit-I, Topic No. 1.4)

(b)

Explain the characteristics of embedded computing applications. [10+5] (Unit-I, Topic No. 1.1)

(a)

Describe the port configuration of 8051. (Unit-II, Topic No. 2.2)

(b)

Explain the mode 0 and mode 1 operation of timer 0. [7+8] (Unit-II, Topic No. 2.4)

(a)

Discuss about assembly language programming, assembler and flow chart with suitable examples.

(Unit-III, Topic No. 3.2)


(b)

Write a program that will do the task below,


(i)

Exchange the contents of SP and PSW

(ii) Set timer 1 to A23Dh


(iii) Move the contents of B register to TMOD
(iv) Copy the contents of DPTR to registers R0 and R1. [7+8] (Unit-III, Topic No. 3.4)
4.

(a)

Write a program to add ten unsigned numbers from internal RAM location and store the result.

(Unit-IV, Topic No. 4.1)


(b)

Write a program that will use the timer1 to interrupt the program after a delay of 2 m/sec. Write an interrupt
service routine to find the average of five numbers. [7+8] (Unit-IV, Topic No. 4.4)

5.

Develop a program to interface a matrix keyboard to 8051. Draw the interface circuit. [15] (Unit-V, Topic No. 5.1)

6.

(a)

Discuss briefly about semaphores and shared data problem. (Unit-VI, Topic No. 6.3)

(b)

Write notes on memory management. [7+8] (Unit-VI, Topic No. 6.7)

(a)

Discuss briefly about design of underground tank monitoring system. (Unit-VII, Topic No. 7.1)

(b)

Explain about linker/locator for embedded software. [7+8] (Unit-VII, Topic No. 7.7)

7.

8.

Discuss about networks for embedded system. [15] (Unit-VIII, Topic No. 8.2)

B.Tech. III-Year II-Sem.

( JNTU-Hyderabad )

Spectrum ALL-IN-ONE Journal for Engineering Students, 2013

S.2

SOLUTIONS TO APRIL/MAY-2012, SET-1, QP


Q1.

(a)

Develop a requirement description and


specification of a handheld robot
controller.
Answer :
April/May-12, Set-1, Q1(a) M[10]
Requirement Description
1.
Name
Handheld robot controller.
2.
Purpose
To control a terminal which provides a convenient
means for moving a robot, teaching locations and
also running robot programs.
3.
Inputs
Operation key (switches and keys, touch panel),
emergency stop buttons, deadman switch, mode
selector switch.
4.
Output
Robot control signals.
5.
Functions
Responding to the above inputs.
6.
Performance
It allows the user to move away from the host
computer terminal and control the robot locally.
It teaches the location and moves the robot.
7.
Power
5 EDC, 170 mA.
8.
Weight and Dimensions
Weight : 420 gm
Dimensions: 100 mm (W) 195 mm (H) 45 mm (D).
Specifications

It has a serial interface RS232 C with baud rate of 19.2
kbps max.

It has LED area with display capacity based on dot
graphic display.

It has adjustment knob for LCD contrast.

It has operation keys such as switches and keys,
touch panel.

It has emergency stop buttons which stops system
or process.

It has a deadman switch with three position type
(off-on-off) and two circuit output.

The communication connector, dimensions and the
programming languages are based upon the model
type.

B.Tech. III-Year II-Sem.

(b)

Explain the characteristics of


embedded computing applications.
April/May-12, Set-1, Q1(b) M[5]

Answer :

For answer refer Unit-I, Q3, (Excluding Topic: Reasons


for Using Microprocessors).
Q2.

(a)

Describe the port configuration of 8051.


April/May-12, Set-1, Q2(a) M[7]

Answer :
Port Configuration of 8051

For answer refer Unit-II, Q1, Topic: Four General


Purpose Parallel Input/Output Ports.
For remaining answer refer Unit-II, Q5, Topic:
Consider the Internal Circuitry for 8051 Port Pins.
(b)

Explain the mode 0 and mode 1


operation of timer 0.
April/May-12, Set-1, Q2(b) M[8]

Answer :

For answer refer Unit-II, Q10, Topics: Timer Mode


M0, Timer Mode M1.
Q3.

(a)

Discuss about assembly language


programming, assembler and flowchart
with suitable examples.
April/May-12, Set-1, Q3(a) M[7]

Answer :

Assembly Language Programming


For answer refer Unit-III, Q1, Q2.
Example
For answer refer Unit-III, Q9.
Assembler
For answer refer Unit-III, Q3.
Flow Chart
For answer refer Unit-III, Q4, Topics: Flow Charts,
Elements of Flow Chart.
(b)

Write a program that will do the task


below,
(i)

Exchange the contents of SP and


PSW

(ii) Set timer 1 to A23Dh


(iii) Move the contents of B register to
TMOD
(iv) Copy the contents of DPTR to
registers R0 and R1.
April/May-12, Set-1, Q3(b) M[8]

( JNTU-Hyderabad )

Embedded Systems (April/May-2012, Set-1) JNTU-Hyderabad

S.3

Answer :
(i)
Exchange the Contents of SP and PSW
Program
ORG
OOH
MOV PSW, # OE 2H
MOV SP, #03 EH
XCH A, PSW
XCH A, SP
SJMP S
(ii)
Set Timer 1 to A23Dh
Program
MOV TL1, #3Dh
MOV TH1, #0A2h
(iii) Move the Contents of B Register to TMOD
For answer refer Unit-III, Q16(b).
(iv)
Copy the Contents of DPTR to Registers R0 and R1
Program
MOVDPTR,
#1624 HV
MOV
R0, DPL
MOV
R1, DPH.
Q4. (a) Write a program to add ten unsigned numbers from internal RAM location and store the
result.
Answer :
April/May-12, Set-1, Q4(a) M[7]
Program to Add Ten Unsigned Numbers from Internal RAM Locations
Let the memory location start at 4400:0100H.
Result should be stored at 120H in the same data segment.
MOV AX, 4400H
MOV DS, AX
MOV CX, 0010H
// Initializing the counter with 10
MOV BX, 0100H
// offset.
LOOP:
ADD AL, [BX]
INC BX
DEC CX
JNZ LOOP
MOV [0120], AL .
(b) Write a program that will use the timer 1 to interrupt the program after a delay of 2 m/sec.
Write an interrupt service routine to find the average of five numbers.
Answer :
April/May-12, Set-1, Q4(b) M[8]
Program Using Timer 1 to Interrupt the Program After a Delay of 2 m/sec
MAIN : MOV R6, #2D
LOOP : ACALL DELAY
DJNZ
R6, LOOP
SJMP
MAIN

B.Tech. III-Year II-Sem.

( JNTU-Hyderabad )

Spectrum ALL-IN-ONE Journal for Engineering Students, 2013

S.4
DELAY : MOV TMOD,

#000000 01B

MOV TH1,

#OFCH

MOV TL1,

#018 H

Q7.

JNB

TF1,

CLR

TR1

CLR

TF1

Discuss briefly about design of


underground tank monitoring system.
April/May-12, Set-1, Q7(a) M[7]

Answer :

For answer refer Unit-VII, Q28.

SETB TR1
HERE :

(a)

(b)

Explain about linker/locator for


embedded software.

HERE

April/May-12, Set-1, Q7(b) M[8]

Answer :

For answer refer Unit-VII, Q15(c), (d).


Q8.

RET
Interrupt Service Routine to Find the Average of Five
Numbers

Discuss about networks for embedded


system.
April/May-12, Set-1, Q8 M[15]

Answer :
Networked Embedded System

Avg_ISR:
XOR AX
XOR BX
XOR CX
MOV AL, 2

A networked embedded system is one where several


processing elements like microcontrollers and other ICs
communicate with each other through a network. In other
words, an embedded system is a network of nodes, where
each node represents a processing element. Networks can
be used to develop distributed embedded systems.

ADD AL, 3

PE1

PE2

ADD AL, 4

Processor

DSP
Network

ADD AL, 5
ADD AL, 6
MOV CX, 5
DIV
Q5.

CX.

Develop a program to interface a matrix


keyboard to 8051. Draw the interface circuit.
April/May-12, Set-1, Q5 M[15]

Answer :

For answer refer Unit-V, Q5.


Q6.

(a)

Discuss briefly about semaphores and


shared data problem.
April/May-12, Set-1, Q6(a) M[7]

Answer :
Semaphores

For answer refer Unit-VI, Q8.


Shared Data Problem
For answer refer Unit-VI, Q4.
(b)

Write notes on memory management.

Answer :

April/May-12, Set-1, Q6(b) M[8]

Micro
controller

PE3

Sensors
and
actuator

PE4 PE = Processing
Element

Figure: A Distributed Embedded System


The figure shown above illustrates an example
distributed embedded system. Here, four processing
elements (PEs) are connected to each other through a
network. These processing elements include a processor, a
DSP, a microcontroller and some sensors and actuators
(which acts as I/O devices).
The network used in our example is a simple bus
structure, however other topologies like star, mesh etc., can
also be used. The network provides connection between
PEs through which communication is possible. Hence, this
network is also known as communication link.
Note that the network used in distributed embedded
system is quite different from system bus. This is because
system bus has memory on it, but network does not have.
Moreover, a network uses network protocol for
communication, whereas a system bus does not use a
protocol.

For answer refer Unit-VI, Q21.

B.Tech. III-Year II-Sem.

( JNTU-Hyderabad )

Embedded Systems (April/May-2012, Set-1) JNTU-Hyderabad

S.5

Reasons for Developing Network-based Embedded Systems




There may be some systems that require processing to be done at the place where some event had occurred. For
example, consider an automobile system. The engine control module requires some processing elements to be kept
near the engine. So that they take engine status and perform processing immediately. Later they can send data to
main processor through the network.

Data reduction can be performed using distributed Processing Elements (PEs). Consider a system requires some
signal processing at the site where data is captured. A separate PE can be used to perform signal processing which
reduces the captured data and sends it to main processor for further processing.

Networked based embedded system helps in creating a modular embedded system.

B.Tech. III-Year II-Sem.

( JNTU-Hyderabad )

Vous aimerez peut-être aussi