How to write a code in core way in Avr microcontroller

MakerSpace chatshaala exploring , How to write a code in core way in Avr microcontroller.
@jtd @Ashish_Pardeshi @karnamdpdurga @Firoj @samarth

last chatshaala we discussing how to define any pin of microcontroller is input/ output(DDR).
In Avr microcontroller, 1 is use for an outputs and a value of 0 is Input.

WhatsApp Image 2021-01-21 at 2.17.54 PM

eg:-1
if we want to configure all the Pins on PORT B as outputs, we would simply use the following code:
DDRB= 0xFF; (hexa decimal)
or
DDRB=0b11111111;

eg:-2
if we want to configure PB6,PB0 as outputs,
WhatsApp Image 2021-01-21 at 2.19.40 PM

3 Likes
1 Like