Hello. I'm trying to get midi in via USART on a g2553 Launchpad. I seem to be getting 0x80, note off, but not note on. I've tried various baud/oversample settings to see if I'm just getting garbage, but I keep getting note off vs. nothing. I have a buffer for RXD input, so I hope data isn't still getting overwritten.
I'm a noob, sorry if there's just something simple I don't get.
void uart_init(void)
{
uart_set_rx_isr_ptr(0L);
P1SEL = RXD + TXD;
P1SEL2 = RXD + TXD;
UCA0CTL1 |= UCSSEL_2 + ~UC7BIT; // SMCLK==4mhz
UCA0BR0 = 32; // DIVIDES SMCLK BY 32*16 = 31250 = MIDI SPEC w/UCOS16 oversample
UCA0BR1 = 0; //
UCA0MCTL = ~UCBRS0 + UCOS16;// + ~UC7BIT ; // Modulation UCBRSx = 1
UCA0CTL1 &= ~UCSWRST + ~UCMSB; // Initialize USCI state machine
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
}
thanks