I'm reading MIDI inputs. I have the requisite OPTO coupler installed and the output looks fine. My 8MHz crystal is working and I've verified the frequency. I've verified the LED is working.
To test, I'm trying to simply light an LED within the interrupt routine to prove that I'm getting there - unfortunately I'm NOT Here are some snippets:
Code: Select all
sbit LED_MIDI at LATC1_bit;
void Init_Main(void) {
UART1_Remappable_Init(31250); // set MIDI speed
// MIDI LED
ANSC1_bit = 0; // turn off analog
TRISC1_bit = 0; // set as output
TRISB.TRISB5 = 1; // set USART RX as input
// set PPS pins
Unlock_IOLOCK();
PPS_Mapping(_RB5, _INPUT, _RXPPS ); // Not really sure WHAT to put here?
Lock_IOLOCK();
LED_MIDI = 0;
PIE1.RCIE = 1; //enable USART receiver interrupt bit
RCSTA.SPEN = 1; // enable USART
INTCON.PEIE = 1; //enable peripheral interrupt bit
INTCON.GIE = 1; //enable global interrupt bit
}
Code: Select all
void interrupt(void) {
LED_MIDI = 1;
} // interrupt()
Code: Select all
void main(void) {
Init_Main();
while(1) {
}
}