Speaking generally, given a time-critical module and an MCU (act as buffer),.
If we look at the datasheet of the module, we know the timing diagram. Then, it's possible we can read the module through ISR in MCU and then forward the data to another device.
For example, the OV7670 camera module timing diagram below is for RGB565 format, where one pixel is two bytes.
Then, the MCU (act as a buffer) has the job of forwarding any incoming data from the camera into an advanced device (e.g., a server) through an interface (e.g., WiFi/UDP).
For example, esp8266, which has built-in WiFi and is programmable, can be programmed with many ISR function definitions and relies on initialization. Hence, there is no need or less main loop needed. Like this pseudocode:
// camera pinout
uint8 D; //D0-D7
// auxiliary var
volatile uint8 D_BUF[1024]; // to store data
uint16 BUFF_COUNTER; // buffer indexer
void isr_d0_to_gpio0_on_rising(){
// Perform bitwise operation (OR-ing with 1) of D at bit 0.
}
// Similar to isr_d1_to_gpio1_on_rising and so on
void isr_pclk_gpio8_on_falling(){
D_BUF[BUFFER_COUNTER] = D;
BUFFER_COUNTER++;
D = 0; // reset all 8-bits to zero
}
void setup(){
// init wifi, camera resolution, camera format, etc.
// Attach interrupt
attachInterrupt(GPIO0, isr_d0_to_gpio0_on_rising, RISING);
// Do the same for d1-d7.
attachInterrupt(GPIO8,
isr_pclk_gpio8_on_falling(), FALLING);
}
void loop(){
if BUFFER_COUNTER > 512 {
// transmit current buffer pass through with length approx. 512 bytes into server
transmitDataUDP(&D_BUF, BUFFER_COUNTER);
BUFFER_COUNTER=0;
}
}
So, does it mean relied on many ISRs, mainly hardware interrupts, can benefit faster data transmission? Assume an external factor such as a gateway or router used is fine, so the network is reliable.


D_BUFvariable is a FIFO basically. \$\endgroup\$