T.Y. Diploma : Sem. V [EJ/EN/ET/EX/DE/IS/IC/IE/EV/MU] Micro-controller

Size: px
Start display at page:

Download "T.Y. Diploma : Sem. V [EJ/EN/ET/EX/DE/IS/IC/IE/EV/MU] Micro-controller"

Transcription

1 T.Y. Diploma : Sem. V [EJ/EN/ET/EX/DE/IS/IC/IE/EV/MU] Microcontroller Time : 3 Hrs.] Prelim Question Paper Solution [Marks : 100 Q.1(a) Attempt any THREE of the following: [12] Q.1(a) (i) Distinguish between Microprocessor and Microcontroller (any four). (A) (Any four points 1 mark each) Micro-processor Micro-controller rolle 1) Micro-processors do not have inbuilt RAM or ROM. Micro-controller roller do have inbuilt RAM or ROM. 2) Memory, I/O ports, timers, Memory, I/O ports, interrupts, interrupts are not integrated inside timers, are integrated inside the the chip. chip. 3) Micro-processors to work as micro- Micro-controllers controllers can be worked as computers requires many additional micro-computers computers without any components to perform its additional components. operation. 4) Program and data are stored in same memory. Separate program and data memory. 5) Booleans operations are not possible directly. Boolean operations are possible directly. 6) e.g. Pentium series, Intel 8086 e.g. 8051, PIC 16F series Q.1(a) (ii) Draw the block diagram of Harvard and Von-Neumann architecture. (A) Harvard architecture CPUdy CPU Data bus Address bus Data bus Address bus Von-Neumann architecture CPU Data bus Address bus Data Memory Program Memory onk ar Program Memory Data Memory 307/379/e:1114/1114/TY/Pre_Pap/Ele/2014/CP/MC_Soln 1

2 : T.Y. Diploma MC Q.1(a) (iii) List any four important features of 8051 microcontroller. (A) Features of 8051 Micro-controller are as follows : 1) It has 8-bit CPU. 2) It has 4kb on-chip program memory. 3) 128 bytes of on-chip data memory. 4) It has 32 bi-directional I/O lines. 5) It has two 16-bit timers/counters. 6) It has 5 vector interrupts. 7) It has full duplex asynchronous receiver transmitter (one serial port) 8) It has on-chip clock oscillators. Q.1(a) (iv) Describe any four addressing modes of 8051 microcontroller with one example each. (A) Types of addressing modes are as follows : (a) Immediate addressing mode : Immediate e addressing mode means the data is provided as a part of instruction (it immediately follows instructions opcode). e.g. MOV A, 99 This instruction directly moves the data 99 to the accumulator. (b) Register addressing mode : It uses registers to hold the data to be manipulated. There are 4 banks of 8 registers. Only one bank is activated at a time which contains R0 to R7 registers. Any one register can be specified as operand. e.g. MOV A, R5 Here, e, content of R5 is copied to the accumulator. (c) Direct addressing mode : This mode is provided to access internal data memory directly including SFR. In this, 8 bit internal data memory address is specified as a part of instruction. It can specify address only from 00H to FFH. e.g. MOV A, 47H This reads the data from internal RAM address 47H and copies it to accumulator. cumu (d) Indirect addressing mode : This is used to hold the actual address which will be used in data movement. R 0, R 1 and DPTR only can be used as data pointers R 0 and R 1 can hold 8 bit while DPTR can hold 16 bit address. It cannot be used for SFRs. e.g. i) MOV 1 R 1 contains the address of internal RAM location, it copies content of memory location pointer by R 0 into A. 2

3 Prelim Question Paper Solution ii) MOV X DPTR It copies the content of external data memory pointed by DPTR into accumulator. Q.1(b) Attempt any ONE of the following : [6] Q.1(b) (i) Describe the power saving operation of 8051 microcontroller. [6] (A) There are 2 types of modes in power saving : (i) Ideal mode (ii) Power down mode (i) Ideal Mode : After setting the ideal bit in PCON register, microcontroller turns into ideal saving mode. In this, content t of all registers, I/O ports remains unchanged serial ports, timers, interrupts continues operating normally. In this system turns of CPU. In order to come out from Ideal mode. Interrupt or Reset signal can be used which will automatically clear ideal bit. C 2 Chrystal C 3 Oscillator pins Osc r PD IDL (ii) Power Down Mode : After setting bit PD in the PCON register, micro- controller turns into power down mode. In this mode, micro-controller turns off its internal oscillator which reduces power consumption which makes micro-controller controller works on 2V power supply and current upto 40 A. In this mode all contains of SFRs and I/O port remains as it is. Q.1(b) (ii) Draw interfacing diagram of 2Kbyte EPROM and 2K byte RAM to 8051 microcontroller. Draw the memory map. (A) For 2 K byte EPROM, 2 Kb = 2 11 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A For 2 K byte RAM, 2 Kb = 2 11 Clock generator Interrupt serial port V0V CPU [6] 3

4 : T.Y. Diploma MC A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A EA WR RD PSEN A 15 A 14 A 13 A 12 A 11 A 8 to A 10 ALE AD 0 to AD 7 74LS 373 Latch Q.2 Attempt any FOUR of the following owing : [16] Q.2(a) Draw the internal architecture re of 8051 microcontroller. (A) Internal Architecture of 8051 microcontroller WR CS 2kb 8 RAM A 8 to A 10 A 0 to A 7 D 0 to D 7 OE +V RD CC +V CC GND A 11 to A 15 WR CS 2kb 8 EEROM A 8 to A 10 A 0 to A 7 OE D 0 to D 7 kar GND nkgnda 4

5 Prelim Question Paper Solution Q.2(b) Explain a Boolean processor of microcontroller 8051 with two examples. (A) The 8051 instruction set is optimized for the one-bit operations so often desired in real-world, real-time control applications. The Boolean processor provides direct support for bit manipulation. ion. This leads to more efficient programs that need to deal with binary input and output conditions inherent in digital-control problems. Bit addressing can be used for test pin monitoring or program control flags. For example, instructions for Boolean function are as given below : (a) ORL P0, #1 ; Set P0.0 (b) XRL P0, #1 ; Toggle P0.0 (c) ANL C, P1.4 ; AND the bit on P1.4 with carry (d) ANL C,!(P1.4) ; AND inverted bit on P1.4 with carry Q.2(c) Describe the function of following pins of 8051 microcontroller (i) PSEN (ii) ALE (iii) EA (iv) RST (A) Functions : (i) PSEN (pin 29) Program strobe enable is the output control signal. It remains low while fetching data from external program memory. During the internal program execution, it remains high. (iii)v (ii) ALE (pin 13) It is address latch enable which is used to demultiplex AD 0 to AD 7 of port 0, it is a positive going pulse generated everytime during external memory access. It latches low order address bus and generates separate set of address lines as shown in diagram. 7y AD 0 -AD ALE ALE G LATCH D 0 D 7 an A0 to A7 (iii) EA (pin 31) When external access pin is enabled, i.e. it is high, it select internal program memory, if it is low, it selects only external program memory. (iv) RST (pin 9) This is reset pin. It provides reset mechanism to establish initial condition if micro-controller hangs. Reseting operation will clear all the content of memory location. 5

6 : T.Y. Diploma MC Q.2(d) Draw the internal RAM memory organization of 8051 microcontroller (A) Internal RAM Memory 7F 30 2F F GPR 16,Bit addressable Registers R 7 R 0 R 7 R 0 R 7 R 0 R 7 Scratch PAD RAM Bit Addressable RAM Register Bank 3 Register Bank 2 Register Bank 1 [stack] 07 Bank 0 00 R 0 RAM Memory : There are 128 bytes of RAM in 8051 assigned address 00 to 7FH. laregister The 128 bytes are divided into 3 different groups as follows : (i) A total of 32 bytes from location 00 to 1F hex are set aside for register banks and the stacks. (ii) A total of 16 bytes from locations 20H to 2FH are set aside for bit addressable read/write memory. (iii) ii) A total of 80 bytes from location 30H to 7FH are used for read and write storage called as scratch pad. ank ar 6

7 Prelim Question Paper Solution Q.2(e) Write an assembly language program for 8051 microcontroller to transfer ten bytes of data from source to destination in internal RAM (Assume suitable memory addresses) (A) Algorithm : Flow Chart : 1. Start Start 2. Initialize memory pointer as source Initialize M.P. as 3. Initialize memory pointer as destination source 4. Initialize counter 5. Move content of 1 st Initialize M.P. as source location to A 6. Move content of A to 1 st destination tion destination location 7. Increment source location MOV content of 1 8. Increment destination location location to A 9. Decrement iteration count if not 0, Move content of A to 1 jump to step 5 destination location 10. Stop Program : ORG 0000H MOV R0, #70H MOV R1, #80H MOV R4, #0AH UP : MOV R0 R1, A INC R0 INC R1 DJNZ R4, UP END Q.3 Attempt any FOUR of following : [16] Q.3(a) Explain the following instruction of 8051 : (i) RLA (ii) MOV (iii) ii) MUL AB (iv) CLRA (A) (i) RLA : Rotate A left (ii) MOU Ua add1 a Ri : Move the content of memory location pointed by R i into add1. (iii) MULAB : multiply A and B (iv) CLRA : Clear A ka Increment source location destination location Decrement iteration count anincrement a loc if count = 0 Yes Stop ank kar r No 7

8 : T.Y. Diploma MC Q.3(b) Describe the following directives with one example. (i) ORG (ii) DB (iii) EQU (iv) END (A) Assembler directives : (i) ORG : The ORG directive is used to indicate the starting address. It can be used only when program counter needs to be changed. It can be decimal or hex. e.g. 2000H; set program counter 2000 (ii) DB (Define byte) : DB directive is used to define 8 bit data. It initialized memory with 8 bit value. It can be decimal, binary or in ASCII formats. e.g. (1) DB 40H ; Hex (2) DB B ; binary (3) DB 16 ; Decimal (4) DB HELLO ; ASCII (iii) EQU (or SET) : These directives assigns numerical value or register name to the specified symbol name. EQU is used to define constant without storing it in memory. Symbol defined EQU should not be redefined whereas SET allows redefinition of symbol. e.g. (1) SET R1 ; use R1 as pointer (2) EQU R1 ; use R1 as a counter (iv) END : This indicates END of program to assembler any text after END is ignored, if END is missing assembler generates error message. Q.3(c) State the function of editor, assembler, linker and compiler. (A) Software development cycle involves the use of following tools : (i) Editor : Editor is used to type the program which produces ASCII file, it can be used to create or edit program. Software code is written in programming language i.e. assembly or C. The file extension is.asm or.src depending of assembly used. (ii) Assembler : It converts the instructions into machine code assembler produces an object file and least file. Extension for object file and least files are.obj and.lst respectively. (iii) Linker : Linker program takes one or more object code files and produces an absolute object file with the extension.abs. (iv) Compiler : It is a software which monitors any flaw (error) in the program written by the programmer and draws the attention of the programmer to all the lines with errors. 8

9 Prelim Question Paper Solution Q.3(d) Write an assembly language program for 8051 microcontroller to add two 8 bit numbers 55H and 67H. Store the result at 20H. (A) Algorithm : Flow-Chart : 1. Initializaiton 2. Get 1st no. in accumulator Start 3. Get 2nd no. in R5 Get 55H in 4. Add both numbers accumulator 5. Store the result in internal memory Get 67H in location 20H R5 6. Stop Program : ORG 0000H MOV A, #55H MOV R5, # 67H ADD A, R5 MOV 20H, A END Add both the numbers Store the result 20Hk in 20H Stop nktop Q.3(e) Discuss the selection factors of microcontroller. (A) Selection factors of microcontroller controller Three criteria in choosing microcontroller are as follows : A) 1) Microcontroller roller must be meet the computing need of the task at hand efficiently and cost. 2) We must whether her an 8 bit, 16 bit or 32 bit micro-controller can best handle the computing needs of the task most effectively. Some other consideration in this category are : i) Speed : What is the highest speed that the micro-controller supports. ii) Packaging : Does it come in 40 pin DIP or QFP (Quad Flat Package) or Some other packaging formats. This is important in terms of space, assembly and prototyping the end product. iii) Power consumption : This is especially critical for battery powered product. iv) The amount of RAM and ROM on chip. v) The number of I/O pins and Timer on chip. vi) Cost per unit. a B) Second criteria in choosing micro-controller is, how easy it is to developed product around it. Key considerations includes the availability of a assembler, debugger, a code efficient C language compiler, emulator, technical support and both inhouse and outside expertise. 9

10 : T.Y. Diploma MC C) The third criteria in choosing the micro-controller is, its ready availability in needed quantity both now and in future currently, of the leading 8 bit micro-controller the 8051 family has the largest number of supplies. In case of 8051, which was diversify originated by Intel. Several companies also producing the These companies includes Intel, Atmel, Philips/Signetic, AMD, Infineon (formally known as Siemens), Matra and Dallas Semi-conductor. Q.4(a) Attempt any THREE of the following : [12] Q.4(a) (i) Describe following 8051 microcontroller instructions tions (a) SET B C (b) ADD (c) MOV A, #20H (d) XCH A, R0 (A) 8051 microcontroller instructions : (a) SET B C set carry flag (b) ADD Add indirect RAM to accumulator (c) MOV A, #20H Move immediate data to accumulator (d) XCH A, R0 Exchange register with accumulator Q.4(a) (ii) Draw the format of SCON register and describe the function of each bit. (A) SCON is a 8-bit register which indicates mode selection and flag generation of interrupt. Bit 7 Bit 0 SM 0 SM 1 SM 2 REN TB8 RB8 T1 R1 SM 0 and SM 1 : SM 0 SM 1 Modes 0 0 Serial mode 0 (synchronous comm) (10 bit asynchronous comm) Mode 3 SM 2 Use idmode for multiprocess communication REN (Received Enable) It is also referred as SCON.4. Since it is bit addressable. When REN bit is high it allows 8051 to receive data on RxD pin, by making REN = 0 the receiver is made disable. TB8 (Transfer bit 8) Use for serial modes 2 and 3. RB8 (Receive bit 8) Use for serial modes 2 and 3. T1 (Transmit Interrupt) When 8051 finishes transfer of 8 bit character it raises T1 flag to indicate that it is ready to transfer another byte. SM 1dy Vi1 0 10

