ET7102-Microcontroller Based System Design
ET7102-Microcontroller Based System Design
I-SEM. / M.E.(C&I)
2015-2016
3.Registerindirect addressing
6.Index addressing
Page 1
I-SEM. / M.E.(C&I)
2015-2016
6. How many hardware interrupt pins are available in microcontroller 8051 and
ROM locations when activated? (June / July 2013)
There are Two hardware interrupts pins are available in 8051.
External interrupt 0 : IE0 : 0003H
External interrupt 1 : IE1 : 0013H
7. What is the size of the stack pointer in MC8051? (June / July 2013)
Stack pointer size is a 16 bit register and it will point to the stack memory. It holds the
address of the stack memory when an subroutine or interrupt is invoked.
8. How is the program memory organized in 8051 (June12)
External memory depends on the EA pin logic state:
Page 2
B Arithmetic
IE Interrupt enable control
IP Interrupt priority
P0 Input/Output port latch
P1 Input/Output port latch
P2 Input/Output port latch
P3 Input/Output port latch
PSW Program status word
SCON Serial port control
TCON Timer/Counter control
I-SEM. / M.E.(C&I)
2015-2016
0F0
0A8
0B8
80
90
0A0
0B0
0D0
98
88
Page 3
I-SEM. / M.E.(C&I)
2015-2016
PART - B
1. Draw the internal structure of the MC8051 and explain functional blocks. (June / July
2013) (Jan13,Jan 15)
2. State all the addressing modes of MC8051 and explain the corresponding mnemonic
through an example. (June 14 / July 2013)
3. Explain in detail the various modes of operation of timers with an application
program (Jan 14, Jan13)
4. Write detailed note on how serial communication is handled by 8051. (Jan13)
5. With neat diagram explain how interrupts are handled by 8051 with an application
example. (Jan13, Jan 15)
6. Discuss in detail about the instruction set of 8051. (Jan13)
7. Explain the data memory organization in 8051 in detail. (June12)
8. Explain the operation carried out when the following instructions are executed by
8051. (June12)
(i) MOV 33H, R0
(ii) MOV@R1, #80H
(iii)MOVX A,@R1
(iv) DJNZ R6, L1 where L1 is a Label
9. With neat diagram, describe the structure of parallel port P0 in 8051 in detail.
(June12)
10. Discuss the pin details of 8051.( June11)
DEPT. OF EIE-VALLIAMMAI ENGINEERING COLLEGE
Page 4
I-SEM. / M.E.(C&I)
2015-2016
UNIT II
8051 PROGRAMMING
PART A
1. Write a program to perform multiplication of 2 nos using 8051?(Jan 15)
MOV A,#data 1
MOV B,#data 2
MUL AB
MOV DPTR,#5000
MOV @DPTR,A(lower value)
INC DPTR
MOV A,B
MOVX@DPTR,A
2. Define RTOS? (June / July 2013) (Jan14)
A real-time operating system is an operating system intended to serve real-time
application requests. It must be able to process data as it comes in, typically without
buffering delays. Processing time requirements are measured in tenths of seconds or
shorter.
3. What are the interrupts used in 8051? (Jan14)
External interrupt 0
External interrupt 1
Timer interrupt 0
Timer Interrupt 1
Serial Interrupt
Receive interrupt : RI
Transmit interrupt: TI
SM0 - Serial port mode bit 0 is used for serial port mode selection.
SM1 - Serial port mode bit 1.
SM2 - Serial port mode 2 bit, also known as multiprocessor communication
enable bit. When set, it enables multiprocessor communication in mode 2 and 3,
and eventually mode 1. It should be cleared in mode 0.
REN - Reception Enable bit enables serial reception when set. When cleared,
serial reception is disabled.
Page 5
I-SEM. / M.E.(C&I)
2015-2016
TB8 - Transmitter bit 8. Since all registers are 8-bit wide, this bit solves the
problem of transmiting the 9th bit in modes 2 and 3. It is set to transmit a logic 1
in the 9th bit.
RB8 - Receiver bit 8 or the 9th bit received in modes 2 and 3. Cleared by
hardware if 9th bit received is a logic 0. Set by hardware if 9th bit received is a
logic 1.
TI - Transmit Interrupt flag is automatically set at the moment the last bit of one
byte is sent. It's a signal to the processor that the line is available for a new byte
transmite. It must be cleared from within the software.
RI - Receive Interrupt flag is automatically set upon one byte receive. It signals
that byte is received and should be read quickly prior to being replaced by a new
data. This bit is also cleared from within the software.
As seen, serial port mode is selected by combining the SM0 and SM2 bits:
S M0
S M1
MO DE
DE S C RI PT I O N
\ B A UD R AT E
8-bit UART
9-bit UART
9-bit UART
Page 6
I-SEM. / M.E.(C&I)
2015-2016
9. Define TASK.
Task is nothing but the operations performed by the operating system or applications
executed by the operating system.If more than one task can be running at one time ,
then the operating system is known as multitasking operating system. Each task is
given a short slice of the processors execution, which allows it to execute all or part
of its function before control is passed to the next task in line.
10. Write an 8051 assembly language to copy 10 bytes from RAM starting at 35H to
RAM starting at 60H. (NOV-2010)
ORG 0030H
MOV R0,#35H
MOV R1,#60H
MOV R2,#10
REPT:MOV A, @RO
MOV @R1,A
INC R0
INC R1
DJNZ R2,REPT
HERE:SJMP HERE
11. List the applications of microcontroller. [MAY/JUNE 2009]
Stepper motor interfacing
Length measurement
Square wave generator
Traffic light control.
12. Write a program using 8051 assembly language to change the data 55h stored in
the lower byte of the data pointer register to AAH using rotate instruction?
MOV DPL, #55H
MOV A, DPL
RL A
LABEL: SJMP Label
13. Explain the contents of the accumulator after the execution of the following
program segments?
MOV A,#3CH
MOV R4,#66H
ANL A,R4
A =3C; R4= 66; A 24
14. Write a program to mask the 0th&7th bit using 8051?
MOV A,#data
ANL A,#81
MOV DPTR,#4500
MOVX @DPTR,A
LOOP SJMP LOOP
Page 7
I-SEM. / M.E.(C&I)
2015-2016
Page 8
I-SEM. / M.E.(C&I)
2015-2016
PART B
1. (i)Write 8051 ALP to arrange ten 8-bit data in the internal RAM stored as an array
from the address 50H in descending order. ((June12)
(ii)Write an ALP for the conversion of analog signal into a digital value through
successive approximation technique.(June / July 2013)
2. Write 8051 ALP to generate a square wave of 400Hz in port pinP1.4 by using timer1
overflow interrupt. (June12)
3. (i) Write a program to bring in a byte of data serially one bit at a time via p1.0.
(Jan13)
(ii) Write a program t toggle the bits of P1, while creating a time delay of 200ms.
(Jan13)
(iii) Write a program to get a value from P1 and send the square of its value to P2
continuously. (Jan13)
4. Analyse the importance of the interface operations of RTOS lite along with its
explanation. (June12)
5. Design a task diagram for LCD digital clock/thermometer using Full RTOS and
explain it. (June12)
6. Explain in detail about RTOS with examples. (Jan 15/ July 2013)
7. Discuss in detail about applications of different RTOS for 8051 with necessary
diagrams. (Jan13)
8. i) Write an assembly language program to copy the value 55H into RAM memory
locations 40H to 45H using register indirect addressing with a loop.
ii) Assuming the clock pulse is fed into Pin T1. Write a program for counter 1 in
mode 2 to count the pulses and display the state of the TL 1 count on P2.
9. Explain the data transfer, data manipulation, control and I/O instructions.
10. Discuss in detail about Interrupt facility and its programming technique using RTOS.
Page 9
I-SEM. / M.E.(C&I)
2015-2016
UNIT - III
PIC MICROCONTROLLER
PART A
1. What is the difference between 8051 and PIC?(Jan15)
*8051 ia microcontroller which contains the microprocessor with integrated
peripherals like memory, serial ports, parallel ports, timer/counter, interrupt
controller, data acquisition interfaces like DC,DAC is called microcontroller
*PIC refers to Programmable Intelligent Computer. PIC is microprocessor lies inside
a personal computer but significantly simpler, smaller and cheaper. It can be used for
operating relays, measuring sensors etc.
2. What is I/O port of PIC? (Jan14)
I/O port is used to get and send the data from/to external devices.Some I/O pins have
multifunctions.
3. Write any four instructions of PIC microcontroller and state in a line the
operation performed. (Jan14)
MOVLW 25H
;
WREG=25
ADDLW 0X34
;
ADD 34H TO WREG
ADDLW
;
ADD 11H TO WREG
ADDLW
;
W=W+12H=7CH
4. What is RISC? (June14 / July 2013)
o RISC means Reduced Instruction set computer.
o Small set of frequently used instructions.
o Acess speed is high and low cost.
5. What are the groups of instruction set in PIC micro controller? (Jan13)
1. Bit oriented Instructions
2. Instructions using a literal value
3. Byte oriented instructions
4. Table read and write instructions
5. Control instructions using branch and call.
6. Using the instruction of PIC microcontroller, convert BCD to Hex. (Jan13)
MOVLW 0X54
ADDLW 0X87
DAA.
7. How is the internal RAM in PIC microcontroller accessed by indirect
addressing? (June12)
LFSR 0,0x30
LFSR 1, 0x40
8. What are the features of MP-LAB integrated development environment?
(June12)
Provides a new Call Graph for navigating complex code
Supports Multiple Configurations within your projects
DEPT. OF EIE-VALLIAMMAI ENGINEERING COLLEGE
Page 10
I-SEM. / M.E.(C&I)
2015-2016
Page 11
I-SEM. / M.E.(C&I)
2015-2016
PART B
1. Explain the architecture of PIC16F877 with necessary diagrams. (June12) (June /
July 2013) (Jan13)
2. With a neat diagram discuss in detail about memory organization of a PIC
microcontroller. ( Jan 15, Jan13)
3. What are the addressing modes of PIC microcontroller? (Jan 15, Jan13)
4. Design the PIC Timer Interrupts at the intervals: 0.0, 1ms, 1.5 ms,3.0 ms and this
shall be repeated as long as MC is switched ON.
5. List and explain the hardware features of timer 1 in PIC16F877 with neat diagram.
(June12)
6. Explain in detail the various functions of the PORTS in PIC microcontroller. (Jan13)
7. Write a program to write the data in memory and EPROM using PIC.
8. Create a pulse of a positive going pulse to RC2/CCP1 pin of PIC microcontroller.
Assuming osc = 4 MHz and that the pulse width is less than 65535us and longer than
300us using PIC.
9. Explain the instruction set of PIC microcontroller.
10. Discuss any one application of PIC in detail with necessary diagram.
Page 12
I-SEM. / M.E.(C&I)
2015-2016
UNIT IV
PERIPHERAL OF PIC MICROCONTROLLER
PART-A
1. What are the different capture modes available in the capture module of PIC
microcontroller? (June12)
Three modules are there. (i) CCP1
(ii) CCP2
(iii) CCP3
2. Write the function of the bits EEPGD and WRERR bits in the EECONI register
in PIC Microcontroller. (June12)
EEPGD-Flash Program or Data EEPROM Memory select bit
1=Access Program flash memory; 0= Access data EEPROM memory
WRERR Write Error Flag bit
1=Write operation is prematurely terminate; 0=the write operation is completed.
3. Calculate the resolution of 10bit ADC having Max. analog value +10.0 volts.
(June / July 2013)
Resolution of a converter determines the degree of accuracy in conversion. It is equal
to 1/2nso, 1/210=0.000976
4. What are the interrupts available in PIC? (Jan14)
Interrupt Source
External interrupt from
INT
TMR0 interrupt
RB4RB7 state change
EEPROM write complete
Enabled by
INTE = 1
Completion Status
INTF = 1
T0IE = 1
RBIE = 1
EEIE = 1
T0IF = 1
RBIF = 1
ADC
Display
Page 13
I-SEM. / M.E.(C&I)
2015-2016
Page 14
I-SEM. / M.E.(C&I)
2015-2016
PART B
1. Explain the interrupt structure of PIC16F877 indicating all the registers associated
with the interrupts. (June12)
2. Discuss the flash type ADC and its applications. Also explain how to interface it with
PIC.
3. Explain in detail how analog interfacing with PIC can be accomplished using the
digital I/O functions of PIC.(Jan15)
4. Discuss briefly how serial interfacing is accomplished in PIC. (Jan15)
5. With an application program explain in detail the compare, capture mode of the PIC
microcontroller with a neat circuit diagrams. (Jan13)
6. Discuss in detail about the following (i) Timers and (ii) Interrupt
(Jan13)
Page 15
I-SEM. / M.E.(C&I)
2015-2016
UNIT-V
SYSTEM DESIGN CASE STUDY
PART A
1. How can the LCD be tested whether it is ready or not to receive a command or
data? (June12)
The steps that has to be done for initializing the LCD display is given below and these
steps are common for almost all applications.
Send 38H to the 8 bit data line for initialization
Send 0FH for making LCD ON, cursor ON and cursor blinking ON.
Send 06H for incrementing cursor position.
Send 01H for clearing the display and return the cursor.
Sending data to the LCD.
The steps for sending data to the LCD module are given below. It is the logic state of
these pins that make the module to determine whether a given data input is a
command or data to be displayed.
Make R/W low.
Make RS=0 if data byte is a command and make RS=1 if the data byte is a data to
be displayed.
Place data byte on the data register.
Pulse E from high to low.
Repeat above steps for sending another data.
2. What is a data acquisition system? (June12) (Jan14)
Data acquisition is the process of sampling signals that measure real world physical
conditions and converting the resulting samples into digital numeric values that can be
manipulated by a computer. Data acquisition systems typically convert analog
waveforms into digital values.
3. What are the types of data acquisition system?
There are two types of data acquisition system (i) single and (ii) multichannel data
acquisition system
4. What are the advantages of microcontroller based control over conventional
control? (June / July 2013)
Speed is High
Hardware requirement is very less.
5. State the principle of measurement of Frequency using 8051 (Just the Block
diagram) (June / July 2013)
Page 16
I-SEM. / M.E.(C&I)
2015-2016
Page 17
I-SEM. / M.E.(C&I)
2015-2016
20. What is the angle through which a stepper motor will rotate for every output
Step pulse from the microcontroller?
The angle through which the stepper motor will rotate is known as the step angle. It
depends on the number op poles of the stepper motor.
PART-B
1. Interface a 4X4 hexadecimal keyboard with 8051 and write ALP program to find the
key number that is pressed in the keyboard and send the ASCII code of that key
number to parallel port2 of 8051. (June12) (June / July 2013) (Jan13)
2. With necessary diagram, explain the case study of generation of gating signals for a
single phase half controlled rectifier used to control speed of a DC Motor using any
one microcontroller. (June12)
DEPT. OF EIE-VALLIAMMAI ENGINEERING COLLEGE
Page 18
I-SEM. / M.E.(C&I)
2015-2016
3. Draw the circuitry to interface motor with a microcontroller for controlling its speed
and write the program. (Jan13)
4. Write a program for a microcontroller case study to generate control signals for a
converter circuit. (Jan13)
5. Explain the case study for controlling of AC and DC appliances using
microcontroller. (Jan 2014)
6. With neat diagram explain case study in detail how 8051 microcontroller can be
interfaced with Liquid Crystal Display. (Jan15)
7. Explain the case study how the gate signals (assume the switch is SCR or MOSFET)
to half bridge single phase converter are generated.
8. Draw and discuss a case study scheme for microcontroller based multichannel data
acquisition system.
9. (i).Explain the step mode operation of stepper motors with a control strategy.
(ii) Draw and explain the case study of PWM generation using a PIC Microcontroller
10. Discuss the case study how PIC microcontroller can control motors. Provide the basic
circuitry for doing so.
Page 19