Please help me with debugging the code
The error message is
exit code 2
the led pattern on the bread board will be
00000000
00000001
00000010
00000100
00001000
00010000
and so on...
The error message is
exit code 2
Code:
#include"at8ports.h"
#include<avr/io.h>
#include<util/delay.h>
void init_settings()
{
DDRB_OUT(0);
DDRB_OUT(1);
DDRB_OUT(2);
DDRB_OUT(3);
DDRB_OUT(4);
DDRB_OUT(5);
DDRB_OUT(6);
DDRB_OUT(7);
}
int main(void)
{
init_settings();
While(1)
{
PORTB=0xoo;
_delay_ms(50);
PORTB=0x01;
_delay_ms(50);
PORTB=0x02;
_delay_ms(50);
PORTB=0x04;
_delay_ms(50);
PORTB=0x08;
_delay_ms(50);
PORTB=0x10;
_delay_ms(50);
PORTB=0x20;
_delay_ms(50);
PORTB=0x40;
_delay_ms(50);
PORTB=0x80;
_delay_ms(50);
}
}
the led pattern on the bread board will be
00000000
00000001
00000010
00000100
00001000
00010000
and so on...
Last edited by a moderator: