ELTR 363 Microcontroller Controller PDF
ELTR 363 Microcontroller Controller PDF
3rd Year
و ا
300/-
DAE Electronics.
B-Tech Honours in Electronics & Communication.
Electrical Engineering from UMT.
MS Electrical Engineering from LUMS...
Contact: 0333-4296968
ELTR-363 ( Microcontroller Programming and Applications ) By Amir Amin 0333_4296968
Chapter 1
Microcontroller Basics
( )
Microprocessor
( Microcontroller )
CPU
( RAM, ROM, EPROM )
( Watch dog Timer, A/D, D/A )
I/O ROM RAM *
I/O ROM RAM *
( Microprocessor )
CPU
I/O ROM RAM
Microprocessor Microcontroller
I/O
K
4 G Bytes
Bytes
128 32,64
16 4, 8
1 G Hz
10-20 MHz
Short Questions
(c)
( )
CPU ( )
(b)
( )
( ) ( )
( )
(b)
( ) I/O ( ) ROM ( ) RAM ( )
(d)
BA ( ) 64
( ) 16
( ) 8
( )
(b)
............
( )
( )
(a) .........
CISC ( ) RISC ( )
(b)
False ( ) True ( )
(a)
I/O ROM RAM
False ( ) True ( )
Short Questions
/ /
IIA-2013 / IIA-2015 / IIA-2016
( Assembler, Compiler or Interpreter )
Short Questions
IA_2013 / IA_2015
IA_2013 / IIA-2016
1.4 Discuss the Use of Flow Chart in Programming
( Flow Chart )
Decision
( Terminal )
( Ovel )
( Input Output )
Input/ Output ( Parallogram )
Input / Output
( Process )
( Rectangle )
MS Electrical from LUMS 5
ELTR-363 ( Microcontroller Programming and Applications ) By Amir Amin 0333_4296968
( Sub-Programe )
( Double line Rectangle )
Double line Rectangle
( Decision )
Decision ( Diamond )
( Connector )
( Circle with Arrow Head Line )
Connenter
Short Questions
/ /
IA_2013/ IIA_2014/ IA_2015 / IIA_2015 / IA-2016 / IIA-2016
Flow Line
Connector
MCQ's
(d)
............
( ) ( ) ( ) ( )
(a)
...........
( ) ( )
( ) ( )
(c) ...........
( ) ( )
( ) ( )
(a)
( ) ( )
( ) ( )
(b)
( ) ( )
( ) ( )
(c )
( ) ( )
( ) ( )
(d)
( ) ( )
( ) ( )
(c)
( ) Decision ( )
( ) ( )
(a)
( ) Decision ( )
( ) ( )
(b)
( ) Decision ( )
( ) ( )
Ovel
Process
Decision
Decision
Decision
Ovel
IIA_2015
CISC ( Complex Instruction Set Computer )
criteria
avalibility
resources
I/O ROM RAM
Embadded
CPU
I/O ROM RAM
4 G Bytes
128 32,64
1 G Hz
Limitation
I/O ROM RAM
( ) Bulkier
I/O ROM RAM
versatility
Microprocessor Microcontroller
4 G Bytes
K Bytes
1.2 Discuss the Uses of Microcontroller in Industry
embadded
/ /
IIA-2013 / IIA-2015 / IIA-2016
PC
1.3 Describe the Need of Programming Microcontroller
IA_2013 / IA_2015
IA_2013 / IIA-2016
( Assembler, Compiler or Interpreter )
1.4 Discuss the Use of Flow Chart in Programming
/ /
IA_2013/ IIA_2014/ IA_2015 / IIA_2015 / IA-2016 / IIA-2016
IIA_2013 / 1A_2014 /
event
Algorithm
event event
explore
IA_2015
Decision
Terminal
( Ovel )
Input/Output
Input/ Output ( Parallogram )
Input / Output
Process
( Rectangle )
Subroutione
( Double line Rectangle )
Double line Rectangle
1A_2014
( Diamond )
Flow Line
( Arrow Head Line )
Connector
( Circle with Arrow Head Line )
Chapter 2
Microcontroller Architecture
( )
economical
CPU
I/O Ports ROM RAM
8bit 8051
16
Address Bus
Data Bus
RAM 128 Byte 4 K
read only
34
( SFR )
16 Bit ALU
Dual purpose I/O 8 Bit
external internal
Short Questions
(c) RAM8051
256 ( ) 128 ( ) 64 ( ) 32 ( )
(c ) 8051
18
( ) 16
( ) 12
( ) 8
( )
(c)
8051
64 ( ) 32 ( ) 16 ( ) 8 ( )
(b)
3 ( ) 4 ( ) 2 ( ) 1 ( )
(a)
( ) M Bytes ( ) G Bytes ( ) K Bytes ( )
(b)
( ) M Bytes ( ) G Bytes ( ) K Bytes ( )
(c)
( ) G Hz ( ) M Hz ( ) K Hz ( )
(b)
( ) G Hz ( ) M Hz ( ) K Hz ( )
Short Questions
disable
BitsSFRs
0
1
repeat
Essential Elements of a Microcontroller
( ROM ) ( RAM )
( SFR ) ( EEPROM )
( CPU )
Short Questions
IA_2013/ IIA_2014 / IIA-2016
2.2 Discuss Operation of each Block
ROM
ROM Input/Output
Built- InROM
Input/Output
64 K Bytes512 Bytes
ROM
( Electrically Erasable Programable Read Only Memory )
RAM
*
1
Jump subrutines
*
( Central Processing Unit )
monitor
( Instruction Decoder )
CPU
( Arithmetic Logic Uint )
Subtraction Addition CPU
Division Multiplication
( Accumulator )
8
CPU
Operand
ALU
( Oscillator )
Timer/Counter
T1 T0 8051
( Watch Dog Timer )
RC
CPU RST
CPU
Stuck
CPU
stuck
( Power Supply Control )
Brown Out
built-in
( MCLR ) Master Clear Reset Reset Pin
Brown Out
( Serial Communication Unit )
input/output
( A/D Analog to Digital Converter )
" 0-1 "
A/D
Short Questions
1A_2014 168051
IA_2013 / IIA-2016
/
/
/
IA_2013 / 1A_2014/ IIA_2014 / IIA_2015 / IA-2016
IA-2016
8051
PC
IA-2016 TCONTMOD
IA-2016 TMOD
IA_2015
Sub-Units CPU
IA_2013/ IIA_2014 / IIA-2016 ALU
IA_2013 / IIA-2013 / IIA-2015 /
/
1A_2014
A
IIA-2013 B
1A_2014
8
IA-2016
8
1A_2014 / IIA_2015 PSW
IA-2016
8051
PSW
Bit-1
PSW
( OV Over Flow )
PSW
IA-2016
( RS0, RS1 )
PSW
Flag 0
PSW
( AC- Auxiliary Carry )
PSW
( CY- Carry Flag )
PSW
IIA_2014 DPTR
( DPTR-Data Poiter Register )
IIA-2013 / 1A_2014 / IIA_2015
/ /
IA_2013
IIA-2013
IIA-2013
IA-2016
( BUS )
( Data Bus )
Data Bus
Bits
*
( Address Bus )
Address Bus
*
16 Bit
Bits
*
*
( Controlling Bus )
Controlling Bus
acknoledgements of Bus request
Short Questions
IIA-2013 / IA-2016
/
1A_2014
IA_2013/ IIA_2014/ IA_2015
RAM8051
128
RAM 8051
128
128
0x7F0x00
save
4
Lowest 32 RAM
recover
Stack PUSH, POP
IIA_2014
RAM
RAM
Dynamic RAM Static RAM
IA-2016
1A_2014
24
24 x 1024 = 24576 Bytes
IA-2016
20
20 x 1024 = 24480 Bytes
8051
A (accumulator), B, R0, R1, R2, R3, R4, R5, R6, R7, DPTR (data pointer) and PC (Program counter)
IA-2016
GND Vcc
20GND 40Vcc
IA-2016
8051
98051
IA-2016
INT-1 8051
INT-1 13 8051
( ROM ) ( RAM )
( SFR ) ( EEPROM )
( CPU )
IA_2013/ IIA_2014 / IIA-2016
( RAM, ROM, EPROM ) CPU
( Timers/Counters, )
2.2 Discuss Operation of each Block
" 1F H "" 00 H "32 ByteRAM
Read / Write
Read /
" 20 H " " 2F H " 16 Byte RAM
Write
80 Byte Read / Write RAM
" 7F H "" 30 H "
8051 *
RAM
immediate
RAM
KBs
IA_2015 / IIA_2015
/
8051
IA_2013 / IA_2015
individual
8051
2FH20H
16 bytes 8051
ROM
ROM
ROM
ROM
Buit -in
IIA_2015 ROM
user
ROM
MROM
IIA-2016
8051
64 K Byte
4 K byte
8051
IA_2015
8051
FFFFH ROM 0FFFH
ROM8051
IA_2015 / IIA_2015 ROM
ROM /
ROM
ROM
ROM
ROM
ROM
ROM Input/Output
Buit-In
Built- In ROM
Input/Output
64 K Bytes512 Bytes
ROM
Limitation EEPROM
RAM
1A_2014 168051
168051
PC (Program counter) DPTR (data pointer)
IA_2013 / IIA-2016
RAM
/
/
/
IA_2013 / 1A_2014/ IIA_2014 / IIA_2015 / IA-2016
Engine
1
Jump subrutines
IA-2016
8051
" 0000 "
8051
PC
ROM
CPU
" FFFF H " " 0000 H " 16 Bit 8051
64 K
" 000C H " " 0000 H "
CPU8051
ROM
ROM
IA-2016 TCONTMOD
" 8 bits "TCON TMOD8051
IA-2016 TMOD
Timer-0
4
TMOD
Timer/counter
Timer-1
4
IA_2015
monitor
Sub-Units CPU
monitor
CPU
IA_2013/ IIA_2014 / IIA-2016 ALU
CPU
Division Multiplication Subtraction Addition
1A_2014
8
255
8
( 1 1 1 1 1 1 1 1 ) 2= ( 255 ) 10
IA-2016 8
8 FF
1A_2014 / IIA_2015 PSW
( Programe Status Word Register ) PSW
IA-2016
8051
PSW
( Programe Status Word Register )
8
bits
PSW
( Parity Bit )
" 1's "
odd "1's"
0
even "1's"
1
Bit-1
PSW
versions
unused Bit-1
( OV Over Flow )
PSW
( OV Over Flow )
Flag 0
PSW
Flag 0
( AC- Auxiliary Carry )
PSW
( AC- Auxiliary Carry )
BCD
( CY- Carry Flag )
PSW
( CY- Carry Flag )
IIA_2014 DPTR
" Data Poiter Register " DPTR
( DPTR-Data Poiter Register )
( DPTR-Data Poiter Register )
8 Bits
( ) DPL
DPH
independent
16
external
immediate
1
7 RAM
7
IA_2013
ALU
IIA-2013
CF=0
CF=1
IIA-2013
I/O
8 Bit RAM8051
I/O 8051
Port_0 at 80H Port_1 at 90H Port_2 at A0H Port_3 at B0H
IA-2016
TMOD, TCON, Accumulator, PSW
8051
IA-2016
8051
8051
1A_2014 8051
8051
8
I/O
Input/Output
useful
Input/Output
Output Input 8051
" 0 "
" 1 "
IA-2016 8051
8051
12 MHz
events
IA-2016
8051
Timer_1 Timer-0
2
8051
8051
Timer/Counter
T1 T0 8051
RC
CPU RST
CPU
Stuck
CPU
stuck
Brown Out
built-in
1A_2014 UART
" Universal Asynchronous Receiver & Transmitter " UART
input/output
IA-2016
bit by bit
A/D
" 0-1 "
A/D
2.3 Discuss Buses in Microcontroller
IIA-2013 / IA-2016 /
( Data Bus )
( Address Bus )
Address Bus
*
16 Bit
Bits
*
*
1A_2014
IA_2013/ IIA_2014/ IA_2015
Controlling Bus
acknoledgements of Bus request
Chapter 3
Instruction Set
)
(
8051
Branch Instructions Arithmetic Instructions
Logic Instructions Data Transfer Instructions
Bit-oriented Instructions
Short Questions
8051
Short Questions
Short Questions
1A_2014
ANL direct, A
/
syntex
/
1A_2014 / 1A_2015 / IIA_2015
8051
execute
Short Questions
Branch Instruction
8051
Subrutine
Short Questions
Bit
8051
Bit-oriented Instructions
Short Questions
PUSH
PUSH A
POP
POP A
1A_2014
" MOV R2, DPTR "
R2
16
DPTR
" MOV R2, DPTR "
8
16
8
IA-2016 invalidMOV R1 DPTR
8
16 invalid
8
R1
16
DPTR
Logic Instruction
ANL direct, A
ORL direct, A
XRL direct, A
CLR A
execute
MOV A, # 88 H
ADD A, # 93 H
IIA-2013 INC
INC ' 1 '
8051
INC A
INC A
Branch Instruction
8051
ROM
4K
128
4
ROM 64 K
IIA-2016
8051
MCS-51
8051 Interl
8031 8052
80318051
ROM Less 8051
8031
ROM ROM
64 K
ROM
8051
IIA-2016 80528051
8052
RAM256
3
standard 8051
ROM
8 K
8052
8051
8031
RAM128
2
ROM
64 K
ROM
2
I/O
Chapter 4
Memory Interface
( )
8051
( Program Memory )
8051
8051
8051
4K
60 K
64K
8051
Vcc ( EA )
4K
( EA )
( Data Memory )
Memory Interface
access
RD/WR
RAM 256 Byte 8051
RAM
8051 RAM
14
" 0 " ( A13-A0 ) 16K x 8
OR ( P2.7-P2.6 ) ( P2.5-P2.5 ) " 2 " ( P0.7-P0.0 )
" 2 "
RAM
LOWA15 A14
3FFFH0000H
0FFFH0000H
Short Questions
IIA_2015
IA_2015
IA_2013
IIA_2015
IA_2013
IIA_2015
define
Memory Interface
Chapter 5
Addressing Mode
)
(
Direct Addressing Mode Immediate Addressing Mode
Register Indirect Addressing Mode Register Direct Addressing Mode
Index Addressing Mode
Short Questions
IIA-2016
IA_2013/ IIA_2014
IA-2016
Immediate Addressing Mode
Immediate
MOV A,#20h
20h
8
Immediate
Immediate
Short Questions
Direct
MOV A,30h
30h
Direct
Direct
Immediate
Immediate
Short Questions
IIA-2016 MOV A, 30H
00h-7Fh
80h-FFh
IA-2016
Register Direct Addressing Mode
Register Direct
MOV A, R4
R4
Register Direct
2Fh
2FhR4
Short Questions
Indirect
MOV A,@R0
R0
Indirect
67h
40hR0
67h
SFR Indirect
RAM
Short Questions
IA_2013
IA-2016
Index Addressing Mode
PC DPTR
Index
MOVC A, @A+DPTR
MOVC A, @A+PC
01FEh DPTR02h
Index
0200h
Short Questions
IIA-2013 Indexed
Direct
MOV A,30h
30h
Direct
IIA-2016 MOV A, 30H
Direct Addressing Mode
Direct
Immediate
Immediate
00h-7Fh
80h-FFh
RAM 00h-7Fh
SFR80h-FFh
IA-2016
Direct Addressing Mode
Register Direct Addressing Mode
R4
2Fh
2FhR4
Indirect Addressing Mode
Indirect
MOV A,@R0
R0
Indirect
67h
40hR0
67h
IA_2013
Indirect
MOV A,@R0
MOV A,@R1
IA-2016
dynamic static
Index Addressing Mode
MOVC B, @A+PC
01FEh DPTR02h
Index
B0200h
Chapter 6
Assembly Language
( )
Assembly Language
Syntax Rules Words
( Comments )
( Directives ) ( Orders ) ( Labels )
follow
syntax
255
" ; "
TAB Key
( Numbers )
( Decimal Numbers )
2 Bytes 16
65535
2 Bytes
1234 D " D "
( Hexadecimal Numbers )
16
65535FFFF
1234 h
" h "
( Binary Numbers )
" 11111111 11111111 "
" 1 " " 0 "
10111011 b " b "
( Operators )
mathematical
Logical mathematical
( Symbols )
assign
Stop
P0.3
assign P0.3
" pushbutton_STOP "
( " ? " and " _ " )( 0-9 ) ( A-Z , a-z )
case sensitive
( Label )
" : "
*
*
( Directives )
loader linker assembler
pseudo-operations
directives
pseudo-opertions
EQU Directive
EQU
99 " MAXIMUM "
SET Directive
EQU
SET
SET
BIT Directive
CODE Directive
replace
CODE
0-65535 64K
DATA Directive
IDATA Directive
assign
IDATA
XDATA Directive
RAM XDATA
65535
ORG Directive
ORG
1024 100
1000h
USING Directive
USING
END Directive
END
END
5 5
ELSE
ENDIF IF
ENDIFELSE
IF
ELSE
IF
ELSE" 0 "
" 1 " Model
$
compilation
execuitable
Listing
compiled
Short Questions
IIA-2013
IIA_2014
IIA_2014 / IA_2015 / /
IIA-2013
IA_2013 / IA-2016
Draw
" Obj " " asm "
IIA-2013 / IIA-2016
/
IIA-2013/ IIA_2014 / IA_2015 / IIA_2015 Operand /
IA_2013/ IIA_2014/ IA_2015 /
IA_2013 / IIA-2016
/
IIA-2013
IIA-2016 syntex
IIA_2015 syntex
2
IIA_2015
BCD
IA_2013/ IIA_2014 Packed BCD
IIA-2013 Unvalid
IIA-2016
case sensitive
IA_2013 / IIA-2013
/
IIA-2015
pseudo-opertions
EQU Directive
EQU
ORG
IIA_2014 Set Directive / SET Directive
BIT Directive
CODE Directive
Data 8051
IDATA Directive
IIA-2013
debug
reliability
maintain
IIA_2014
Data Structure
array, file, record , table and tree
IIA_2014 / IA_2015 / /
IIA-2013
Careful Thinking of Problem
Develop the Algorithm ( Sequence of steps to perform the required task )
Find the right instruction Draw the flow chart
Write Down the programe using the instructions
Test and debugs the programe
IA_2013 / IA-2016
Draw
" Obj " " asm "
DOS EDIT " asm "
" obj " " asm "
" 1st "
" obj " " asm "
syntex
( Comments ) ( Directives ) ( Orders ) ( Labels )
IIA-2013 / IIA-2016
/
IIA-2013/ IIA_2014 / IA_2015 / IIA_2015 Operand /
IA_2013/ IIA_2014/ IA_2015 /
*
() *
*
2
65535
2 Bytes
16
65535FFFF
1234 h
" h "
" 11111111 11111111 "
" 1 " " 0 "
10111011 b " b "
IIA_2015
BCD
Packed BCD Code
Logical mathematical
" A or DPTR "
" : "
*
pseudo-opertions
pseudo-opertions
EQU Directive
EQU
99 " MAXIMUM "
EQU
EQU
EQU
ORG
ORG Directive
1024 100
1000h
BIT Directive
0-255
replace BIT
CODE Directive
replace
CODE
0-65535 64K
Data 8051
DATA Directive ( DB )
IDATA Directive
assign
IDATA
END
5 5
IF, ENDIF and ELSE Directives
ELSE
ENDIF IF
ENDIFELSE
IF
ELSE
IF
ELSE" 0 "
" 1 " Model
$
compilation
execuitable
Listing
compiled
IA_2013/ IIA_2014 /
Fortran, Java, C, C++, Visual Basic, Python, COBOL
IA_2013
Chapter 7
Program Development
(
)
Programe Loops
Loop
repete
Do/While Loop Wlhile Loop For Loop
( For Loop )
" For Loop "
for ( [ expression1 ]; [ expression2 ]; [ expression3 ] )
expression
evaluate expression
expression
expression
expression
( Wlhile Loop )
while
while
Do / While Loop
Do/while
For while
Short Questions
Subroutine
reliable
Limitations
LIFO
Nested Subroutine
Nested
Short Questions
/
/
IIA-2013 / 1A_2014 / 1A_2015 / IIA-2016
Nested Subroutine
1A_2014 / IIA_2015
/
1A_2015 / accessed 8051
IA_2015 CALL
StackCall
IA_2013/ IIA_2014 / IIA_2015
/
" L CALL "
" LJMP "" SJMP "
A CALL L CALL
Function of Timer
events
Timer/Counter
T1 T0 8051
Timer T0
TH0 × 256 + TL0 = T
3 × 256 + 232 = 1000
65535
16
T0
Short Questions
embadded
event
Toggle
Short Questions
Programe Development
Dvelopment
Debugger / Simulator Compiler Assembler Editor
( Editor )
RAM ASCII
Alert
Source Save
( Assembler )
( . hex )
Absolute
sequence
( Compiler )
" C "
Debugging Flexibility
( Debugger / Simulator )
PC
Short Questions
IIA_2015 / IIA-2016
/
IIA-2016
1A_2014/ IIA_2014 / IIA-2016 / /
expression
evaluate expression
expression
expression
expression
While
while
while
FOR while
/
/
" Call "
Nested Subroutine
Nested
CPU
RAM 07 SP
8051 SP
FF 00 8 Bit
08
POP
PUSH
Pushing The date on the Stack
PUSH
8051
SP
Poping The date from the Stack
SP
POP 8051
2F20 1F088051
SP
24 Bytes
“ MOV SP, # X X ”.
3 LJMP
A CALL L CALL
L CALL
3 Byte
Subroutines
RAM
64 K 8051 " L CALL "
Absolute A CALL
11
2
2 K Bytes
2
64 K
L CALL
2 K A CALL
ROM
A CALL L CALL
Function of Timer
2550
TH0TL0
Timer/Counter
TH0 × 256 + TL0 = T
3 × 256 + 232 = 1000
65535
16
T0
IA_2013 / IIA-2013/ IIA_2014 Capture /capture
deal
embadded
embadded
Describe Input Capture
1A_2014 / IIA_2015 / IIA-2016 /
/ Capture
deal embadded
event
IIA_2015
edge
edge
Describe Output Compare/Capture
embadded
event
Toggle
Programe Development
IIA_2015 / IIA-2016
/
Dvelopment
Debugger / Simulator Compiler Assembler Editor
RAM ASCII
Alert
Source Save
( . hex )
Absolute
sequence
IIA-2016
" C "
Chapter 8
Application
( )
Interrupt
ISR
event
asynchronous events
ISR deal
routine
driven
external internal
Short Questions
event
( ) Debugging ( ) ( )
( )
events ................
( ) B A ( ) ( ) ( )
Types of Interrupt
( Maskable Interrupt )
execute
( Non Maskable Interrupt )
execute
events
58051
EA disable enable
IE
8051
disable
IT1IT0
" 1 " TCON INT1INT0
TCON
" 0 " IT1 IT0
LOW
( IE ) 8051
8
8051
( Interrupt Priorities )
8051
Reset
disable
Interrupt Priority 1
Interrupt Priority 1
Interrupt Priority 0
( Interrupt Priority Register )
specify
8
8051
stop
INT0
Timer 0
INT1
Timer 1
( Interrupt Handling )
PUSH
5
Short Questions
8051 /
8051 /
8051
1A_2014 / IIA_2014 / IIA-2016
IA-2016 8051
disable enable
8051
IIA_2014 IE
1A_2015 IE
( IE )
8051
1A_2014 / IIA_2015
/
8051
IIA_2015 / IA-2016 /
( Interrupt Handling )
IA-2016 8051 priority
priority8051
IIA_2014
execute
execute
IIA_2014 /
INTR
IA_2015
8051
INT1 INT0
INT
execute
8051 Microcontroller Interrupts
events
58051
8051 /
8051 /
8051
1A_2014 / IIA_2014 / IIA-2016
events
58051
IA-2016 8051
6
58051
disable enable
8051
disable enable IE
8051
disable EA
8
8051
IA-2016
8051 priority
priority8051
priority 8051
priority
priority 8051
Chapter 9
( )
Useful
( Power Supply )
5 V
5 V
DC
IC
LM 7805 DC
5V
DC
( Reset Signal )
RS
Stuck
RS
RS
( Clock Signal )
Built-In
Determine
( Switches & Buttons )
sense
( Relay )
Darlington Pair
( LED Display )
LED LEDs
LED
LED
LED
4 Bit LCD 8 Bit LCD
Initialization
LCD
LED
LED
GPIO input/output
Short Questions
GPIO input/output
GPIO
GPIO
Short Questions
IA_2013
IIA_2015 ADC
IIA-2016
IIA_2015 PWM
IIA_2015
IA_2015
IIA_2015 USART
IIA-2016 UART
IA-2016
sense
LED LEDs
LED
LED
LED
LED
LED
LED
IIA-2015 LED
LED
PN
IIA-2013 LED
per lumen
4 Bit LCD 8 Bit LCD
Initialization
LCD
LCD
D7D0 8 Bit LCD
*
4 Bit LCD
*
embaded
A/D
IA_2013
D/A
IIA_2015 ADC
ADC
ADC
IIA-2016
PIT
embadded
PIT
Heater
Air Conditioner
IIA_2015 PWM
" Pulse Width Modulation" PWM
CPU
IIA_2015
IA_2015
rules
UART
SPI ( Serial Peripheral Interface ) IIC
IIA_2015 USART
Chapter 10
Digital Interfacing
( )
Power Consumption weight
Avalibility Relialability
( Digital Interface )
On/Off
( Synchronous )
Ethernet RS 232 / RS 485 1 Wire
( Asynchronous )
4-Wire ( SPI, Microwire ) 2- Wire ( 12C )
On/Off
I/O
On/Off
LDE
On/Off
32 Bit 16 Bit 8 Bit 4 Bit
LCD
Short Questions
( Asynchronour )
IIC ( Inter Integrated Circuit Bus )
2
SCL SDA
*
*
4
CS ( Chip Select ) CLOCK DATA OUT DATA IN
Slave Master
SPI
Full Duplex
( Synchronour )
1 Wire
Dallas
pair carry
RS 232
RS 485
Ethernet
Short Questions
LDE
On/Off
( Synchronour ) ( Asynchronour )
4-Wire ( SPI, Microwire ) 2- Wire ( 12C )
2- Wire ( 12C )
2
SCL SDA
CS ( Chip Select ) CLOCK
DATA OUT DATA IN
Slave Master
SPI
Full Duplex
IIA_2014
Slave Master
Ethernet RS 232 / RS 485 1 Wire
1 Wire
Dallas
pair carry
1 Wire
RS 485
Ethernet
IA_2015
CSMA/CD
carrier sense multiple access/ collision dection CSMA/CD
Chapter 11
Industrial Control
)
(
Real World
A/D
Useful
Data Acquistion and Control
ADC
ADC 8051
A/D
D/A
Short Questions
IIA-2013
Chapter 12
Microcontroller System
Application
( )
( Angular Speed Measurement )
RPM
BCD PORT 1
( DC Motor Speed Control ) PWM
PWM
MOSFET
PWM
MOSFET
MOSFET
MOSFET
MOSFET
AC TRIAC
AC
AC AC
Load
AC
LED
LED
LED
AC
LED
TRIAC
AC
TRIAC
Short Questions
1A_2014
IIA_2015
ELTR_343
( Third year )
MICROCONTROLLER
PART_A
Past Papers
DAE/IA_2013
(a) Mass storage device (b) Modem (c) Printer (d) Input & Output devices
(a) 240 bit (b) 210 bit (c) 230 bit (d) 260 bit
(a) 210 bytes (b) 256 bytes (c) 32 bytes (d) 64 bytes
(a) Machine code (b) Source code (c) Pseudo code (d) Syntax code
10. The ASCII code for "A" is: ASCII A (a)
(a) Parallel interface (b) Serial interface (c) Printer interface (d) Modem interface
(a) Program code (b) Program execution (c) Program reading (d) Program compiling
(a) Uni-directional (b) Bi-directional (c) Any direction (d) Non direction
16. In 8051 micro controller pins used for crystal oscillator:
(d)
(a) General purpose (b) Specific purpose (c) Multi purpose (d) No purpose
DAE/IIA_2013
(a) Flow chart (b) Data (c) Program (d) Operation code
8051
(b)
5. In 8051 microcontroller internal memory space range is: 8051 (a)
7. If 8051 micro controller is operating form 12 MHz clock then machine cycle takes:
(b)
(a) MOV (b) Push & Pop (c) ANL (d) ORL
(a) Sub routine (b) Decision (c) Process (d) Input output
13. Information stored and transmitted inside computer is:
(a)
(a) Binary form (b) ASCII code (c) Decimal form (d) Octal form
14. In 8051 micro controller chip which pin is used for supply voltage:
8051 (b)
15. The program that deals with interrupt is called:
( d )
(a) Linker (b) Base level (c) Interrupt level (d) Interrupt service routine
17. The istruction that move data within internal memory is called:
(b)
(I/O's)
8051
(b)
20. In 8051 micro controller port 2 consists of: 28051 (b)
(a) 1-8 pins (b) 21-28 pins (c) 10-17 pins (d) 29-37 pins
DAE/IA_2014
Push
(d)
9. TF0 and TF1 are part of register____: TF1 TF0 (c)
13. How many pins are there for each I/O port in 8051: I/O
8051 (c)
15. Which pin is provided Vcc in the 8051: Vcc8051 (d)
16. What value in decimal is equivalent to Hexa value FFH: FFH
(b)
17. How many pins are assigned for I/O ports in 8051:
I/O
8051 (c)
20. How many register bank are there in the 8051 8051
(a)
(a) General function (b) Critical function (c) Specific function (d) None of these
(a) Embaded system (b) PLC's (c) Process control (d) None of these
6. TMOD is:
TMOD (a)
(a) 8 bit register (b) 16 bit register (c) 8 bit counter (d) 16 bit counter
(a) Specific instruction set (b) Insturction set (c) Own programe (d) Both a & c
(a) Logic instruction (b) Arithmetic instruction (c) Branch instruction (d) None of these
(a) Access time (b) Size (c) Time (d) None of these
(a) Data item (b) Commands (c) Data (d) None of these
18. Machine language is: (b)
(a) High level (b) Low level (c) Mid level (d) None of these
(a) Machine (b) Software program (c) Main program (d) None of these
(a) Binary input unit (b) Bus interface unit (c) BUS input unit (d) None of these
(a) Register to register (b) Register to memory (c) Both a & b (d) None of these
9. The interrupts 20H to 3FH called _____ interrupt routines: ____ 20H to 3FH
(b)
(a) MHz (b) Clock frequency (c) Time period (d) Binry numbers
20. How many register bank are there in the 8051 8051
(a)
(a) Connector (b) Flow line (c) terminal (d) None of these
(a) Simple flow chart (b) Flow chart consisting of more than one pages
(a) 132 bytes (b) 64 bytes (c) 128 bytes (d) 256 bytes
(a) Infinite loop (b) For loop (c) While loop (d) Do while do loop
(a) Store data in accumulator (b) Store data in stack (c) Store data in PC (d) None of these
(a) Speed control system (b) Inverters (c) Power suplies (d) All of these
(a) 8 bit register (b) 16 bit register (c) 8 bit register (d) None of these
DAE/IA_2016
(a) 240 bytes (b) 230 bytes (c) 220 bytes (d) 210 bytes
CPU
CPU (a)
(a) Data bus (b) Control bus (c) Address bus (d) Both a & b
( b )
SPPOP
(a) 1 (b) 2 (c) 3 (d) 4
pull up
I/O 8051 (d)
13. What is the location of bytes of RAM which are bit addressable:
(c)
15. Which pins are used for crystal oscillator in the 8051:
8051
(a)
16. TF0 & TF1 are part of register: TF1 TF0 (d)
18. How many pins in 8051 are used for I/O port pins I/O 8051
(d)
(b)
(a) Pseudo instruction (b) Instruction mnemonics (c) Assembler directive (d) None of these
(a) Read/Write memory (b) Read only memory (c) Non volatile memory (d) Only write memory
6.
In 8051 microcontroller on chip crystal oscillator frequency
8051
(a)
(a) Parallel interface (b) RS-232 interface (c) Printer interface (d) Modern interface
13. The 8-bit binary number ( 0000 0100 ) represent: ( 0000 0100 )
(c)
15. In 8051 which pin is used for Vcc: Vcc 8051 (d)
(a) 1-8 pins (b) 21-28 pins (c) 10-17 pins (d) 29-37 pins
(a) MOV (b) Push & Pop (c) ANL (d) INC
ELTR_343
( Third year )
MICROCONTROLLER
PART_B
Past Papers
DAE/IA_2013
2(a)
2(b)
3(a)
3(a)
immediate 4(a)
4(a)
5(a)
ADC0804
8051
6
DAE/IIA_2013
(5)
2(a)
(5)
2(b)
(5)
3(a)
(5)
4(a)
DAE/IA_2014
( 10 )
2
(5)
Buses (b)
(5)
11.0592 Hz 8051 (b)
( 10 )
6
DAE/IIA_2014
( 10 )
( 2 )
(5) (a)
( 3 )
(5)
(b)
(5)
(b)
( 10 )
( 5 )
( 10 )
( 6 )
DAE/IA_2015
( 10 )
( 2 )
( 10 )
( 3 )
( 5+5 )
( 4 )
( 10 )
PWM ( 6 )
DAE/IIA_2015
Q.2 (a) Describe the need of programming microcontroller.
(b) Discuss the characteristics of micorcontroller.
Q.3 Explain the Instruction set of 8051 microcontroller with the help of example.
8051
Q.4 Write a note of the following
(1) Data Transfer Instruction (2) Bit Orinted Instructions
Q.5 What do you mean by interrupts and explain its types.
Q.6 Describe the classification of Peripherals devices.
DAE/IA_2016
Q.2 Draw the block diagram of 8051 microcontroller and explain it.
8051 (10)
(10)
DAE/IIA_2016
Q.2 Draw the block diagram of 8051 microcontroller and explain its each block.
8051
Q.3 (a) Describe the need of programming in microcontroller.
(b) Describe the different symbols used in flow chart.
Q.4 (a) Describe the different types of interrupt.
MS Electrical from LUMS 144
ELTR-363 ( Microcontroller Programming and Applications ) By Amir Amin 0333_4296968
Q.5 (a) Write a program to copy the value 55H into RAM memory location 40H using direct addressing
45H 55H
(b) Find the timer's clock frequency and its time period for 8051 based system, with the 16MHz crystal
frequency.
16 MHz
8051
Q.6 Draw and explain the AC phase control circuit using microcontroller based Triac.
AC
DAE/IA_2017
Q.2 Explain in detail communication unit.
Q.3 Write note on the following.
(a) Logic Instruction (b) Data transfer instruction
DAE Electronics.
B-Tech Honours in Electronics & Communication.
Electrical Engineering from UMT.
MS Electrical Engineering from LUMS...
Contact: 0333-4296968
Our Publication are