What protocol does the IDE use to upload sketches to a board?

It's UART (TTL serial), baud rate varies by board - you can find it for your board from the verbose output when uploading through the IDE or from examining boards.txt. The protocol for communicating with the bootloader over UART is usually stk500 (when boards.txt calls it "arduino" or "stk500" that's what it is) - at least for the AVR's. The Mega2560 uses stk500v2, and non-avr boards use different protocols (unsurprisingly). stk500 is binary data (ie, not just printable ASCII characters). I think stk500 was designed by atmel; there's a spec detailing it somewhere.

1 Like