Question
Answer the questions based on the code below #include #include #include #define F_CPU 4000000 void DelayTimer0 (void) { TCNT0 = 0x3C; TCCR0 = 0b00000101; while
Answer the questions based on the code below
#include
#include
#include
#define F_CPU 4000000
void DelayTimer0 (void)
{
TCNT0 = 0x3C;
TCCR0 = 0b00000101;
while ((TIFR & (1
TCCR0 = 0;
TIFR = (1
}
void delay100ms (void)
{
unsigned int i;
for (i=0; i
}
ISR (INT1_vect)
{
uint8_t b[ ] = {0x18, 0x24, 0x42, 0x81, 0x42, 0x24, 0x18, 0};
for (uint8_t i=0; i
{
PORTC = b[i];
DelayTimer0();
}
}
int main(void)
{
DDRC = 0xFF;
DDRA = 0xFF;
DDRD = 0b11110111;
PORTD = 0b00001000;
GICR = 0x80;
MCUCR = 0x08;
sei ();
while(1)
{
uint8_t mynum[ ] = {0x6D, 0x76, 0x79, 0x79, 0x4F, 0x07, 0x4F, 0x5B};
for (uint8_t i=0; i
{
PORTC = 0;
PORTA = mynum[i];
DelayTimer0();
}
}
}
3. List down directive or file that are required in interrupt programming. 4. Determine the code in program "Lab3Exp1.c" that is use to enable interrupt programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started