Tuesday, September 13, 2011

Micro-controller : Assignment 1

ASSIGNMENT 1

Microcontrollers and Applications

Short Question Type:

1 How many ports are present in 8051 and by default these ports are output or input?

2 What is the starting address of the SP and where the 1st data element in the stack going to be stored?

3 If 16MHz signal is connected to the XTAL1 pin, then calculate the time period of the each cycle.

4 Describe the PSW of 8051?

5 What is the default register bank in the 8051? If we want to change to other bank what instruction can perform this task, explain?

6 What is the meaning of the term DB, ORG, END and EQU related to the 8051 assembly language programming?

7 A given 8051 has 7FFFH as the address of its last location of on-chip ROM. What is the size of on-chip ROM for this 8051?

8 Write a program to save registers A and B on R3 and R5 of bank 2, respectively.

9 Name any three special function registers of 8051.

10 What is the size of the stack memory in 8051 and what is the size of the stack pointer register?

11 Give the address location of RAM assigned to various register banks in 8051 microcontroller.

12 What is the difference between 8031 and 8051 microcontrollers?

13 What is the advantage in using EQU directive to define a constant value? How many bytes are set aside by each of the following directives in 8051 microcontroller? (a) ASC_DATA: DB “1234” (b) MY_DATA: DB “ABC 1234”

Long Question Type:

1. In the 8051 MCU, each interrupt service routine (ISR) is allocated 8 bytes of program area. Describe how you can implement an ISR that requires more than 8 bytes.

2. Explain the RAM structure of a 8051 MCU and also the use of register banks.

3. It is desired to generate a square wave on P1.2 of 8051 microcontroller. Assuming XTAL=11.0592MHz, determine the highest square wave frequency that can be generated using Mode 1 programming of the timer of 8051 microcontroller.

4. Write an assembly language program for 8051 to find the sum of the values 78H, F5H and E2H. Put the sum in registers R0 ( low byte ) and R5 ( high byte ). (5)

5. Write an assembly language program for 8051 microcontroller to create a square wave of 50% duty cycle on bit 0 of port 1? (5)

6. What are the addressing modes of 8051? Give examples.

7. Write an assembly language program for 8051 microcontroller to copy the value 55H into RAM memory locations 40H to 45H using

a. Direct addressing mode

b. Register indirect addressing mode without a loop.

c. With a loop

8. Given below a sample program written for 8051. What will the contents of the accumulator after the execution of the following instruction?

MOV A, #CDH

RR A

CPL A

SWAP A

Micro-controller : Lesson Plan

LESSON PLAN of

(PEEI5401) MICROCONTROLLERS AND APPLICATION


Credit : 3

Total Number of Lecture According to BPUT : 36

Total Number of Lecture According to Lesson Plan : 40

MODULE 1

Lec. No.

Topic to be cover

Reference

1

Introduction to Microcontrollers: Introduction,

Microcontrollers and Microprocessors, History of Microcontrollers and Microprocessors, Embedded v/s External Memory Devices, CISC and RISC Processors.

TB: 1.1-1.6

2

Introduction to Microcontrollers: Harvard and Von Neumann Architectures, Commercial Microcontroller Device (MCS-51 Family, ATMEL Family and PIC Family)

TB: 1.7, 1.8

3

8051 Microcontrollers: Features, Registers (A, B, R0-R7, SFR, PSW, PC, SP, DPTR etc.).

TB: 2.1,2.3

4

8051 Microcontrollers: Architecture, Pin Description and Connection.

TB: 2.2, 3.1, 3.2

5

8051 Microcontrollers: Parallel I/O Ports, Memory Organisation

TB: 3.3, 3.4

6

8051 Addressing Modes, 8051 Instruction Set: Data Transfer Instruction

TB: 4.1, 4.2

7

8051 Instruction Set: Arithmetic Instruction Set, Logical Instruction Set, Boolean Variable Manipulation Instruction Set

TB: 4.2

8

8051 Instruction Set: Program Branching Instruction Set, Programming Example.

TB: 4.2, 4.3

9

8051 Assembly Language Programming Tools, 8051 Interrupts

TB: 5, 6.1, 6.2

10

8051 Timers and Counters ( Mode 0 and Mode 1)

TB: 6.3

11

8051 Timers and Counters ( Mode2 and Mode 3)

TB: 6.3

12

8051 Serial Communication

TB: 6.4

MODULE 2

Lec. No.

Topic to be cover

Reference

13

Design With ATMEL Microcontrollers: 89CXX and 89C20XX, Overview of 89C51 and 89C2051, Pin Description

TB: 7.1-7.3

14

Design With ATMEL Microcontrollers: Power Saving Options, Precision Analog Comparison in 89C2051.

TB: 7.4, 7.5

15

Application of MCS-51 and ATMEL: Square, Rectangular and Pulse wave generation.

TB: 8.1-8.4

16

Application of MCS-51 and ATMEL: Pulse Width Modulation, Staircase Ramp and Sine Wave Generation, Pulse Width Measurement and Frequency Counter.

TB: 8.5-8.9

17

PIC 16C6X/7X: Features, Comparison of 16C61, 16C71, 16C66 and 16C74.

TB: 9.1

18

PIC 16C6X/7X: Register Structure, FSR, INDF etc and Pin Description

TB: 9.2

19

PIC 16C6X/7X: Reset Action, Oscillator Connection, Program Memory and Data Memory, OPTION and INTCON Register.

