Question: Modify the following AVR code using HW interrupt 0 as opposed to polling. Modify such that INTO is used as a trigger when any of

 Modify the following AVR code using HW interrupt 0 as opposed

Modify the following AVR code using HW interrupt 0 as opposed to polling. Modify such that INTO is used as a trigger when any of the inputs are depressed. INCLUDE "M32DEF INC" CBI DDRB,O CBI DDRB,1 CBI DDRB,2 SBI DDRB,6 SBI DDRB,7 AGAIN: CBI PORTB.6 CBI PORTB,7 LDI R16,0 SBIC PINB,0 INC R16 SBIC PINB,1 INC R16 SBIC PINB,2 INC R16 LDI R17,1 SUB R17, R16 BREQ SETI TST2 LDI R17,2 SUB R17, R16 BREQ SET2 TST3 LDI R17,3 SUB R17, R16 BREQ SET3 SETI SET2 SET3 RJMP TST2 JMP TST3 SBI PORTB, 7 SBI PORTB,6 SBI PORTB, 7 SBI PORTB, 6 RJMP AGAIN OVER: RJMP OVER Modify the following AVR code using HW interrupt 0 as opposed to polling. Modify such that INTO is used as a trigger when any of the inputs are depressed. INCLUDE "M32DEF INC" CBI DDRB,O CBI DDRB,1 CBI DDRB,2 SBI DDRB,6 SBI DDRB,7 AGAIN: CBI PORTB.6 CBI PORTB,7 LDI R16,0 SBIC PINB,0 INC R16 SBIC PINB,1 INC R16 SBIC PINB,2 INC R16 LDI R17,1 SUB R17, R16 BREQ SETI TST2 LDI R17,2 SUB R17, R16 BREQ SET2 TST3 LDI R17,3 SUB R17, R16 BREQ SET3 SETI SET2 SET3 RJMP TST2 JMP TST3 SBI PORTB, 7 SBI PORTB,6 SBI PORTB, 7 SBI PORTB, 6 RJMP AGAIN OVER: RJMP OVER

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!