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

Size: px
Start display at page:

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

Transcription

1 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 priority Any IR can be assigned to highest priority In that case priority sequence will begin at that IR. e.g. IR 4 has highest priority then IR 0 IR 1 IR 2 IR 3 IR 4 IR 5 IR 6 IR lowest priority 0 Highest priority 2) Automatic Rotation Mode : In this mode, device after being serviced, receives the lowest priority. e.g. IR 4 is just being serviced IR 0 IR 1 IR 2 IR 3 IR 4 IR 5 IR 6 IR ) Specific Rotation Mode : This mode is similar to Automatic Rotation Mode except that the user can select any IR for the lowest priority, thus fixing all other priorities Addressing Modes : The addressing modes of 8051 are as follows: 1) Immediate addressing Mode: In this mode, data is present as a part of instruction. Here before data, # has to be used. For Eg: MOV A, # 44H 44H placed in A MOV DPTR, # 2500H 2500H placed in DPTR. MOV R2, # 0AAH AAH is placed in R2 reg. 2) Register Addressing Mode: In this type, the name of the register is specified in the instruction itself. The permitted registers are A, R7-R0 of each memory bank. MOV A, R0 move data in R0 into A. MOV R2, A move data in A into R2. 3) Direct Addressing Mode: In this type, the address of internal RAM ( 00 to 7F) and address of SFR ( 80 to FF) is given in the instruction. For Eg: MOV A, 21H the content of RAM loc 21H is moved into A. MOV A, 80H move data from port 0 into A. 4) Indirect Addressing Mode: In this type, registers R0 and R1 are called data pointers as they hold the address of internal RAM locations from (00)H to (7F)H. here, before R0 or is used. 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I 1

2 : T.E. MPMC_I 1. (c) For Example : MOV contents of internal RAM pointed by R0 is moved into A. #35H data 35 h is moved into RAM whose address is pointed by R1. Indirect addressing is also used for external RAM. For external addressing, indirect addressing is given by using R0 or R1 and by using DPTR. Here, a letter X is used in the mnemonic to indicate external RAM. For Example : MOVX move data from external RAM whose address is pointed by R1 is moved into A. [range is 00 FF]. DPTR, A move data from A into external RAM whose address is pointed by DPTR [range is 0000 to FFFF]. 5) Indexed Addressing Mode: It is used to access data in internal ROM and external ROM ( code memory). In this type, indirect address is given by using A with PC or A with DPTR. Here letter C is used in the mnemonic. For Example : MOVC A+DPTR content of memory location (Whose address is obtained by adding A & DPTR) is moved into A MOVC A+PC move contents of memory location (whose address is obtained by adding A with PC) is moved into A. Timing Diagram for I/O Read (Refer Figure (a)) Changes from Memory read : (1) The address is obtained from W, Z temporary register only. (2) IO / M is high and S o, S 1 is 0 1 indicate read operation. (3) The byte read from I/O device is loaded in accumulator only. T 1 T 2 T 3 T 1 T 2 T 3 CLK CLK ALE AD 0 AD 7 A 8 A 15 I0/M S 0 S 1 RD 8-bit Port Address DATA BYTE 8-Bit Port Address (Duplicated) ALE AD 0 AD 7 A 8 A 15 IO /M S 0 S 1 1 RD PORT ADD. (Z) from Acc. to I/O BYTE PORT ADDRESS (w) 1 WR WR Fig. (a) Fig. (b) /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

3 Timing Diagram for I/O Write (Refer Figure (b)) Changes from Memory Write : (1) The address is obtained from W, Z temporary registers only. (2) IO / M is high and S o, S 1 is 1 0 indicate write operation. (3) The byte to be written in I/O devices is taken from accumulator only. Prelim Question Paper Solution 1. (d) 2. (a) I/O Ports 8051 has four I/O ports: port 0, port 1, port2, port 3. Latch is used to control each port. Different opcode is used to access latch and port. The contents of latch is different from content of port. PORT 2: It is used as I/O port for data like port 1. It is also used to have higher byte memory address during memory expansion. Interrupts Interrupts of 8085 are divided into 2 types. 1. Hardware interrupts and 2. Software interrupts. Interrupt request generated by activating the available interrupt pins on 8085 are called hardware interrupts. The signal is initiated or activated by some external device or circuit which requires some service or attention. The service is provided by p by executing a special set of instructions written as an ISR (Interrupt Service Routine). If the programmer wants to execute a particular ISR at a point in the program then the programmer can write RST n instruction within the program so that the ISR is executed. Such a technique of activating the ISR by writing an instruction within program is called software interrupt. Hardware Interrupts : There are 5 hardware interrupt pins available on They are TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. i) TRAP : It is a non maskable interrupt having highest priority. It is edge as well as level sensitive. TRAP is a vectored interrupt. Its service routine starts from memory location 0024 H onwards. ii) RST 7.5 : It is edge sensitive interrupt. It has second highest priority amongst various interrupts. It is maskable through DI or through SIM instruction. RST 7.5 is a vectored interrupt and the location for its service routine is from 003CH onwards. iii) RST 6.5 and RST 5.5 : There are level triggered or level sensitive maskable interrupts. These can also be masked through DI or SIM instruction. Their level must be maintained high so as to get recognized by p. The priority of RST 6.5 and RST 5.5 is 3 rd and 4 th respectively. They are vectored interrupts and the address of their ISR is 0034 H and 002CH respectively. 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 3

4 : T.E. MPMC_I iv) INTR : It is a general purpose level triggered maskable interrupt. It can be masked through DI instruction. It should maintain high level to be recognized by p. It is a non vectored interrupt. Hence in order to get the information about the ISR address p sends INTA. i.e., Interrupt Acknowledge when p execute INTA cycle it expects RST n instruction or a CALL instruction from external hardware circuit or device. 2. (b) 3. (a) Instructions related to Interrupts : (1) EI (Enable Interrupt) : This instruction enables the maskable interrupts (which are not masked through SIM instruction). (2) DI (Disable Interrupt ) : This instruction disables (i.e. masks) all the maskable interrupts (All except TRAP). (3) SIM (Set Interrupt Mask) : This instruction is used to perform the following functions : i) To mask/unmask RST 7.5, RST 6.5 & RST 5.5 interrupts individually. ii) To clear any pending interrupt for RST 7.5 by clearing the RST 7.5 latch. (4) RIM (read interrupt mask) : This instruction gets the following information from interrupt control unit. i) Weather RST 7.5, RST 6.5 & RST 5.5 are internally masked or unmasked. ii) Weather RST 7.5, RST 6.5 & RST 5.5 are pending for service or not. iii) Weather interrupts are internally enabled or disabled. Crystal frequency = 6MHz Operating frequency = 3 MHz 1 1 loads pulse = = 0.33 sec 3MHz Delay = [10 + (FFFEH) ( ) ] 0.33 sec Since, loads pulses required by the instructions in given program are 10, 6, 4, 4, 4, 10 7 respectively). Delay = msec. and 10 Instruction Cycle The CPU fetches one instruction from the memory at a time and execute it. The essential steps required by CPU to fetch and execute an instruction is called as instruction cycle. Machin Cycle The time required by the microprocessor to complete the operation of accessing memory or Input / Output device is called as a machine cycle. T-state Microprocessor performs an operation in a specific time period i.e. specific clock cycles. Each clock cycle is called as T state. (i) (ii) (iii) (iv) (v) Instruction LDA address LX1 INR M RRC DAD H Mnemonic LDA address LX 1 R P, 16-bit data INR M RRC DAD H Operation A = R P = 16 bit (HL) = (HL) + 1 B n = B n + 1 HL = HL + HL (Address) data OR (M) = (M) + 1 (for n = to 6) B 7 = Cy = B 0 No. of bytes 3 bytes 3 bytes 1 bytes 1 bytes 1 bytes Machine 4 (OF + MR 3 (OF + MR + 3 (DF + MR + 1 (OF) 3 (OF + B1 + + MR + MR) MR) cycles Algorithm A (address) R P 16-bit data NW) M M + 1 or (HL) (HL) + 1 B n B n + 1 (for n = 0 to 6) B1) HL HL + HL /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

5 3. (b) Flags No flags are affected. No flags are affected. All the flags except carry are modified. Prelim Question Paper Solution B 7 B 0, Cy B 0 Only the carry Only carry flag flag is affected. is affected. No All other flags other flags are are unmodified. modified to reflected the result of operation. Implied address Register address mode mode Addressing Direct Immediate Indirect address mode address mode address mode mode T-State 13 ( ( ) 10 ( ) 4 10 ( ) + 3) IC 8254 can be used as square wave generator and divide by n counters by operating it in modes 3 and 2. For this, 8254 has be configurid using CWR. Mode 2 : Rate Generation 1. It is a divide by n counter. 2. OUT pin is initially high after control word is written. 3. OUT pin goes low only for 1 clock cycle when count value becomes When GATE is low counting stops and OUT pin forced high. Counter starts from initial count when rising edge arrives at GATE and it can be used to synchronize counter (Case 2). 5. If counter is reloaded with new count then present period is not affected. Counter starts counting with new count only after current count gets over. 6. As it is a generator, it gives continuous waveform. CLK WR Case 1: GATE OUT Case 2 : GATE OUT 1 n = / / / / /3 2 1 Mode 3 : Square Wave generator 1. OUT pin remains high for half of the count and low for remaining half of the count; if even count is loaded. 2. If ODD count is loaded, then OUT pin remains high for n 1 counts and low for n counts where n is the value of count loaded. 3. For even count, count decrements by 2 on falling edge of every clock pulses (Case 1). 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 5

6 : T.E. MPMC_I 4. (a) 4. For ODD count on first clock pulse count decrements by 1 and on subsequent clock pulses count decrements by 2. After Terminal count, OUT pin goes low and on first clock pulse count decrements by 3 and on subsequent clock pulses count decrements by 2. (Case 2) 5. On reaching Terminal count pin changes the state, counter is reloaded and process repeats. 6. High level at gate is must for counting. Low level at GATE disables counting and forces OUT pin high. Rising edge at GATE reloads the counter and counting starts. 7. If reloaded with new values, then present period is not affected new value is consider only after present count gets over. It gives continuous waveform being a generator 8. Thus counter of 8254 can work as a square wave generator where period can be controlled by changing the value of count. CLK Special Function Registers: SFRS Address range from 80 to FF H are given to special function registers. Not all of the addresses from 80 to FF H are used for SFRs, and attempting to use an address that is not defined, results in unpredictable results. Following are the SFRs with their internal RAM addresses and utility. i) A Accumulator, Address 0E0 H. ii) B Address iii) DPTR DPH DPL iv) PSW Address WR Case 1 : 1 even GATE count 0 Case 2 : odd count OUT OUT Arithmetic, 0F0 H External data pointer, 83 H 82 H Program status word, 0D0H v) SP Stack pointer, Address 81 H n n = 6 LASTCOUNT n = 7 LASTCOUNT / / /6 n/2 C.C n/2 C.C / / /7 n 1 C.C n 1 2 C.C 2 vi) SBUF Serial port data buffer, Address 99 H. Utility: It is used to hold data byte which is to be transmitted serially hold the data byte received /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

7 Prelim Question Paper Solution vii) TMOD Address viii)tcon Address Timer/Counter mode control, 89 H Timer/Counter control, 88 H ix) SCON Address Serial port control, 98 H x) IE Interrupt enable control, Address 0A8 H EA: ET2: ES: ETX: EA - ET2 ES ET1 EX1 ET0 EX0 Enable interrupt bits. Cleared to 0 by program to disable all interrupts. Set to 1 to enable interrupts. Reserved for future use. Enable serial port interrupt, 1: enable 0: disable. Enable timer X overflow interrupt, 1: enable 0: disable. EX1/0:Enable external interrupt 1/0, 1: enable 0: disable. xi) IP register: ( Address 0B8 H) - - PT2 PS PT1 PX1 PT0 PX0 PT2: Reserved for future use. PS: Priority of serial port interrupts. Set/ cleared by program. PTX: Priority of timer X overflow interrupts. PX1/0:Priority of external interrupts 1/0. xii) P0 80 H PORT 0 P1 90 H PORT 1 P2 0A0 H PORT 2 P3 0B0 H PORT 3 xiii) Some of the SFRs are bit addressable also. E.g. CLR A ( byte operation) SETB 0E3 H ( bit operation) Set only bit 3 of accumulator. Other bits are not affected. 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 7

