Skip to content

Instantly share code, notes, and snippets.

@yamamaya
Created May 13, 2014 16:13
Show Gist options
  • Save yamamaya/30f7a606879473fd36d4 to your computer and use it in GitHub Desktop.
Save yamamaya/30f7a606879473fd36d4 to your computer and use it in GitHub Desktop.
void UART1Init() {
U1BRG = 25;
U1MODE = 0;
U1MODEbits.BRGH = 1;
U1STA = 0;
U1MODEbits.UARTEN = 1;
U1STAbits.UTXEN = 0;
IFS0bits.U1RXIF = 0;
IEC0bits.U1RXIE = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment