using the ISR to read off the serial

Hello,

On the ardrino uno for my next project I wish to read off the serial port from control software on a computer. I have read about serialEvent() however this reads before any run of the loop. I wish to be more instantaneous than that. On the uno is it possible to read off the serial using a ISR (So my loop execution is stopped and i read off the serial )? I came across UART_RX_vect as a interrupt vector. If it is possible is it possible to restart the execution of the main loop as well?

I wish to read off the serial port from control software on a computer.

How does this relate to using interrupts on the sending side?

you can expand the code of the receive ISR in a few ways 1) set a bool flag that data has arrived an in your main loop check this flag (== simpler than Serial.Available() which returns the count) 2) you can add code to process the received data in the ISR, but there is a serious risk of reentrancy which effectively will blow up your sketch.

I would go for 1

If it is possible is it possible to restart the execution of the main loop as well?

Yes, you can return from anywhere in the loop

void loop()
{
  // do this

  if (condition) return;

  // do something else

  if (othercondition) return;

  // and more code here 
}