Hi Electro-Tech users,
I am using ATmega16 AVR,
I want to copy data of one port to other port.
I have written following code in embedded C.
but the above code does not copy the data to PORTBCode:DDRA = 0x00; //PORTA is a input port DDRB = 0xFF; //PORTB is a output port while(1) { PORTB = PORTA; }
Please let me know the mistake in the above code.

Reply With Quote

