Hi all,
i can send data to PC but i can't send data to PC, here is my program :
#pragma used+
char recieve_serial_2(void)
{
char status,data;
while (1)
{
while (((status=UCSR2A) & RX_COMPLETE)==0);
data=UDR2;
if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
return data;
};
}
#pragma used-
for testing i try to send a char to toggle my PORT and turn on a LED but it still not working, like this :
while (1)
{
if (recieve_serial_2() == A)
{
PORTD.5 = 1;
}
}
thx all for the help