Fast serial communication with Arduino

preview_player
Показать описание


Source codes:

If you want to support my work, please consider buying the parts using my affiliate links:
Рекомендации по теме
Комментарии
Автор

Cheating… you receive 91k 32bit numbers PLUS the linebreak which is at least one additional byte (two commonly) soooo you receive at least 465845 bytes, I think it‘s actually 580k bytes (two byte linebreak 0x0d0a); and yes write is faster than print especially with larger numbers, since print sends one byte per digit (10000 becomes 0x3130303030 which is actually five bytes… again plus linebreak) so after the tenth iteration you send one character more in decimal, after the 100th two and so on… the actual conversion (which is what makes print slower than write) cuts the speed in half alright, but a factor of six is simply cheated by adding that linebreak and not using the fourth byte of your 32bit number, I bet that if you send a constant 9999 with print instead of println and four bytes 0x09090909 instead of just three the difference will be MUCH smaller

itsid
Автор

That is just from microcontroller to computer. Standard buffering and using hardware. What about fast transmit of data from computer to micro?

movaxh
Автор

Hello! I am wondering how this can be true, cause if you use a baud rate of 2 mil, which means 2 mil bits per second, which further means 10 mil bits for 5 seconds that you tested on, and if you divide 10 mil bits by 24 bits, this gives 416 666 numbers, and you get 550000

draganbabic