Question: Please only answer questions 1,2 and 3. I will rate LAB 1 a) Test the AVR's ports for input operation as follows. b) Connect each

Please only answer questions 1,2 and 3. I will rate
LAB 1 a) Test the AVR's ports for input operation as follows. b) Connect each pin of PORTx (PORTx.0 to PORTx.7) of the AVR to DIP switches of AVR Trainer. Also connect each pin of PORTy to an LED on the LED bar of the AVR Trainer. c) Then, write and run a program to get data from PORTx and send it to PORTy. Any change of status of the switches connected to PORTx will be instantly reflected on LEDs connected to PORTy. The testing program could look like this. .ORG 00 LDI OUT R20, 0x00 DDRD, R20 ;make port D an input port ;make port B an output port LDI OUT OUT R20, 0xFF DDRB, R20 PORTD, R20 ;enable pull-up resistors Ll: IN OUT RJMP R20, PIND PORTB, R20 L1 ;get data from port D isend it to port B ; keep doing this Questions: 1) On the AVR Trainer, which port is closest to the DIP switches? 2) In this Lab, which port of the AVR Trainer did we use for inputting data into AVR? Explain what is role of lines 2 and 3 of the program: LDI OUT R20, 0x00 DDRA, R20 3) On the AVR Trainer, which port is closest to the LED bar? LAB 1 a) Test the AVR's ports for input operation as follows. b) Connect each pin of PORTx (PORTx.0 to PORTx.7) of the AVR to DIP switches of AVR Trainer. Also connect each pin of PORTy to an LED on the LED bar of the AVR Trainer. c) Then, write and run a program to get data from PORTx and send it to PORTy. Any change of status of the switches connected to PORTx will be instantly reflected on LEDs connected to PORTy. The testing program could look like this. .ORG 00 LDI OUT R20, 0x00 DDRD, R20 ;make port D an input port ;make port B an output port LDI OUT OUT R20, 0xFF DDRB, R20 PORTD, R20 ;enable pull-up resistors Ll: IN OUT RJMP R20, PIND PORTB, R20 L1 ;get data from port D isend it to port B ; keep doing this Questions: 1) On the AVR Trainer, which port is closest to the DIP switches? 2) In this Lab, which port of the AVR Trainer did we use for inputting data into AVR? Explain what is role of lines 2 and 3 of the program: LDI OUT R20, 0x00 DDRA, R20 3) On the AVR Trainer, which port is closest to the LED bar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
