My plan uses pins 18&19 for Modbus communication with a Solar Charge Controller. Pins 20&21 for I2C communication with a PFC8574, ADS1115 and INA2228. Pins 50,51&52 for SPI communication with an RTC3234 (CS pin 48) and a SDcard (CS pin 49).
I have avoided using Pins 0 &1 (RX TX) due to a prior statement
I will be continually using if (Serial.available(). I presume that might cause a conflict.
I need two interrupts for the RTC3234 & the INA228. It appears that I have run out of hardware interrupts. Based on the following statement:
The schematic appears to expand on the number of PCINT pins:
Conflict with what? Serial.available() checks if data is available on UART0 (USB or TX0/RX0).
The only reason why you would use Serial.available() is to check for data so from your description to check if there is data from a terminal program (e.g. serial monitor).
If you're afraid that interrupts might be interfering with each other, there is a always a chance but that is not because of Serial.available(). If an interrupt is handled all other interrupts are blocked; so your interrupt service routines should be very short (time wise). Once the interrupt service routine is finished another interrupt can be handled.
If you don't use TX1/RX1 you can also use those pins; they are INT2 and INT3 (not to be confused with PCINT2 and PCINT3).
In that case you don't have to determine the source of the interrupt (rtc or ina) in the ISR, the interrupt identifies the source.
I thought source identification applied to only to those pins within the PCINT group. As I would only be using 1pin from the PCINT0 group and 1 pin from the PCINT2 group, I would think that would be unnecessary. Am I correct?
As per schematic (Fig-1), the physical interrupt pins of the 2650 MCU for INT4 and INT5 are physically connected throug copper tracks of the PCB to DPin-2 and DPin-3 of the edge connector. I don't understand how software can chnage these permanent connections.
From the following line of the above link, I undrstand that the argument of digitalPinToInterrupt(pin) is asking for the DPin-# at which the INT4-pin of the MCU is connected.
"Normally you should use
digitalPinToInterrupt(pin)
, rather than place an interrupt number directly into your sketch."
And NOT
attachInterrupt(4, ISRINT4, FALLING); //4 for INT4
No you understand that wrong
You are overcomplicating things, it very simple.
You just give it one of the available 6 pin numbers that you want to use as an interrupt.