Unit 3 | Lecture 10 | AVR Assembly and C Programming: AVR IO port Programming in C

preview_player
Показать описание
Topics Covered:
AVR IO Port Programming in C

L J INSTITUTES OF ENGINEERING & TECHNOLOGY
SUBJECT: - MICROPROCESSOR AND MICROCONTROLLER
UNIT 3:- AVR ASSEMBLY AND C PROGRAMMING
TOPIC NAME: - AVR IO PORT PROGRAMMING IN C
IMPORTANT QUESTIONS / MCQS

1. Write a short program that toggles all bits of Port C.

2. True or false. All bits of Port B are bit addressable.

3. To access a PIN register as a byte, we use ______ label
a) PORTx
b) PINx
c) DDRx
d) IN

4. To access the ________ register of Port B, we use DDRB.
A) Data
B) Data Direction
C) Data Directive
D) Directive

5. What is the difference between PORTC=0x00 and DDRC=0x00?

6. To access a PORT register as a byte, we use ______ label
a) PORTx
b) PINx
c) DDRx
d) OUT

7. Write a C program to toggle all bits of Port B every 200 ms.
Рекомендации по теме