11 Prelim Question Paper Solution R1 (Receive Interrupt) When 8051 receives data serially via RxD it raises R1 flag bit to indicate that a byte has been received. Q.4(a) (iii) Draw the circuit diagram of port 2 and describe its functions. (A) Port 2 can be configured as I/O port or higher order address bus depending upon the operation to be performed. Internal Data Bus Write to latch D Clk Read latch Q Q Addr Control Read pin I 1 I 0 2:1 MUX +V CC PORT 2 LINES AS AN ADDRESS BUS [A 8 -A 15 ] A 8 A 15 Control input should be 1. This input will be provided internally by 8051 depending upon the instruction i.e. memory related instructions. Thus, Control= 1, D FlipFlop will be isolated from mux, I 1 will be connected to o/p Y. When, address line = 0 then, I 1 = 0 y -= 0 and ouput of NOT Gate = 1 hence, it will turn ON transistor T (i.e. closed switch) Simultaneously, o/p of AND Gate = 0 as, address = 0 and Control = 1 this will turn OFF T (i.e. open switch) As T is off and T is ON current will start from Vcc and flows towards ground through R and T. Accordingly respective port line sinks the current and hence that respective addressing line will be treated as Logic O. When, address line = 1 then I 1 = 1 S 0 y T 1 T R pz.x an 11

12 : T.Y. Diploma MC Y = 1 and output of NOT Gate = O Hence, it will turn OFF transistor T (i.e. open swich) Simultaneously, o/p of AND Gate = 1 as, Address = 1 and Control = 0 this will turn ON T (i.e. closed switch) As T is ON and T is OFF current will start form Vcc and flow through T. Accordingly, respective port line sources the current and hence respective address line will be treated as logic 1. PORT 2 LINES AS I/O PORT: When, D = 1 clk = 1 Q = 1 Q = 0 But Q is connected to Mux Thus I 0 = 1 and o/p of NOT Gate = 0 Thus, T will turn OFF ( i.e. Open Switch) Therfore respective port line will source the current and Port2 X will be treated as Logic 1 When, D = 0 clk = 0 Q = 0 Q = 1 but Q is connected to MUX Thus I 0 = 0 and o/p of NOT Gate =1 Thus, T will turn ON (i.e. closed switch) Therefore respective port line will sink the current and pz.x will be treated as Logic 0. Q.4(a) (iv) State four instructions related with external memory. (A) Instructions related with external memory i) MOV M, r [[HL]] [ r ] Moves the content of register r to external memory location whose address is stored in HL register pair. e.g : MOV M, C This instruction moves the contents of register C into the memory location whose address is in HL register pair. 12

13 Width : 1 byte. Addressing : indirect addressing Flags affected : none Machine cycle : 2 (opcode fetch, memory write) T states : 7 (4 + 3) Prelim Question Paper Solution ii) MVI M, data 8 [[HL]] data 8 It moves the data specified in the instruction into the external memory location whose address is stored in HL register pair. e.g. MVI M, 50 H [[HL]] 50 H This instruction moves 50 H into memory location whose address is stored in HL register pair. Width : 2 bytes Addressing : immediate/indirect irect addressing. Flags affected : none. Machine cycle : 3 (opcode ode fetch, operand fetch, memory write) T states : 10 ( ) iii) LDA addr [A] [addr] It moves the contents of external memory location whose address is specified in the instruction into accumulator. e.g. LDA 3056 H [A] [3056 H] This instruction loads accumulator with the contents of memory location 3056 H. Width : 3 bytes Addressing : direct. Flags affected : none. Machine cycle : 4 (opcode fetch, operand fetch, operand fetch, memory read) T states : 13 ( ) iv) STA addr [addr] [A] It stores the contents of accumulator into the external memory location whose address is specified in the instruction. 13

14 : T.Y. Diploma MC e.g. STA 2560 H [2056 H] [A] This instruction stores the contents of accumulator into memory location 2056 H. Width : 3 bytes Addressing : direct addressing. Flags affected : none. Machine cycle : 4 (opcode fetch, operand fetch, operand fetch, memory write) T states : 13 ( ) Q.4(b) Attempt any ONE of the following : [6] Q.4(b) (i) Write a program to arrange number in ascending order using [6] 8051 instruction set. (A) Program : Arrange number in Ascending order Number are stored in memory from 30 to 3F H Arrange these numbers in Ascending order. 14

15 Prelim Question Paper Solution START : MOV R6, #0FH LOOP1 : MOV R0, #30H MOV R7, 06H (R 7 R 6 ) LOOP2 : MOV INC R0 CLRCu SUBB R0 JC SKIP MOV DEC R0 XCH INC R0 R0, A SKIP : DJNZ R7, LOOP 2 DJNZ R6, LOOP 1 HERE : LJMP HERE Q.4(b) (ii) Draw the interfacing diagram of stepper motor with 8051 microcontroller and write an assembly language program to rotate stepper motor continuously in clock wise direction. (A) Gnd +V CC C 1 = 33pf a(rst) V PP C MHz +V CC D 0.0 D 0.1 D 0.2 D 0.3 D 0.4 D 0.5 D 0.6 D C 2 = 33pf +V CC D 0 +V ULN 2003 Gnd V CC (+ 12V) Coil Rotor Coil [6] 15

16 : T.Y. Diploma MC UP : DELAY : YY : XX: ORG 0000H MOV A, # 33H MOV P1, A ACALL DELAY RR A SJMP UP MOV R4, # 0FFH MOV R5, # 0FFH DJNZ R5, XX DJNZ R4, YY RET END Q.5 Attempt any FOUR of the following : [16] Q.5(b) Draw and describe IE register of 8051 microcontroller. roller. (A) IE register can enable and disable various available interrupt EA ET2 ES ET1 EX1 ET0 EX0 EA (IE7) (IE6) ET2 (IE5) Disable all interrupts. If EA = 0, no interrupt is acknowledge if EA = 1 each interrupt source is individually enabled/ disabled by setting/clearing its enable bit Not implemented, reserved for future use Enables/Disables timer 2 for further use. E S (IE4) Enables/Disables serial port interrupt. ET1 (IE3) Enable/Disables timer / overflow interrupt. EX1 (IE2) Enable/Disables external interrupt 1. an ET0 (IE1) Enables/Disables timer o overflow interrupt. EX0 (IE0) Enables/Disables external interrupt o Q.5(b) Describe the timer modes of 8051 microcontroller. (A) Timer Modes of 8051 Microcontroller 8051 microcontroller has 4 timer modes. Timer modes can be selected with the help of TMOD register. 16

