Q1- Write code in C language(Atmel atmega32 avrmicrocontroller)
(a)-Switches are connected to Port C and Port B and LED’s withPORTD. Write a code to read input from
PortB and C and perform following.
Addition of both inputs, Subtraction, Multiplication, Division,And, Or, Nor,Xor.
(b)- A switch is connected to PD0 and LED’s to Port B and Port C.Write a code to perform following:
When switch is 0 send your roll number to Port B.
When Switch is 1, toggle PortC 20 times.