I would like to time-synchronize the acquisition of two or more machine vision cameras to within milli-seconds. These cameras have digital input ports to where they can be set to acquire images based on a rising edge voltage. I know that simple Arduino square wave output code (with any desired duty cycle) can be written for multiple output ports at once (such as turning multiple LEDS on and off at the same time). How synchronized in time will the turning on/off of the voltages from the pins be? Trying to do something like this with MATLAB's image acquisition software is difficult because of small delays within the software and CPU as it processes code. But Arduino with its dedicated input/output pins I'm assuming will be different and hopefully would process the activation and deactivation of pins simultaneously within milliseconds or even microseconds.
With direct port manipulation, assuming the pins are on the same port, up to eight pins can be written simultaneously (Edit: on an AVR)