17 M 1 M 0 Timer Mode Mode 0 GATE INTX 0 0 Mode Mode Mode Mode 3 Prelim Question Paper Solution In mode 0, timer register is configured as 13 bit register, 8 bit for THX and 5 bit for TLX. Timer is enable when TRX = 1 and gate = 0 then register can hold values between 0000H to 1FFFH FFH in TH and TL. When register value reaches es its maximum it roles over to 0000H, when the register overflow it sets s timer interrupt flag TF one or zero. Mode 1 1 C Oscillator T a= = 0 12 THX TLX 8 bit 8 bit TFX Tx pin yac C T =act = 1 Overflow TRX GATE INTO In mode 1, timer register is configured as 16 bit register where 8 bit for THX and 8 bit for TLX and gate = 0, then registers can hold value between 0000H 0H to FFFFH FFFH in TH and TL. Mode 2 GATE INTO Oscillator Tx pin Oscillator Tx pin 1 12 TRX 1 12 TRX C T = 0 C T = 1 C T = 0 TLX C T = 1 8 bit THX 8 bit THX TLX 8 bit 5 bit TFX TFX 17

18 : T.Y. Diploma MC The operation is some for timer 0 and timer 1. In this mode, timer register is configured as TLX. When TLX overflows from FFH to 00H it sets the flag TFX and it loads THX. The reload leaves THX unchanged. In this mode timer 1 or timer 0 supports the automatic reload operation. The timer control logic is same as mode 0 or mode 1. Mode 3 GATE INTO Oscillator Oscillator 1 12 TRO 1 12 C T = 0 nk TLO TFO C T = 1 8 bit Overflow THO TF1 Timer 0 in mode 3 TL0 and TH0 are 2 separate registers as shown in figure. TL0 uses gate TR0, INT0 and TF0 control bit of timer 0 and TH0 uses TR1 and TF1 control bit of timer 1. When TL0 overflows from FFH to 00H, then it sets the timer flag TF0. If control bit TR1 is set, TH0 receives the timer clock. When counter TH0 overflows from FF to 00 then it sets the flag TF1. Timer 1 may still be used in mode 0/1/2 but it neither interrupt the processor sor nor sets the flag. When timer 0 is in mode 3, timer 1 can be used for baud rate generation in serial communication. Q.5(c) List the various interrupts in 8051 microcontroller along with their priorities and vector locations. (A) Various Interrupts in 8051 microcontroller Interrupt Location (ROM) Priority RESET 0000H Highest INT0 (external hardware) 0003H Timer 0 (TF0) 000BH ViInterrup ViRES VI VInt Int1 (external hardware) 0013H Timer 1 (TF1) 001BH Serial communication (R1/T1) 0023H Lowest TR1 an 18

19 Prelim Question Paper Solution Q.5(d) Write an assembly language program for 8051 microcontroller to generate square wave on P1.0 using delay subroutine. (A) ORG 0000H SET B P1.0 A CALL DELAY CLR P1.0 main : SJMP main END DELAY : MOV R 4, # 0FFH UP : DJNZ R4, UP RET Q.5(e) Draw the internal structure of port3 & list alternate functions of port3. (A) Structure of Port 3 : Internal Data Bus Write to latch D Read latch Q Q Alt output function [TXD, WR,laRD ] +V CC Read pin Alt input function [RXD, INTO, INT1, T 0, T 1 ] To configure PORT 3 as an input/output port the Alternate output function pin provided to NAND Gate will be Logic 1, done by microcontroller depending on the instruction. When D = 0, Q = 0, Then o/p of NAND Gate = 1, This will turn ON the transistor T i.e. closed switch. Accordingly, respective PORT 3 line will sink the current. This is treated as Logic 0 When D = 1 Q = 1, T R p3:x Real an W ya 19

20 : T.Y. Diploma MC Then o/p of NAND Gate = 0 This will turn OFF the transistor T i.e. open switch, Accordingly, respective PORT 3 pin will source current. This is treated as Logic 1. PORT 3 AS AN ALTERNATE FUNCTION PORT: To use the Alternate Functions of PORT 3, 8051 will set D input of D flipflop depending upon the instruction. Consider Alternate o/p function to NAND Gate is O Then, o/p of NAND Gate = 1 Accordingly, T will turn ON i.e. closed switch Respective PORT 3 line will be at Logic 0 Consider Alternate output function to NAND Gate is 1 Then, output of NAND Gate = 0 Accordingly, T will turn OFF i.e. open switch Respective PORT3 line will be at Logic 1 Q.6 Attempt any FOUR of the following : [16] Q.6(a) Write an assembly language age program to generate continuous square of 2KHz frequency on P1.4 using timer 0. Assume crystal frequency of 8051 microcontroller controller is MHz. (A) Given : Crystal frequency = MHz Timer input clock ck frequency = MHz = MHz 12 1 T = sec MHz Give frequency of output square wave is 2 KHz. Timer period of output square wave = 1 2KHz T sec. ON = T OFF = 500 = 250 sec. 2 Desire delay = 250 sec. Desired delay Desire count = Time period of input clock = = 230 Max. count Desire count = Timer count = (65306) 10 = (FFIA) h = 500 sec. 20

21 ORG 0000H MOV TMOD, # 01H CLR TR0 CLR TF0 UP : MOV TH0, # 0FFH MOV TL0, # 1AH SET B, TR0 here : JNB TF0 here CPL P1.4 CLR TF0 SJMP UP END ET2 (IE5) Enables/Disables timer 2 for further use. ES (IE4) Enables/Disables serial port interrupt. ET1 (IE3) Enables/Disables timer/overflow rflow interrupt. EX1 (IE2) Enables/Disables timer 0 overflow interrupt ET04 (IE1) Enables/Disables timer 0 overflow interrupt EX0 (IE0) Enables/Disables external interrupt 0 Prelim Question Paper Solution Q.6(b) Draw the format of TCON register and state the function of each bit. (A) TCON register This register er is 8-bit, bit addressable. It controls the timer/counter operation. First 4 bit indicates timer flag another 4 bit indicates interrupt flag. TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0 Timer Interrupt TR0 and TR1 These flags are use to run the timer or ON/OFF the timer. TF1 and TF0 It indicates timer 1/0 overflow flag when timer/counter dytf0 overflows. IE1 / IE0 It indicates external interrupt 1/0. IT1 / IT0 It indicates timer 1/0 interrupt. When it is zero it is low level trigger for level 1 falling edge trigger. Q.6(c) Draw the control word register format of 8255 and describe the function of each bit. (A) Control Word Register Format of 8255 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 21

