I'm using a PIC MCU that, among other things, will be used to drive 2 LEDS through an 8-pin header. However, at certain times, I'd like the option to use the same 2 pins as serial I/O paths.
I'm looking for some guidance as to how one can isolate the LED and Serial signals so that they do not interfere with the other when one is in use.
More specifically, in the image I've attached, I want to connect the Serial I/Os (PIN 9 and 10 from PIC) to Pins 2 and 4 of J2. Outputs OZONE and AIRFLOW (PIN 6 and 7 from PIC) are also connected to Pins 2 and 4 of J2 to drive two LEDs under normal conditions. Through circuitry not shown, when I change the mode of the PIC for Serial I/O functionality, I want Pins 2 and 4 of J2 to ONLY exchange data to and from the Serial pins of the PIC. Otherwise, Pins 2 and 4 of J2 ONLY receive the signal from Pin 6 and 7 of PIC to drive the LEDs
I'm looking for some guidance as to how one can isolate the LED and Serial signals so that they do not interfere with the other when one is in use.
More specifically, in the image I've attached, I want to connect the Serial I/Os (PIN 9 and 10 from PIC) to Pins 2 and 4 of J2. Outputs OZONE and AIRFLOW (PIN 6 and 7 from PIC) are also connected to Pins 2 and 4 of J2 to drive two LEDs under normal conditions. Through circuitry not shown, when I change the mode of the PIC for Serial I/O functionality, I want Pins 2 and 4 of J2 to ONLY exchange data to and from the Serial pins of the PIC. Otherwise, Pins 2 and 4 of J2 ONLY receive the signal from Pin 6 and 7 of PIC to drive the LEDs