Professional Documents
Culture Documents
P - 6 B Avr C: Ractical Itwise Shift Operation IN
P - 6 B Avr C: Ractical Itwise Shift Operation IN
P - 6 B Avr C: Ractical Itwise Shift Operation IN
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:
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:
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:
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: