rendered paste body#include "avr/io.h"#include "avr/signal.h"#include "stdlib.h"#include "string.h"void init_com(){ // 4800 on 8Mhz int baud = 103; UBRRH = (uint8_t)(baud>>8); UBRRL = (uint8_t)baud; /* Enable receiver and transmitter */ UCSRB = (1<<RXEN)|(1<<TXEN); /* Set frame format: 8data, 2stop bit */ UCSRC = (1<<URSEL) | (1<<USBS)|(3<<UCSZ0); // 1bit stop, //UCSRC = (3<<UCSZ0);}void send_com( uint8_t dt ){ /* Wait for data to be received */ while (!(UCSRA & (1<<UDRE))); UDR = dt; //while (!(UCSRA & (1<<TXC)));}int main(){ init_com(); uint8_t a = 0; while (1) { send_com(a); a++; } return 0;}