[sdiy] arduino timing
Olivier Gillet
ol.gillet at gmail.com
Wed Mar 16 09:26:57 CET 2011
The code for the serial library is provided with the Arduino IDE (I
run OS X and it is in:
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp
; not sure about the path on other systems).
void HardwareSerial::write(uint8_t c)
{
while (!((*_ucsra) & (1 << _udre)))
;
*_udr = c;
}
As you can see, there's no "send buffer", the implementation here is
"block until the previous byte has been written and push the next
one".
In your case, since you write only one byte at a time and since the
delay between your writes is guaranteed to be higher than the time
needed to send a byte, it won't be a problem.
More information about the Synth-diy
mailing list