22 : T.Y. Diploma MC D 0 Port C (lower PC3 PC0) 1 = input 0 = output D 1 Port B, 1 = input 0 = output D 2 Mode select 0 = Mode0 1 = Mode1 D 3 Port C (Upper PC7 PC4) 1 = input 0 = output D 4 Port A, 1 = input 0 = output D 5 and D 6 Mode selection 00 Mode 0 01 Mode 1 10 Mode 2 D 7 1 = I/O port 0 = BSR mode Q.6(d) Draw and describe e IP register format of 8051 microcontroller. (A) IP register format of 8051 microcontroller By programming ming IP (Interrupt Priority) register we can assign higher priority to any one of the interrupt. bit = 1, higher priority bit = 0, lower priority PS PT1 PX1 PT0 PX0 (IP.7) Reserved (IP.6) Reserved (IP.5) Reserved PS (IP.4) Serial port interrupt priority bit PT1 (IP.3) timer 1 interrupt priority bit PX1 (IP.2) External interrupt 1 priority bit PT0(IP.1) Timer 0 interrupt priority bit PX0(IP.0) External interrupt 0 priority bit 22

23 Prelim Question Paper Solution Q.1(a) (v) Draw Block diagram of Discuss the operating modes of it. (A) Block diagram of IC 8255 The following is an overview of each of the three available modes: 1) MODE 0 (Basic Input/Output): put): Two eight bit ports and two 4 bit ports Any port can be either er input or output Outputs are latched Inputs are not latched 16 different Input/output configurations are possible in this mode. 2) MODE 1 (Strobed Input/output): Two Groups (Group A and Group B) Each group contains one 8 bit data port and (1) 4 bit control/data port The 8 bit data port can be either input or output Both inputs and outputs are latched The 4 bit port is used for control and status of the 8 bit data port 3) MODE 2 (Strobed Bidirectional Bus I/O): Used in Group A only One 8 bit bidirectional bus port (Port A ) and one (5) bit control port (port C) Both inputs and outputs are latched The 5 bit control port (Port C) is used for control and status for the (8) bit, bidirectional bus port (Port A) 23

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture Department of Electrical Engineering Lecture 4 The 8051 Architecture 1 In this Lecture Overview General physical & operational features Block diagram Pin assignments Logic symbol Hardware description Pin

More information

MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051:

MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051: DEPARTMENT OF ECE MICROPROCESSORS AND MICROCONTROLLERS MATERIAL UNIT V 8051 MICROCONTROLLERS To make a complete microcomputer system, only microprocessor is not sufficient. It is necessary to add other

More information

Microcontroller and Applications

Microcontroller and Applications S.Y. Diploma : Sem. IV [DE/EJ/ET/EN/EX/EQ/IS/IC/IE] Microcontroller and Applications Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 70 Q.1 Attempt any FIVE of the following : [10] Q.1(a) Define

More information

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution 1. (a) 1. (b) T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution Priority modes. 1) Fully Nested Mode : It is a general purpose mode. IR 0 highest priority IR 1 lowest

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller 1 Salient Features (1). 8 bit microcontroller originally developed by Intel in 1980. (2). High-performance CMOS Technology. (3). Contains Total 40 pins. (4). Address bus is of 16 bit

More information

WINTER 14 EXAMINATION

WINTER 14 EXAMINATION Subject Code: 17534 WINTER 14 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2)

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

EE6502- MICROPROCESSOR AND MICROCONTROLLER

EE6502- MICROPROCESSOR AND MICROCONTROLLER . EE6502- MICROPROCESSOR AND MICROCONTROLLER UNIT III - 8051 MICROCONTROLLER PART - A 1. What is Microcontroller? A device which contains the microprocessor with integrated peripherals like memory, serial

More information

Embedded Controller Programming

Embedded Controller Programming Embedded Controller Programming Counters, Timers and I/O in Assembly Language Ken Arnold Copyright 2000-2004 Ken Arnold 1 Outline Timer/Counters Serial Port More 8051 Instructions Examples Copyright 2000-2004

More information

Introduction To MCS-51

Introduction To MCS-51 Introduction To MCS-51 By Charoen Vongchumyen Department of Computer Engineering Faculty of Engineering KMITLadkrabang 8051 Hardware Basic Content Overview Architechture Memory map Register Interrupt Timer/Counter

More information

Interrupts. EE4380 Fall 2001 Class 9. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

Interrupts. EE4380 Fall 2001 Class 9. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas 8051 - Interrupts EE4380 Fall 2001 Class 9 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Polling Vs Interrupts Polling: MCU monitors all served devices continuously,

More information

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC. MICROCONTROLLERS AND APPLICATIONS 1 Module 1 Module I Introduction to Microcontrollers: Comparison with Microprocessors Harvard and Von Neumann Architectures - 80C51 microcontroller features - internal

More information

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following.

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following. MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following. (9M) 1) Describe the instructions SWAP A and MOVX@DPTR,A with one example. (3Marks) SWAP A

More information

CS 320. Computer Architecture Core Architecture

CS 320. Computer Architecture Core Architecture CS 320 Computer Architecture 8051 Core Architecture Evan Hallam 19 April 2006 Abstract The 8051 is an 8-bit microprocessor designed originally in the 1980 s by the Intel Corporation. This inexpensive and

More information

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code:

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code: MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code: 17534 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given

More information

8051 Microcontroller memory Organization and its Applications

8051 Microcontroller memory Organization and its Applications 8051 Microcontroller memory Organization and its Applications Memory mapping in 8051 ROM memory map in 8051 family 0000H 4k 0000H 8k 0000H 32k 0FFFH DS5000-32 8051 1FFFH 8752 7FFFH from Atmel Corporation

More information

Vidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND)

Vidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND) 1. (a) Pin configuration of 8085 X 1 X 2 CLKOUT TRAP RST 7.5 RST 6.5 RST 5.5 INTR INTA SID SOD RESET IN RESET OUT T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution

More information

Module Contents of the Module Hours COs

Module Contents of the Module Hours COs Microcontrollers (EE45): Syllabus: Module Contents of the Module Hours COs 1 8051 MICROCONTROLLER ARCHITECTURE: Introduction to Microprocessors and Microcontrollers, the 8051 Architecture, 08 1 and pin

More information

Three criteria in Choosing a Microcontroller

Three criteria in Choosing a Microcontroller The 8051 Microcontroller architecture Contents: Introduction Block Diagram and Pin Description of the 8051 Registers Some Simple Instructions Structure of Assembly language and Running an 8051 program

More information

The Timers/Counters The Serial Interface The Interrupt System Reset P0.0-P0.7 P2.0-P2.7. Port 2 Drivers. Port 2 Latch

The Timers/Counters The Serial Interface The Interrupt System Reset P0.0-P0.7 P2.0-P2.7. Port 2 Drivers. Port 2 Latch HARDWARE DESCRIPTION This chapter provides a detailed description of the 80C51 microcontroller (see Figure 1). Included in this description are: The port drivers and how they function both as ports and,

