I'm having trouble understanding RS-232 interrupts in Arduino. Please also understand that I am using HARDWARE serial ports, and I'm actually using a TEENSY 3.2 board.
I believe that if I use issue the command
an interrupt-driven hardware USART will be invoked and put incoming bytes into a buffer, and that I need to do nothing to enable the hardware interrupt except issue the "Serial.available()" command.
Is all the above true? How big is the receive buffer?
Is there a buffer overflow flag? What happens if the buffer is overflowed?
And, if I use the command
is that interrupt-driven as well? To be more clear, if I want to send a binary array, will the code load one byte into the transmit buffer and continue before the character is actually sent? Is there some function that will allow me to simply pass an array to a routine, and it will 'automatically' be sent in the background?
Do I have to send each element of the array separately to the Serial.write() routine, or is there some other library or function that will allow me to just pass the array and a pointer to a routine and it will be sent?
I must receive and send serial data from several ports simultaneously. The program cannot be blocked during character SEND or RECEIVE times. All reception and transmission must occur in the background.
If someone has an example of what I'm trying to do, I would be very appreciative.