Question: Program the Atmega328p to: Use the input on TO as a counter in normal mode which will set an interrupt to occur every 10
Program the Atmega328p to: Use the input on TO as a counter in normal mode which will set an interrupt to occur every 10 counts which will increment the output on PORTC by one (in binary). Use an external switching circuit to have a normally low (active high) input to the TO pin. PORTC should have LEDs connected to each pin to see the result. Incorporate the use of a pin change interrupt to reset the value on PORTB if activated. The pin change interrupt on PBO must be used. Use the internal pull up resistor. Connect the phototransistor and IR LED pair to provide the input signal to TO. Breaking the light signal must result in the active high signal. Draw the circuit
Step by Step Solution
There are 3 Steps involved in it
Heres the code to achieve the described functionality on the Atmega328p microcontroller using AVR C ... View full answer
Get step-by-step solutions from verified subject matter experts