TB: 9.3-9.5

20

PIC 16C6X/7X Instruction Sets and Examples

TB: 9.6

21

22

PIC 16C6X/7X Addressing Modes, Interrupts in PIC

TB: 9.7-9.9

23

PIC 16C6X/7X Timers and ADC

TB: 9.10,9.11

24

PIC 16F8XX Flash Microcontroller: Features, Pin Description

TB: 10.1, 10.2

25

PIC 16F8XX Flash Microcontroller: STATUS, PCON and OPTION Registers, Programme and Data Memory.

TB: 10.3- 10.8

26

PIC 16F8XX Flash Microcontroller: Interrupts (INTCON, PIE1, PIE2, PIR1 and PIR2 Registers)

TB: 10.9

27

PIC 16F8XX Flash Microcontroller: I/O Ports (TRISX Registers)

TB: 10.10

28

PIC 16F8XX Flash Microcontroller: Timers (T1CON and T2CON Registers)

TB: 10.11

MODULE 3

Lec. No.

Topic to be cover

Reference

29

Interfacing & Applications: Pushbuttons, LEDs, Electromechanical Relay and Latch Operation.

TB: 12.1-12.2

30

Interfacing & Applications: 8051 External Programme Memory and Data Memory Access, Keyboard Interfacing and 7-Segment Display Interfacing

TB: 12.2 – 12.4

31

Interfacing & Applications: LCD Interfacing and ADC/DAC Interfacing

TB: 12.5, 12.6

32

Industrial Applications: Sensing Robot Arm Position, Optical Rotary Shaft Encoders, LVDT

TB: 13.1, 13.2

33

Industrial Applications: RPM Meter, Digital Thermometer

TB: 13.2

34

Industrial Applications: RTD and Thermocouple Linearization, Load Cell

TB: 13.2

35

Industrial Applications: Digital PID Controller

TB: 13.3

36

Industrial Applications: Power Controlling Device

TB: 13.3

37

Industrial Applications: Stepper Motor Drive

TB: 13.3

38

Advance Programming and Math Calculations: Fixed Point Numbers, Addition of Two 16-bit Numbers, Unsigned 32-bit Addition, Subtraction of Two 16-bit Numbers,

TB: 14.1 – 14.5

39

Advance Programming and Math Calculations: Conversion of 8-bit Signed Number to 16-bit Signed Number, 16-bit Signed Addition, Binary to BCD Conversion,

TB: 14.6 – 14.8

40

Advance Programming and Math Calculations: Square Root calculations, Integration, Differentiation, Floating Point Arithmetic

TB: 14.9 – 14.12

Text Book:

Ajay V. Deshmukh, Microcontrollers [Theory and Applications], TMH, New Delhi, 2005.

Reference Book:

Mazdi and Mazdi, The 8051 Microcontroller and Embedded Systems using Assembly and C, 2nd Edition, Pearson Educations, 2008.

Microprocessor : Assignment 3

Microprocessor (PCEC4301), 5th Sem. EIE Assignment -3

Short Question Type:

1 What are the different modes of operation are present in 8255?(BPUT 07)

2 Which bits of control word determine the modes of operation? (BPUT 08)

3 Design the control word for Port A used as bidirectional I/O and Port B used as Handshake Input.

4 What are the different modes of operation supported by 8254?

5 Explain the rate generator mode of 8254.

6 8254 operate in mode 3 and loaded with the decimal value 15. Determine the time period of square wave? (clk=1.19318MHz, Gate=+5V).

7 What are the different modes of operation can operate by 8237?

8 Specify the control word and the command word for data communication using 8251 with the following specification:

a. Asynchronous mode

b. 1200 baud (TxC# = RxC# = 76.8 kHz)

c. 8-bit character

d. Even parity

e. One stop bit

9 What are the modes of operation of 8279?

10 Explain the instruction cycle?

11 What do you mean by Machine language program and Assembly language program.

12 What do you mean by bus in microprocessor? Also list out different bus present in microprocessor system.

13 What is tristate bus?

14 Name some 8-bit, 16-bit and 32-bit microprocessor.

15 Name one bit-slice processor and why it is different from the microprocessor.

16 What is 8051? Also write some feature of this chip.

17 Write some feature of T-800 T-30 transputer.

Long Question Type:

1 What control word must be written into the control register of the 82C55A such that Port A is configured for bidirectional operation and Port B is set up with mode 1 outputs? Write a sequence of instructions needed to load the control register of an 82C55A with the above control word. Assume that the control register of 82C55A resides at address 0FH of the I/O address space. (BPUT 2009)

2 Design an interface for one input and one output device using I/O mapped I/O scheme using 8255 PPI mode-1. Write a program to read a data byte from input device, if it is less than 10H transfer 00H to output device else transfer FFH.(BPUT 2008)

3 Design an interfacing circuit for generation of a square wave using the 8254 and 8086.

4 Draw the interfacing diagram of 8237 and 8086. Explain the operation of 8237.

5 Design the interfacing diagram of 8251 and 8086. Write initialization instructions to set up 8251 for the asynchronous mode, 300 baud, and 7-bit character with no parity where the clock connected to RxC# and TxC# will be 4.8 kHz.

6 Explain the architecture of 8279.

7 Explain the different data transfer scheme related to I/O device.

8 Write short notes on:

a. Pipelining b. Cache Memory

c. Memory Management d. Virtual memory System