This is a simple assembly program for the ATmega328P microcontroller. It controls the blinking of an LED connected to Pin 1 (PB1) of the microcontroller. The program includes a delay subroutine to control the timing of the LED blinking.
The program follows the following steps:
- Initialize the necessary registers.
- Set up Pin 1 (PB1) of PORTB as an output to control the LED.
- Turn on the LED by setting the corresponding bit in PORTB.
- Call a delay subroutine to introduce a delay.
- Turn off the LED by clearing the corresponding bit in PORTB.
- Call the delay subroutine again.
- Repeat the above steps in an infinite loop.
The delay subroutine is a simple nested loop that introduces a delay in milliseconds.
- Microchip Studio
- Proteus