Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4922

ATMEGA328P register regarding

$
0
0
Hi


I am new to ATMGEA microcontroller .I have started to check the LED program.It working

Line 1: DDRB |= 1 << PINB0;
Line 2: _delay_ms(100);
Line 3: PORTB &= ~(1 << PINB0);
Line4: _delay_ms(100);


In Line1: what i understand means

PINB0= 0000 0001
After 1<<PINB0

PINB0=0000 0010;


DDRB |=0000 0010;
my question is sum+=rem means sum=0+rem value;

Here what will be DDRB value and OR function with 0000 0010;

Viewing all articles
Browse latest Browse all 4922

Trending Articles