Отправлено
Quasy 15 марта 2007 г. 16:44
В ответ на: В даташитах на Меги есть(+) отправлено
<font color=gray>Quasy</font> 15 марта 2007 г. 16:42
void USART_Transmit( unsigned int data ) { /* Wait for empty transmit buffer */ while ( !( UCSRA & (1 << UDRE)) ) ; /* Copy 9th bit to TXB8 */ UCSRB &= ~(1 << TXB8); if ( data & 0x0100 ) UCSRB |= (1 << TXB8); /* Put data into buffer, sends the data */ UDR = data; }