/* Filename: OCA v2
Author: Renier Del Rosario
Date: 10/5/2024
Description: Timer Interrupt
*/
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
// #define TOGGLECYCLES 8
// volatile unsigned char overflowCounter = 0;
int main(void)
{
cli(); //disable all interrupt
DDRB = 0x80; // PORTB pin 7 output
PORTB = 0x00; // clear PORTB
TCCR0A = 0x42; // toggle OC0A mode 2.
TCCR0B = 0x04; // 256 prescaler
OCR0A = 3; // Load Value to the OCR register
sei(); // Enables all interrupts
while(1);
{
;
}
}