|
void USART1_Transmit(unsigned char data)//Transmit one byte to USAR unsigned char USART1_Recceve(unsigned char * res)//Recceve one byte from USART void USART1_InitSerial(void)
E-mail:
info@telesys.ru
{
while(!(UCSR1A&(1<
UDR1=data;
}
{
if(!(UCSR1A&(1<
*res = UDR1;
return 0;
}
{
UBRR1H=0;
UBRR1L=5;//115200bps
UCSR1B=0x18;//RXenable, TXenable
UCSR1C=0x0E;//2stop bits, 8 bt data
DDRB &= ~(1<
Ответы