How to write C program in atmel studio to read and write to same port B. I want to read from port B pin 4 and write to the same port B but on pin 5. I have the following:
#include
int main(void)
{
DDRB = 0b00100000;
while(1)
{
PORTB = PINB;
}
}
ofcourse not working, cannot find a tutorial on that on the net.
thanks