Atmega8 Uart receive problem

Status
Not open for further replies.

swakit

Junior Member level 1
Joined
Jun 2, 2009
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,433
unsigned char USART_Receive( void )
{
/* Wait for data to be received */
while ( !(UCSRA & (1<<RXC)) )
;
/* Get and return received data from buffer */
return UDR;
}

code is not working....directly copied from datasheet!!!!!...
RXC bit is also not getting set...what could be the problem...please help...
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…