Darren
Darren

Reputation: 1

Disabling relaxation: it will not work with multiple definitions

i'm a beginner to coding and yesterday i code a simple light up led in C programming , it works in Atmel Studio, however the next day it has these errors from the picture shown. My code is

#define F_CPU 1600000UL
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
    DDRB=0xFF;
    
    while (1)
    {
        PORTB |= 0b0000100;

        }
}

Can anyone help me? Thanks.Error

I'm not sure how as I keep trying to find help from internet, but it couldnt help me

Upvotes: 0

Views: 483

Answers (1)

Ramandeep Singh
Ramandeep Singh

Reputation: 91

PORTB |= 0b0000100; This looks like 7 digit only. It should be of 8 digit like
PORTB |= 0b00001000;

Try and mark answer if it helps.

Upvotes: 0

Related Questions