Hi, This is my code for the UART:
#define MYUBRR ( F_CPU / (16*BAUD) - 1 )
void USART_Init(unsigned int ubrr) {
// set baud rate
UBRRH = (unsigned char) (ubrr>>8);
UBRRL = (unsigned char) ubrr;
// enable transmitter
UCSRB = (1<<TXEN);
// set frame format: 8 data, 2stop bit
UCSRC = (1<<URSEL) | (1<<USBS) | (3<<UCSZ0);
}
void USART_Transmit(unsigned char data) {
// wait for empty transmit buffer
while (!(UCSRA & (1<<UDRE)));
UDR = data;
}
Maybe the front/rear view is really a problem... Using this as a reference: http://www.midi.org/about-midi/electrical.shtml How should i interpret? My interpretation is: when i look at this i see my soundcard midi ports in a front view. Is this correct? Thx, Nuno