Synchronising Clocked I/O on MultiplePorts with Serialising Output Data correctly ?
How do you know that the statement "a single thread can cause data to be sampled and driven in parallel on these port" will be able to handle it's task in time ? If I would use for an example more and more buffered serial ports in parrallell wouldn't the processor get starved out of time at high speeds? Or is it dedicated HW for that conected to the ports ? For an example communicating with an Audio-Codec with a master clock of ~25 MHz.
after the setup of the ports and the CODEC, I would use the sync(); there after I would just write what communication that I would like to happen in parrallell in the main. In this example, I have
1 clock pin out - Serial_Control_port_Clock
2 data pins out - LeftRightClock and OUT
1 data pin in - IN
And all of four pins have to run in parrallell on one thread
Code: Select all
sync(Serial_Control_port_Clock)
int main(){
//some code
while(1){
LeftRightClock <: 0x8000000;
OUT <: AUDIO_Right;
IN :> AUDIO_Right;
LeftRightClock <: 7FFFFFFF;
OUT <: AUDIO_Left;
IN :> AUDIO_Left;
}
return...