8 : T.E. MPMC_I 4. (b) : 5. (a) 5. (b) : Single Stepping Mode : Single Stepping Operation is implemented in 8051 by using software. In this technique, at a time only one instruction of main program is executed. This is possible in 8051 because interrupt structure of 8051 has 2 properties. a) When 8051 is executing an ISR, it will not respond to another interrupt of equal or lower priority. b) After executing RETI 8051 will execute one instruction of main program and only then it responds to interrupt request. To implement this, following steps are used. a) Make INTO low level triggered. b) Make INTO highest priority. ( IP reg. ). c) The last 3 statements in ISR are given by ISR corresponding to INTO HERE JNB P3.2, HERE Wait state till INTO SAME JB P3.2, SAME goes high to low RET1 Return to main program If second instruction is not there, then only some instruction will be debugged. The INTO pin [P3:2] is kept low normally after executing n th instruction enters ISR of INT0, 8051 stays in this ISR until Wait state till INTO is pulsed [low to high and high to low]. Now, 8051 executes RETI and then execute main program. After this it again enters into the same ISR stays in this ISR until INTO is pulsed again i.e. one step of main program is executed. Each time INTO is pulsed single stepping operation takes place. i) SCON SFR : SM0 SM1 SM2 REN TB8 RB8 TI RI SM0, SM1: SM0 SM1 MODE DESCRIPTION SHIFT REG BIT UART BIT UART BIT UART /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

9 6. (a) Prelim Question Paper Solution SM2: Multiprocessor communication bit. When set to 1, an interrupt is generated if bit 9 of the received data is 1, no interrupt is generated if bit 9 is 0. If set to 1 for mode 1, no interrupt is generated unless a valid stop bit is received. Cleared to 0 if mode 0 is in use. REN: Receive Enable Bit. Set to 1 to enable reception, cleared to 0 to disable reception. TB8: Transmitted bit 8. Set / Cleared by program in modes 2 and 3. RB8: Received bit 8. Bit 8 of received data in modes 2 & 3, stop bit in mode 1. Not used in mode 0. TI: Transmit Interrupt Flag. Set to 1 at the end of bit 7 time in mode 0 and at the beginning of stop bit time for other modes. Must be cleared by program. RI: Receive Interrupt Flag. Set to 1 at the end of bit 7 time in mode 0 and halfway through the stop bit time for other modes. Must be cleared by program. ii) PCON SFR: SMOD GF1 GF0 PD IDL SMOD: Serial baud rate modify bit. Set to 1 by program to double baud rate using timer 1 for modes 1, 2 and 3. Cleared to 0 by program to use timer 1 baud rate. f baud = 2 SMOD x frequency. The following steps show the 8051 connection to the stepper motor and its programming. 1. Use an ohmmeter to measure the resistance of the leads. This should identify which COM leads are connected to which winding leads. 2. The common wire(s) are connected to the positive side of the motor's power supply. In many motors, +5 V is sufficient. 3. The four leads of the stator winding are controlled by four bits of the 8051 port (P l.0 P1.3). However, since the 8051 lacks sufficient current to drive the stepper motor windings, we must use a driver such as the ULN2003 to energize the stator. Instead of the ULN2003, we could have used transistors as drivers, as shown in figure (1). However, notice that if transistors are used as drivers, we must also use diodes to take care of inductive current generated when the coil is turned off. One reason that using the ULN2003 is preferable to the use of transistors as drivers is that the ULN2003 has an internal diode to take care of back EMF. MOV A,#66H ;load step sequence BACK: MOV P1,A ;issue sequence to motor RR A ;rotate right clockwise ACALL DELAY ;wait 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 9

10 : T.E. MPMC_I 6. (b) SJMP BACK... DELAY MOV R2,#100 Hl: MOV R3,#255 H2: DJNZ R3,H2 DJNZ R2,H1 RET [ ;keep going Steps per second and rpm relation Change the value of DELAY to set the speed of rotation. We can use the single-bit instructions SETB and CLR instead of RR A to create the sequences. The relation between rpm (revolutions per minute), steps per revolution, and steps per second is as follows. Steps per second = rpm Steps per revolution 60 Fig. 1 : 8051 Connection to Stepper Motor 8255 Functional Block Diagram (40 pin IC) 8255 is a programmable peripheral interface (PPI) (i.e., it is a general purpose programmable parallel I/O device). It contains 3 8 bit input/output ports which can be programmed in different modes. To programme the function of these ports 8255 contains a register called control register. Modes/functions of 8255 BSR (Bit Set Reset Mode) [For port C only] Input /Output Mode (I/O) Mode 0 Mode 1 Mode 2 Simple I/O Strobed I/O Bidirectional [For ports A, B & C] (or Handshake I/O) [For port A only] [For ports A & B] Note : Port C bits Note : Port B can are used for be in mode 0 or1 handshake with port A in signals. mode 2 and port C is used for hand shake signals /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

