The Arduino playgraound article Arduino Playground - PWMAudio
published a code where the UART is read at a 62.5 Khz rate in order to playback a wave file.
The computer program in Python is sending the wav file at 1 Mbaud but the UART is being read at a 62.5 Khz rate using a timer overflow interrupt.
Is not a bunch of data loss ? The Python program will sent bytes like crazy at 1 MB one after the other just limited by the computer clock speed but the Arduino code is reading the UART at the sampling rate.
The way I've understood this to be done is to set the computer side to send byte by byte at 1MB but at a rate of, for this example 62.5 Khz , then on the Arduino side, use the UART rx interrupt. This will synchronize the data in the proper way.
Is there something missing on the code published at above link ( either Arduino or Python)? or what am I missing or not quite understanding ?
Thanks a million in advance for any comments!
Jose