ud23
Advanced Member level 3
- Joined
- Apr 20, 2011
- Messages
- 926
- Helped
- 185
- Reputation
- 370
- Reaction score
- 180
- Trophy points
- 1,323
- Activity points
- 6,138
hi all i want to do some simple program want send char 'a' only one time not continuous on UART of atmega 8535
i am using this function for sending data but it sending continuous 'a' on hyper when some switch press
i want to send just one time when switch press.Is there any flag bit to stop continuous transmit.
Code:
void USARTWriteChar(char data)
{
//Wait untill the transmitter is ready
while(!(UCSRA & (1<<UDRE)));
//{
//Do nothing
//}
//Now write the data to USART buffer
UDR = data;
}
i am using this function for sending data but it sending continuous 'a' on hyper when some switch press
i want to send just one time when switch press.Is there any flag bit to stop continuous transmit.