11 Prelim Question Paper Solution RD WR A 1 A o Reset 7. (a) Bidirectional Data Bus D 0 D 7 8 bits Power Supplies CS +5V V Data Bus Buffer Read / Write Control Logic Group A Control 8 bit internal data bus Group B Control Group A Port A (8 bits) Group A Port C Upper (4 bits) Group B Port C Lower (4 bits) Group B Port B (8 bits) PA o PA 7 PC 4 PC 7 PC o PC 3 The 3-stage pipeline ARM processors up to the ARM7 employ a simple 3-stage pipeline with the following pipeline stages : Fetch The instruction is fetched from memory and placed in the instruction pipeline. Decode The instruction is decoded and the datapath control signals prepared for the next cycle. In this stage, the instruction owns the decode logic but not the datapath. Execute The instruction owns the datapath: (i) The register bank is read. (ii) An operand is shifted. (iii) The ALU result is generated, and written back into a destination register. I/O I/O I/O PB o PB 7 I/O 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 11

12 : T.E. MPMC_I 7. (b) Fig. 1: ARM single-cycle instruction 3-stage pipeline operation. At any one time, three different instructions may occupy each of these stages, so the hardware in each stage has to be capable of independent operation. When the processor is executing simple data processing instructions the pipeline enables one instruction to be completed every clock cycle (that is, the throughput is one instruction per cycle), although an individual instruction takes three clock cycles to complete, that is, it has a three-cycle latency. When a multi-cycle instruction is executed, as illustrated in figure, the pipeline flow is less regular. Fig.: ARM multi-cycle instruction 3-stage pipeline operation. The cycle colored in yellow is accessing main memory, so it can be seen that memory is used in every cycle. The datapath is likewise used in every cycle, being involved in all the execute cycles, the address calculation and the data transfer. The decode logic is always generating the control signals for the datapath to use in the next cycle, so in addition to the explicit decode cycles, it is also generating the control for the data transfer during the address calculation cycle of the STR. Rotate Instructions 1. RAL (Rotate Accumulator Left with carry) D CF 7 D6 D5 D4 D3 D2 D1 D0 This instruction rotates the contents of accumulator left by one bit position including carry. The D 0 th bit enters into D 1 th bit position, D 1 into D 2, D 2 into D 3 and so on D 6 into D 7, the D 7 th bit enters into carry flag and the carry flag enters into D 0 th bit. Width : 1 byte /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

13 Prelim Question Paper Solution Addressing : implied addressing. Flags affected : only carry Machine cycle : 1 (op code fetch) T states : 4 2. RLC (rotate accumulator left without carry) CF D 7 D6 D5 D4 D3 D2 D1 D0 This instruction rotates the contents of accumulator left by one bit position without including carry. The D 0 th bit enters into D 1 th bit position, D 1 into D 2, D 2 into D 3 and so on D 6 into D 7, the D 7 th bit enters into D 0 th bit and also in carry flag. Width : 1 byte Addressing : implied addressing. Flags affected : only carry. Machine cycle : 1 (op code fetch) T states : 4 3. RAR (Rotate accumulator right with carry) CF D 7 D6 D5 D4 D3 D2 D1 D0 This instruction rotates the contents of accumulator right by one bit position including carry. The D 7 th bit enters into D 6 th bit position, D 6 into D 5, D 5 into D 4 and so on D 1 into D 0, the D 0 th bit enters into carry flag and the carry flag enters into D 7 th bit. Width : 1 byte Addressing : implied addressing. Flags affected : only carry. Machine cycle : 1 (op code fetch) T states : 4 4. RRC. (Rotate accumulator right without carry) D 7 D6 D5 D4 D3 D2 D1 D0 This instruction rotates the contents of accumulator right by one bit position without including carry. The D 7 th bit enters into D 6 th bit position, D 6 into D 5, D 5 into D 4 and so on D 1 into D 0, the D 0 th bit enters into D 7 th bit and also into carry flag. Width : 1 byte Addressing : implied addressing. Flags affected : only carry. Machine cycle : 1 (op code fetch) T states : 4 CF 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 13

