You are on page 1of 4

MAR BASELIOS INSTITUTE OF TECHNOLOGY AND SCIENCE

B. Tech S4 (MINOR) INTERNAL EXAM-II, September 2021


ECT282-MICROCONTROLLERS
Scheme & Answer Key

Part A

Q. No Question Marks

1. To write an ALP for 8051 microcontroller to find the sum of 10 numbers. (3 Marks) 3
MOV R0,#50H
MOV R2,#0AH
CLR A
MOV R7,A
Loop: ADD A,@R0
JNC NEXT
INC R7
NEXT: INC R0
DJNZ R2,Loop
END

2. Write the segment driving pattern for 4 Digit Common Cathode Seven Segment
3
display (3 Marks)- 1 Mark each.
‘AAAA’ – Digit Pins are all connected to logic high and h, g, f, e, d, c, b, a shoud
be respectively 01110111.
’CCCC’ - Digit Pins are all connected to logic high and h, g, f, e, d, c, b, a shoud
be respectively 00111001
’EEEE’ - Digit Pins are all connected to logic high and h, g, f, e, d, c, b, a shoud
be respectively 01111001

Part B
3. Full drive mode of stepper motor. (2 Marks) 7
Design and set up a stepper motor with step angle 20 to rotate 1280 in full drive
mode.
(5 Marks)
#include< reg51.h>
void delay(void);
void main()
{
unsigned char step;
for (step=0;step<16;step++)
{
P1=0x06;
delay();
P1=0x03;
delay();
P1=0x09;
delay();
P1=0x0C;
delay();
}
While(1);
}
void delay(void)
{
unsigned char cnt, cnt1;
for(cnt=0; cnt<=254;cnt++)
for(cnt1=0;cnt1<254;cnt1++);
}

4. Explain the pin configuration of Arduino MEGA 256 board (4 Marks). 7

• Power Pins
• Controller Pins
• Digital Pins
• Analog Pins
• Alternative Pins Function: SPI Pins
I2C Pins
PWM Pins
USART Pins
Pinchange Interrupt Pins
Hardware Interrupt Pins
Schematic diagram (3 Marks)

Explain ARM 7 register architecture (4 Marks)


5. 7
Diagram (3 Marks)

You might also like