More information

8051 Microcontrollers

8051 Microcontrollers 8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 8, 2016 Controller vs Processor Controller vs Processor Introduction to 8051 Micro-controller In 1981,Intel corporation

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

SUMMER 13 EXAMINATION

SUMMER 13 EXAMINATION MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC - 27001-2005 Certified) Subject Code: 12187 SUMMER 13 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

UNIT IV MICROCONTROLLER

UNIT IV MICROCONTROLLER UNIT IV 8051- MICROCONTROLLER Prepared by R. Kavitha Page 1 Application Prepared by R. Kavitha Page 2 Pin Description of the 8051 UNIT IV- 8051 MICROCONTROLLER P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST

More information

Microcontroller Intel [Instruction Set]

Microcontroller Intel [Instruction Set] Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers

More information

Distributed by: www.jameco.com 1-800-831-4242 The content and copyrights of the attached material are the property of its owner. 8051 8052 and 80C51 Hardware Description December 1992 Order Number 270252-006

More information

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET 1 SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET Intel 8086/8088 Architecture Segmented Memory, Minimum and Maximum Modes of Operation, Timing Diagram, Addressing Modes, Instruction Set,

More information

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system. Syllabus: : Introduction to, 8051 Microcontroller Architecture and an example of Microcontroller based stepper motor control system (only Block Diagram approach). (5 Hours) Introduction to A microcontroller

More information

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52 Features Compatible with MCS -51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

8051 microcontrollers

8051 microcontrollers 8051 microcontrollers Presented by: Deepak Kumar Rout Synergy Institute of Engineering and Technology, Dhenkanal Chapter 2 Introduction Intel MCS-51 family of microcontrollers consists of various devices

More information

UNIT MICROCONTROLLER AND ITS PROGRAMMING

UNIT MICROCONTROLLER AND ITS PROGRAMMING M i c r o p r o c e s s o r s a n d M i c r o c o n t r o l l e r s P a g e 1 UNIT-7 8051 MICROCONTROLLER AND ITS PROGRAMMING INTRODUCTION The microcontroller incorporates all the features that are found

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

Rev. No. History Issue Date Remark

Rev. No. History Issue Date Remark Preliminary Bar Code Reader Document Title Bar Code Reader Revision History Rev. No. History Issue Date Remark 0.0 Initial issue June 5, 2000 Preliminary 0.1 Change document title from Bar Code Reader

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller EE4380 Fall 2001 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas 8051 Architecture Programmer s View Register Set Instruction Set Memory

More information

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5 MICROCONTROLLER AND PLC LAB-436 SEMESTER-5 Exp:1 STUDY OF MICROCONTROLLER 8051 To study the microcontroller and familiarize the 8051microcontroller kit Theory:- A Microcontroller consists of a powerful

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

MODEL ANSWER WINTER 17 EXAMINATION Subject Title: Microcontroller and applications

MODEL ANSWER WINTER 17 EXAMINATION Subject Title: Microcontroller and applications Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

8051 Core Specification

8051 Core Specification 8051 Core Specification Authors: Jaka Simsic Simon Teran jakas@opencores.org simont@opencores.org Rev. 0.1 August 14, 2001 First Draft www.opencores.org Rev 0.1 First Draft 1 of 26 Revision History Rev.

More information

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka INTRODUCTION Microcontroller vs General Purpose Microprocessor General-purpose microprocessors contains No RAM No

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 17 EXAMINATION Subject Name: Microcontroller Model Answer Subject Code: 17534 I m p o r t a n t I n s t r u c t i o n s t o e x a m i n e r s : 1) The answers should be examined by key words and

More information

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text In this lecture the detailed architecture of 8051 controller, register bank,

More information

8051 MICROCONTROLLER

8051 MICROCONTROLLER 8051 MICROCONTROLLER Mr.Darshan Patel M.Tech (Power Electronics & Drives) Assistant Professor Department of Electrical Engineering Sankalchand Patel College of Engineering-Visnagar WHY DO WE NEED TO LEARN

More information

CPEG300 Embedded System Design. Lecture 8 Timer

CPEG300 Embedded System Design. Lecture 8 Timer CPEG300 Embedded System Design Lecture 8 Timer Hamad Bin Khalifa University, Spring 2018 Review 8051 port and port schematic Internal read/write data path Serial communication vs. parallel communication

More information

Programming of 8085 microprocessor and 8051 micro controller Study material

Programming of 8085 microprocessor and 8051 micro controller Study material 8085 Demo Programs Now, let us take a look at some program demonstrations using the above instructions Adding Two 8-bit Numbers Write a program to add data at 3005H & 3006H memory location and store the

More information

Chapter 6 Interrupts. (I. Scott Mackenzie) By: Masud-ul-Hasan

Chapter 6 Interrupts. (I. Scott Mackenzie) By: Masud-ul-Hasan Chapter 6 Interrupts (I. Scott Mackenzie) 1 Interrupts An interrupt is the occurrence of an event that causes a temporary suspension of a program while the condition is serviced by another program. It

More information

ISSI. IS89C51 CMOS SINGLE CHIP 8-BIT MICROCONTROLLER with 4-Kbytes of FLASH ISSI IS89C51 NOVEMBER 1998 FEATURES GENERAL DESCRIPTION

ISSI. IS89C51 CMOS SINGLE CHIP 8-BIT MICROCONTROLLER with 4-Kbytes of FLASH ISSI IS89C51 NOVEMBER 1998 FEATURES GENERAL DESCRIPTION IS89C51 CMOS SINGLE CHIP 8-BIT MICROCONTROLLER with 4-Kbytes of FLASH NOVEMBER 1998 FEATURES 80C51 based architecture 4-Kbytes of on-chip Reprogrammable Flash Memory 128 x 8 RAM Two 16-bit Timer/Counters

More information

C51 Family. Architectural Overview of the C51 Family. Summary

C51 Family. Architectural Overview of the C51 Family. Summary Architectural Overview of the C51 Family C51 Family Summary 1. Introduction............................................................ I.1. 1.1. TSC80C51/80C51/80C31.................................................................

More information

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller. UNIT V -8051 MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS 1. What is micro controller? Micro controller is a microprocessor with limited number of RAM, ROM, I/O ports and timer on a single chip

More information

8051 Timers. Class 7 EE4380 Fall Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

8051 Timers. Class 7 EE4380 Fall Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas 8051 Timers Class 7 EE4380 Fall 2002 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Introduction Timers Timing devices - Generate specific time delay Event

More information

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS EXAMINATION FOR 159.233 COMPUTER SYSTEMS Semester One June 2008 Time allowed: THREE (3) hours This exam contains THREE (3) questions ANSWER ALL THREE (3) QUESTIONS

More information

VRS540-4kB Flash, 128B RAM, 25~40MHz, 8-Bit MCU

VRS540-4kB Flash, 128B RAM, 25~40MHz, 8-Bit MCU VRS540-4kB Flash, 28B RAM, 25~40MHz, 8-Bit MCU 34 Ste Catherine Street West, Suite 900, Montreal, Quebec, Canada H3B H4 Tel: (54) 87-2447 http://www.goalsemi.com P.3 P.2 XTAL NC P0./AD VRS540 Overview

More information

The 8051 microcontroller has two 16-bit timers/counters called T0 and T1.

The 8051 microcontroller has two 16-bit timers/counters called T0 and T1. Counters and Timers: The 8051 microcontroller has two 16-bit timers/counters called T0 and T1. As their names suggest, timer counts internal clock pulse i.e. machine cycle to provide delay. Counter counts

More information

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code:

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code: MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code: I m p o r t a n t I n s t r u c t i o n s t o e x a m i n e r s : 1) The answers should be examined by key

More information

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5. DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6502- MICROPROCESSORS AND MICROCONTROLLERS UNIT I: 8085 PROCESSOR PART A 1. What is the need for ALE signal in

More information

VRS550-8kB Flash, 256B RAM, 25~40MHz, 8-Bit MCU VRS560-16kB Flash, 256B RAM, 40MHz, 8-Bit MCU

VRS550-8kB Flash, 256B RAM, 25~40MHz, 8-Bit MCU VRS560-16kB Flash, 256B RAM, 40MHz, 8-Bit MCU VRS550-8kB Flash, 256B RAM, 25~40MHz, 8-Bit MCU VRS560-6kB Flash, 256B RAM, 40MHz, 8-Bit MCU 34 Ste Catherine Street West, Suite 900, Montreal, Quebec, Canada H3B H4 Tel: (54) 87-2447 http://www.goalsemi.com

More information

Interrupt Programming: Interrupts vs. Polling Method:

Interrupt Programming: Interrupts vs. Polling Method: UNIT 4: INTERRUPT PROGRAMMING & SERIAL COMMUNICATION WITH 8051: Definition of an interrupt, types of interrupts, Timers and Counter programming with interrupts in assembly. 8051 Serial Communication: Data

More information

MODULE-1. Short Answer Questions

MODULE-1. Short Answer Questions MODULE-1 Short Answer Questions 1. Give the comparison between microprocessor and microcontroller. It is very clear from figure that in microprocessor we have to interface additional circuitry for providing

More information

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY

More information

FACULTY OF ENGINEERING LAB SHEET

FACULTY OF ENGINEERING LAB SHEET FACULTY OF ENGINEERING LAB SHEET MICROCONTROLLER AND MICROPROCESSOR SYSTEMS ECE2216 TRIMESTER 1 (2017/2018) MP2: Construction and programming of a basic electronic piano *Note: On-the-spot evaluation may

More information

Mod-3: Interrupts,Timer operation,serial communication 1

Mod-3: Interrupts,Timer operation,serial communication 1 Mod-3: Interrupts,Timer operation,serial communication 1 Module-3 Contents: Interrupts - interrupt sources - interrupt handling programming examples. Timers operation different modes waveform generation-

More information

8XC51RA RB RC Hardware Description

8XC51RA RB RC Hardware Description 8XC51RA RB RC Hardware Description February 1995 Order Number 272668-001 Information in this document is provided in connection with Intel products Intel assumes no liability whatsoever including infringement

More information

Microcontroller and Embedded Systems:

Microcontroller and Embedded Systems: Microcontroller and Embedded Systems: Branches: 1. Electronics & Telecommunication Engineering 2. Electrical & Electronics Engineering Semester: 6 th Semester / 7 th Semester 1. Explain the differences

More information

Fig 1. Block diagram of a microcomputer

Fig 1. Block diagram of a microcomputer MICRO CONTROLLERS www.bookspar.com VTU NOTES QUESTION PAPERS UNIT - 1 Computer: A computer is a multipurpose programmable machine that reads binary instructions from its memory, accepts binary data as

More information

WINTER 14 EXAMINATION Subject Code: Model Answer Page No: 1/ 26

WINTER 14 EXAMINATION Subject Code: Model Answer Page No: 1/ 26 WINTER 14 EXAMINATION Subject Code: 17509 Model Answer Page No: 1/ 26 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER 14 EXAMINATION Model Answer

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER 14 EXAMINATION Model Answer MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC 27001 2005 Certified) SUMMER 14 EXAMINATION Model Answer Subject Code : 12187 Page No: 1/28 Important Instructions to examiners: 1)

More information

Contents 8051 Instruction Set BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter I : Control Transfer Instructions Lesson (a): Loop Lesson (b): Jump (i) Conditional Lesson (c): Lesson (d): Lesson (e):

More information

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices.

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices. Code No: R05320202 Set No. 1 1. (a) Discuss the minimum mode memory control signals of 8086? (b) Explain the write cycle operation of the microprocessor with a neat timing diagram in maximum mode. [8+8]

More information

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1)

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1) Department of Electrical Engineering Lecture 5 8051 Assembly Language Programming (1) 1 In this Lecture 8051 programming model Assembly language syntax Operation codes and operands Machine instructions

More information

INTEGRATED CIRCUITS DATA SHEET. P89C738; P89C739 8-bit microcontrollers Dec 15. Product specification File under Integrated Circuits, IC20

INTEGRATED CIRCUITS DATA SHEET. P89C738; P89C739 8-bit microcontrollers Dec 15. Product specification File under Integrated Circuits, IC20 INTEGRATED CIRCUITS DATA SHEET File under Integrated Circuits, IC20 1997 Dec 15 CONTENTS 1 FEATURES 2 GENERAL DESCRIPTION 3 ORDERING INFORMATION 4 BLOCK DIAGRAM 5 FUNCTIONAL DIAGRAM 6 PINNING INFORMATION

More information

VALLIAMMAI ENGINEERING COLLEGE S.R.M. NAGAR, KATTANKULATHUR-603203. DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING VII-EEE EE6502- MICROPROCESSORS AND MICROCONTROLLERS QUESTION BANK UNIT I 1. What

More information

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING Instructions Alphabetical List of Instructions ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare

More information

Department of Electronics and Instrumentation Engineering Question Bank

Department of Electronics and Instrumentation Engineering Question Bank www.examquestionpaper.in Department of Electronics and Instrumentation Engineering Question Bank SUBJECT CODE / NAME: ET7102 / MICROCONTROLLER BASED SYSTEM DESIGN BRANCH : M.E. (C&I) YEAR / SEM : I / I

More information

1. Pin diagram of 8051 and ports

1. Pin diagram of 8051 and ports e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Programming parallel ports Module No: CS/ES/9 Quadrant 1 e-text In this lecture pin diagram of 8051 controller will be shown and

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) Summer 2016 EXAMINATIONS.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) Summer 2016 EXAMINATIONS. Summer 2016 EXAMINATIONS Subject Code: 17534 Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the answer scheme. 2) The

More information

ENE 334 Microprocessors