14 : T.E. MPMC_I 7. (c) 7. (d) Memory Mapped I/O i) Instead of memory, I/O device is connected in the memory map. ii) All 20 address lines of 8086 are used in this technique. Hence upto 2 20 = 1 MB devices can be connected. iii) Memory related control signals like memory read, memory write are used for interacting with I/O devices. iv) All instructions related to memory access are used for accessing data from I/O device. v) All memory related addressing modes can be used vi) Some memory space is used for connecting I/O devices. Hence effective memory capacity is less than 1 MB. vii) Efficiency of I/O access is less as memory related instructions are used for accessing I/O devices. I/O mapped I/O (Isolated I/O) i) Separate I/O space is utilised in this technique. ii) Only 16 address lines are active in I/O mapped I/O. Hence upto 2 16 = 64K devices can be connected. iii) I/O related control signals like I/O read and I/O write are used for interacting with I/O devices. iv) Dedicated instructions, IN and OUT are used for accessing data from I/O devices. v) Only I/O related addressing modes are available (direct I/O, Indirect I/O) vi) Separate address space is used for connecting I/O devices. Hence effective memory capacity is 1 MB. vii) IN and OUT instructions are designed for high throughput. Hence accessing I/O is efficient. Baud rate in the 8051 The 8051 transfers and receives data serially at many different baud rates. The baud rate in the 8051 is programmable. This is done with the help of Timer 1. Before we discuss how to do that, we will look at the relationship between the crystal frequency and the baud rate in the The 8051 divides the crystal frequency by 12 to get the machine cycle frequency. In the case of XTAL = MHz, the machine cycle frequency is khz ( MHz /12 = khz). The 8051's serial communication UART circuitry divides the machine cycle frequency of khz by 32 once more before it is used by Timer l to set the baud rate. Therefore, khz divided by 32 gives 28,800 Hz. This is the number we will use throughout this section to find the Timer l value to set the baud rate. When Timer l is used to set the baud rate it must be programmed in mode 2, that is 8-bit, auto-reload. To get baud rates compatible with the PC, we must load TH l with the values shown in Table 2. Example 4 shows how to verify the data in Table 2. Table 2 : Timer 1 TH1 Register Values for Various Baud Rates Baud Rate TH1 (Decimal) TH1 (Hex) FD FA F E8 Note: XTAL = MHz. Example : With XTAL = MHz, find the TH l value needed to have the following baud rates, (a) 9600 (b) 2400 (c) 1200 Soln.: With XTAL= MHz, we have : /Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC_I

15 Prelim Question Paper Solution The machine cycle frequency of the MHz /12 = khz, and khz / 32 = 28,800 Hz is the frequency provided by UART to Timer l to set baud rate. (a) 28,800 / 3 = 9600 where -3 = FD (hex} is loaded into TH1 (b) 28,800 /12 = 2400 where -12 = F4 (hex) is loaded into TH1 (c) 28,800 / 24 = 1200 where -24 = E8 (hex) is loaded into TH1 7. (e) Notice that 1/12th of the crystal frequency divided by 32 is the default value upon activation of the 8051 RESET pin. We can change this default setting. This is explained at the end of this chapter kHz XTAL oscillator 12 Machine cycle freq khz by UART Methods of Parameter Passing : 1) Parameter passing through register : If parameters to pass are few then registers can be used to pass parameter. Parameters are stored in registers before the subroutine is called. The subroutine processes these parameters and gives the result back either in same registers or in different registers. e.g. : The main program can load the registers with multiplicand and multiplier and then calls a subroutine that multiplies the 2 numbers and sends back the results in either the same registers or in different registers. 2) Parameter passing through reserved memory locations : If many parameters are to be passed, then they are stored in specific locations reserved earlier and then subroutine is called which processes them and sends back the result through same or different memory locations. 3) Parameter passing through memory pointers : If memory location needed to pass the parameter, cannot be fixed then memory pointer can be used as parameter. Through a register pair microprocessor can pass the memory pointer to a subroutine which indicate the starting address for the stored parameters. The subroutine processes them and returns the result either through registers or memory locations. 4) Parameter passing through stack memory : Stack can also be used to pass parameters. Appropriate program should be written for this technique. The parameters to be passed are first pushed into stack and then subroutine is called. The subroutine pops out the parameters and processes them. The result can also be passed through stack memory. 28,800 Hz To Timer 1 to set the baud rate 1113/Engg/TE/Pre Pap/2013/ETRX/Soln/MPMC 15

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

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

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

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

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

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

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

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

