Fig-1 is a coceptual diagram that sows how PC4, ADC4, SDA, PCINT12 signals can be alternately routed over the single PPin-27 of MCU. These signals are not the alternate functions of PPin-27; rather, they each belong to independent processing modules as is shown in Fig-1.
`Figure-1:
1. To route only PC4/PC5 signal over PPin-27/28, we include the following codes in the sketch. As a result, only S1 switch of Fig-1 gets closed; S2 - S4 remain opened.
pinMode(A4, OUTPUT);
pinMode(A5, OUTPUT);
2. To acquire only ADC4/ADC5 signals over PPin-27/28, we include the following codes in the sketch. As a result, only S2 switch of Fig-1 gets closed; S1, S3, S4 remain opened.
ADCSRA(ADEN, HIGH);
3. To route only I2C signal over PPin-27/28, we include the following codes in the sketch. As a result, only S3 switch of Fig-1 gets closed; S1, S2, S4 remain opened.
#include<Wire.h>
Wire.begin();
4. To acquire external pin's logic level change interrupt signals over PPin-27/28, we include the following codes in the sketch. As a result, only S4 switch of Fig-1 gets closed; S1 - S3 remain opened.
pinMode(A4, INPUT_PULLUP);//PPin-27 is input line with Rip
PCMSK1(PCINT12, HIGH);
PCICR(PCIE1, HIGH);
interrupts();
This is the time to establish the definition of Alternate Function (if any) -- PC4, ADC4, SDA, and PCINT12 have no alternate functions; PPin-27 of the MCU is alternately (not multiplexing) conveying the signals PC4, ADC4, SDA, and PCINT12 on programmer's demand.
I have been delivering the Block Diagram to the students at my understanding level; now, I see that my understanding is full of many misconceptions which are being cleared up slowly from the comments of the posters of this thread.