ENE 334 Microprocessors Page 1 ENE 334 Microprocessors Lecture 7: MCS-51 Architecture I : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/ ENE 334 MCS-51 Architecture I Page 2 Outlines: 8051 Microcontroller Hardware

More information

CPEG300 Embedded System Design. Lecture 6 Interrupt System

CPEG300 Embedded System Design. Lecture 6 Interrupt System CPEG300 Embedded System Design Lecture 6 Interrupt System Hamad Bin Khalifa University, Spring 2018 Correction Lecture 3, page 18: Only direct addressing mode is allowed for pushing or popping the stack:

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP Digital Blocks Semiconductor IP 805 Microcontroller General Description The Digital Blocks Microcontroller Verilog IP Core is complaint with the MCS 5 Instruction Set and contains standard 805 MCU peripherals,

More information

Q 1 a) Attempt any THREE of the following: 12 TMOD.7 TMOD.6 TMOD.5 TMOD.4 TMOD.3 TMOD.2 TMOD.1 TMOD.0 GATE C/T M1 M0 GATE C/T M1 M0

Q 1 a) Attempt any THREE of the following: 12 TMOD.7 TMOD.6 TMOD.5 TMOD.4 TMOD.3 TMOD.2 TMOD.1 TMOD.0 GATE C/T M1 M0 GATE C/T M1 M0 Page 1 of 33 Q 1 a) Attempt any THREE of the following: 12 Q 1 a i) Describe Timer modes of 8051. Ans: Timer 0 and Timer 1 can both be used as either Counters or Timers. There are 4 different operating

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP 805 SFR Bus Digital Blocks Semiconductor IP 805 Microcontroller Configurable Peripherals General Description The Digital Blocks (Configurable Peripherals) Microcontroller Verilog IP Core is complaint with

More information

8051 Microcontroller Assembly Programming

8051 Microcontroller Assembly Programming 8051 Microcontroller Assembly Programming EE4380 Fall 2002 Class 3 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Topics Machine code 8051 Addressing Modes

More information

UNIT MICROCONTROLLER

UNIT MICROCONTROLLER Page UNIT-5 805 MICROCONTROLLER INTRODUCTION The microcontroller incorporates all the features that are found in microprocessor. The microcontroller has built in ROM, RAM, Input Output ports, Serial Port,

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP Digital Blocks Semiconductor IP DB805C-FSM 805 Microcontroller FSM Finite State Machine General Description The Digital Blocks DB805C-FSM IP Core contains Digital Blocks compact DB805C CPU Core & GPIO

More information

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization Program Memory The 80C51 has separate address spaces for program and data memory. The Program memory can be up to 64k bytes long. The lower 4k

More information

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation CoE3DJ4 Digital Systems Design Chapter 5: Serial Port Operation Serial port 8051 includes an on-chip serial port Hardware access to the port is through TXD and RXD (Port 3 bits 1 and 0) Serial port is

More information

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT- IV

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT- IV UNIT- IV PART A (2 MARK QUESTIONS) 1. What is the need for de-bouncing the keyboard? (AUC NOV 2012) Debouncing is any kind of hardware device or software that ensures that only a single signal will be

More information

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor Subject Name: Microprocessor and Microcontroller Year: 3 rd Year Subject Code: CS502 Semester: 5 th Module Day Assignment 1 Microprocessor

More information

Timer-1 can be run using the internal clock, fosc/12 (timer mode) or from any external source via pin T1 (P3.5) (Counter mode).

Timer-1 can be run using the internal clock, fosc/12 (timer mode) or from any external source via pin T1 (P3.5) (Counter mode). EC 6504 MICROPROCESSOR AND MICROCONTROLLER Electronics and Communication Engineering Fifth Semester UNIT-V Part A 1. List the modes of Timer in 8051. [N/D16] The timers available in 8051 are Timer 0 (T0)

More information

1. Attempt any three of the following: 15

1. Attempt any three of the following: 15 (2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Make suitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.

More information

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman Microprocessors 1 The 8051 Instruction Set Microprocessors 1 1 Instruction Groups The 8051 has 255 instructions Every 8-bit opcode from 00 to FF is used except for A5. The instructions are grouped into

More information

Q.1. A) Attempt any THREE of the following:

Q.1. A) Attempt any THREE of the following: Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

MCS -51 Programmer s Guide and Instruction Set

MCS -51 Programmer s Guide and Instruction Set MCS -51 Programmer s Guide and Instruction Set November 1992 Order Number 270249-003 COPYRIGHT INTEL CORPORATION 1996 MCS -51 PROGRAMMER S GUIDE AND INSTRUCTION SET CONTENTS PAGE MEMORY ORGANIZATION 1

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING EC6504 MICROPROCESSOR AND MICRO CONTROLLER

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING EC6504 MICROPROCESSOR AND MICRO CONTROLLER DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING EC6504 MICROPROCESSOR AND MICRO CONTROLLER UNIT - I : THE 8086 MICROPROCESSOR PART A (2 Marks) 1. What are different

More information

SOLUTION MANUAL FOR THE 8051 MICROCONTROLLER 4TH EDITION BY MACKENZIE AND PHAN

SOLUTION MANUAL FOR THE 8051 MICROCONTROLLER 4TH EDITION BY MACKENZIE AND PHAN SOLUTION MANUAL FOR THE 8051 MICROCONTROLLER 4TH EDITION BY MACKENZIE AND PHAN Chapter 1 - Introduction to Microcontrollers 1. (a)the first widely used microprocessor was the 8080. (b) The 8080 was introduced

More information

VRS570 32K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU VRS580 64K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU

VRS570 32K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU VRS580 64K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU VRS570 32K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU VRS580 64K Flash, 1kB RAM, 25~40MHz, 8-Bit MCU 1134 Ste Catherine Street West, Suite 900, Montreal, Quebec, Canada H3B 1H4 Tel: (514) 871-2447 http://www.goalsemi.com

More information

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly. Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale

More information

ENE 334 Microprocessors

ENE 334 Microprocessors Page 1 ENE 334 Microprocessors Lecture 9: MCS-51: Moving Data : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/ ENE 334 MCS-51 Moving Data Page 2 Moving Data: Objectives Use commands that

More information

Unit I. Introduction Microcontrollers and Embedded processors Overview of the 8051 Inside the 8051 Addressing Modes

Unit I. Introduction Microcontrollers and Embedded processors Overview of the 8051 Inside the 8051 Addressing Modes Unit I Introduction Microcontrollers and Embedded processors Overview of the 8051 Inside the 8051 Addressing Modes 1.1.1. Basic Introduction 1.1.1. Basic Introduction (contd.) 1.1.1. Basic Introduction

More information

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013) BHARATHIDASAN ENGINEERING COLLEGE III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013) FREQUENTLY ASKED QUESTIONS IN UNIVERSITY EXAMINATION PART A UNIT 1-8085 PROCESSOR 1. Draw the

More information