Subject Code: Model Answer Page No: /25

Subject Code: Model Answer Page No: /25 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

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

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

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

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

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

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK Subject Code : EC307 Subject Name : Microprocessor and Interfacing Year & Sem : III Year, V Sem

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

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

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

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

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

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

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks) QUESTION BANK EE 6502 / Microprocessor and Microcontroller Unit I- 8085 Processor PART-A (2-Marks) YEAR/SEM : III/V 1. What is meant by Level triggered interrupt? Which are the interrupts in 8085 level

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

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

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

Pin Description, Status & Control Signals of 8085 Microprocessor

Pin Description, Status & Control Signals of 8085 Microprocessor Pin Description, Status & Control Signals of 8085 Microprocessor 1 Intel 8085 CPU Block Diagram 2 The 8085 Block Diagram Registers hold temporary data. Instruction register (IR) holds the currently executing

More information

Micro Processor & Micro Controllers

Micro Processor & Micro Controllers Micro Processor & Micro Controllers 1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions. 2. What are the basic units of microprocessor?

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

MCS-51 Serial Port A T 8 9 C 5 2 1

MCS-51 Serial Port A T 8 9 C 5 2 1 MCS-51 Serial Port AT89C52 1 Introduction to Serial Communications Serial vs. Parallel transfer of data Simplex, Duplex and half-duplex modes Synchronous, Asynchronous UART Universal Asynchronous Receiver/Transmitter.

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

Microprocessor Architecture

Microprocessor Architecture Microprocessor - 8085 Architecture 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

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

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

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

Lecture Note On Microprocessor and Microcontroller Theory and Applications

Lecture Note On Microprocessor and Microcontroller Theory and Applications Lecture Note On Microprocessor and Microcontroller Theory and Applications MODULE: 1 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip

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

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

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

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

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions. Downloaded from www.books4career.blogspot.com 1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions. 2. What are the basic units

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

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

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

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI EE2354- MICROPROCESSORS AND MICROCONTROLLER UNIT I 8085 and 8086 PROCESSOR PART A 1. Define

More information

Vidyalankar. Vidyalankar T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution. 1. (a)

Vidyalankar. Vidyalankar T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution. 1. (a) 1. (a) Step 1 : Total EPROM required Chip size available No.of chips required = 2 T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution = 64 KB = 32 KB No.of sets required = 2 1 2 Set 1 = Ending

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

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families The Microcontroller Lecture Set 3 Architecture of the 8051 Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports. In most cases, all that is

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

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

Chapter 1: Basics of Microprocessor [08 M]

Chapter 1: Basics of Microprocessor [08 M] Microprocessor: Chapter 1: Basics of Microprocessor [08 M] It is a semiconductor device consisting of electronic logic circuits manufactured by using either a Large scale (LSI) or Very Large Scale (VLSI)

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

8051 Serial Communication

8051 Serial Communication 8051 Serial Communication Basics of serial communication Parallel: transfers eight bits of data simultaneously over eight data lines expensive - short distance fast Serial : one bit at a time is transferred

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

Serial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07)

Serial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07) Serial I-O for 8051 Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai 400 076 (version 14/10/07) 1 Motivation Serial communications means sending data a single bit at a time. But

More information

The Final Word on 8051 Microcontroller

The Final Word on 8051 Microcontroller The Final Word on 8051 Microcontroller This is a book about the Intel 8051 microcontroller and its large family of descendants. It is intended to give you, the reader, some new techniques for optimizing

More information

8051 Memory Organization BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter 1: Memory Organization There are 2 types of memories available in 8051 microcontroller. Program memory/c code memory (ROM)

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

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

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

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

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

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

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

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

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

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

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

Interrupt is a process where an external device can get the attention of the microprocessor. Interrupts can be classified into two types:

Interrupt is a process where an external device can get the attention of the microprocessor. Interrupts can be classified into two types: 8085 INTERRUPTS 1 INTERRUPTS Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process is asynchronous. Classification

