P - 6 B Avr C: Ractical Itwise Shift Operation IN

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

PRACTICAL – 6

BITWISE SHIFT OPERATION IN AVR C


BATCH: C2 ROLL NO. 47 DATE:

Program – 1: Write an AVR C Program to generate LED pattern as given below. Assume
8 LEDs are connected to PORTB.
LED at D7 should glow rest of all turn off then LED at D6 should glow rest of all turn off
and so on. After D0, LED at D7 should glow and rest of all turn off. There should be a
delay of 200ms after each iteration.

Code:

MICRO CONTROLLER & INTERFACING


th
(5 SEMESTER ELECTRONICS & COMMUNICATION )
ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.
PRACTICAL – 6
BITWISE SHIFT OPERATION IN AVR C
BATCH: C2 ROLL NO. 47 DATE:

Program – 2: Write an AVR C Program to generate LED pattern as given below. Assume
8 LEDs are connected to PORTB.
LED at D7 should glow rest of all turn off then LED at D6 should glow rest of all turn off
and so on. After D0, again LED at D0 should glow rest of all turn off then LED at D1
should glow rest of all turn off and so on. There should be a delay of 200ms after each
iteration.

Code:

MICRO CONTROLLER & INTERFACING


th
(5 SEMESTER ELECTRONICS & COMMUNICATION )
ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.
PRACTICAL – 6
BITWISE SHIFT OPERATION IN AVR C
BATCH: C2 ROLL NO. 47 DATE:

Program – 3: Write an AVR C Program to generate LED pattern as given below. Assume
8 LEDs are connected to PORTB.
LEDs at D7 and D0 should glow rest of all turn off then LEDs at D6 and D1 should glow rest
of all turn off. After D4 and D3, LEDs at D7 and D0 should glow rest of all turn off. There
should be a delay of 200ms after each iteration.

Code:

MICRO CONTROLLER & INTERFACING


th
(5 SEMESTER ELECTRONICS & COMMUNICATION )
ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.
PRACTICAL – 6
BITWISE SHIFT OPERATION IN AVR C
BATCH: C2 ROLL NO. 47 DATE:

Program – 4: Write an AVR C Program to generate LED pattern as given below. Assume
8 LEDs are connected to PORTB.
LEDs at D7 and D0 should glow rest of all turn off then LEDs at D6 and D1 should glow rest
of all turn off. After D4 and D3, again LEDs at D4 and D3 should glow rest of all turn off
then LEDs at D5 and D2 should glow rest of all turn off and so on. There should be a delay
of 200ms after each iteration.

Code:

MICRO CONTROLLER & INTERFACING


th
(5 SEMESTER ELECTRONICS & COMMUNICATION )
ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.

You might also like