Question: Write codes for the following tasks and simulate them Q1. Initially 00000001 is placed at PORTB. Using external interrupts, implement circular left shift/right shift

Write codes for the following tasks and simulate them Q1. Initially 00000001 is placed at PORTB. Using external interrupts, implement circular left shift/right shift on port B, that is, whenever INTO is asserted (a button connected to INTO is pressed),microcontroller should perform one left shift on PORT B and then delay for 1s ( i.e the next value will be 00000010). Similarly it should implement a right shift and then delay of 1s on port B if INT1 is asserted (i.e 1000000 is placed on PORT B). This shifting should stop when none of the interrupts (you may assume two buttons attached to each of the interrupt pins) are asserted. Connect LEDS to port B in the simulation file. Use the delay function to create delays.
Step by Step Solution
3.38 Rating (145 Votes )
There are 3 Steps involved in it
To solve this problem using a microcontroller we can write code in C assuming were using an AVR micr... View full answer
Get step-by-step solutions from verified subject matter experts