More information

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks) MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI-621213. UNIT I THE 8085 & 8086 MICROPROCESSORS PART A (2 Marks) 1. Give the significance of SIM and RIM instruction available in 8085. [NOV/DEC 2006] Instruction

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

Topics. Interfacing chips

Topics. Interfacing chips 8086 Interfacing ICs 2 Topics Interfacing chips Programmable Communication Interface PCI (8251) Programmable Interval Timer (8253) Programmable Peripheral Interfacing - PPI (8255) Programmable DMA controller

More information

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING UNIT 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

EASWARI ENGINEERING COLLEGE DEPARTMENT OF ELECTRONICS AND COMMUNICATION QUESTION BANK - V SEMESTER ECE EC2304 MICROPROCESSORS AND MICROCONTROLLERS UNIT I 1. When the 8086 processor is in minimum mode and

More information

Interrupts. by Rahul Patel, Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

Interrupts. by Rahul Patel, Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar Chapter 12 Interrupts by Rahul Patel, Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar Microprocessor & Interfacing (140701) Rahul Patel 1 Points to be Discussed 8085 Interrupts

More information

Types of Interrupts:

Types of Interrupts: Interrupt structure Introduction Interrupt is signals send by an external device to the processor, to request the processor to perform a particular task or work. Mainly in the microprocessor based system

More information

User s Manual, V 0.1, Jan 2005 XC800. Microcontroller Family Architecture and Instruction Set. Microcontrollers. Never stop thinking.

User s Manual, V 0.1, Jan 2005 XC800. Microcontroller Family Architecture and Instruction Set. Microcontrollers. Never stop thinking. User s Manual, V 0.1, Jan 2005 XC800 Microcontroller Family Architecture and Microcontrollers Never stop thinking. Edition 2005-01 Published by Infineon Technologies AG, St.-Martin-Strasse 53, 81669 München,

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web:     Ph: Serial : LS2_EE_S_Microprocessors_2688 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: -452462 CLASS TEST 28-9 ELECTRICAL ENGINEERING

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

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

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

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

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

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

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

UNIT - II PERIPHERAL INTERFACING WITH 8085

UNIT - II PERIPHERAL INTERFACING WITH 8085 UNIT - II PERIPHERAL INTERFACING WITH 8085 Peripheral Interfacing is considered to be a main part of Microprocessor, as it is the only way to interact with the external world. The interfacing happens with

More information

8051 MICROCONTROLLER

8051 MICROCONTROLLER What is a Microcontroller? UNIT 5 8051 MICROCONTROLLER A Microcontroller is a programmable digital processor with necessary peripherals. Both microcontrollers and microprocessors are complex sequential

More information

SN8F5000 Family Instruction Set

SN8F5000 Family Instruction Set SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK Course Name Course Code Class Branch INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 04 ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK : Microprocessors and Microcontrollers :

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

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

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

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

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

1. What is Microprocessor? Give the power supply & clock frequency of 8085? 1. What is Microprocessor? Give the power supply & clock frequency of 8085? A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a storage device called memory

More information

8085 Interrupts. Lecturer, CSE, AUST

8085 Interrupts. Lecturer, CSE, AUST 8085 Interrupts CSE 307 - Microprocessors Mohd. Moinul Hoque, 1 Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device

More information

ELECTRICAL ENGINEERING

ELECTRICAL ENGINEERING Serial : 1. JP_EE_Microprocessor_130618 CLASS TEST Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 011-45124612 ELECTRICAL ENGINEERING

More information

C51 Family. C51 Family Programmer s Guide and Instruction Set. Summary

C51 Family. C51 Family Programmer s Guide and Instruction Set. Summary C51 Family Programmer s Guide and Instruction Set Summary 1. Memory Organization.................................................... I.3.2 1.1. Program Memory.......................................................................

More information

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY CHAPTER 5 : Introduction to Intel 8085 Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY The 8085A(commonly known as the 8085) : Was first introduced in March 1976 is an 8-bit microprocessor with 16-bit address

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

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Programming in Assembly Module No: CS/ES/12 Quadrant 1 e-text

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Programming in Assembly Module No: CS/ES/12 Quadrant 1 e-text e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Programming in Assembly Module No: CS/ES/12 Quadrant 1 e-text In this lecture, serial communication control register

More information