I think the issue here are the words "at the same time".
That MCU has a single interrupt vector and while it is servicing an interrupt the MCU will not interrupt that to service another one.
However that does not stop 2 interrupt sources being active at the same time.
One way you might be able to do this is to use the fact that you need to detect the actual interrupt source yourself within the ISR. You typically do this with code such as:
Code:
if(INTCONbits.INTE && INTCONbits.INTF)
{
// service the external interrupt
INTCONbits.INTF = 0
}
if(INTCONbits.T0IE && INTCONbits.T0IF)
{
// service the timer interrupt
INTCONbits.T0IF = 0
}
(the idea is correct - you may need to change the code for whatever compiler you are using)
What will happen then is that either (or both) sources will trigger the ISR. The first thing it will check is to see if that was the external interrupt and do whatever is required if it was. Regardless of that, it will then check to see if the timer interrupt has triggered and service that if it has.
It may happen that the external interrupt will trigger while the ISR is processing the timer interrupt (in other words the external interrupt was not triggered at the time the ISR started but while it was running). In that case the ISR will finish and then be called again but the hardware as the INTF (and INTE) bit(s) will still be set.
Susan
Basicaly, all pic microcontrollers have only one interrup vector. So, all interrupts will be executed the same time. It is just a question which flag will be hanlded first.
@Easyrider83: Not really relevant to this question but the PIC18 and smaller families have one or two interrupts and, where there are two, they are 'high' and 'low' priority where the high priority ISR casn interrupt the low priority on e if it is running.
The PIC24/dsPIC33 and PIC32 families have multiple interrupt vectors (typically one for each peripheral) that have multiple priority levels where a higher priority ISR can interrupt a lower priority one.
However this is a level of complexity that the OP need not worry about with this MCU.
Susan