Leonardo vs UNO compiling

I tried to compile "BLINK" example for both Leonardo and UNO.

Latter needs 1000 bytes. Leonardo needs 4826!!!

How come? Is it correct?

Perhaps Leonardo includes support for built-in hardware USB interface, which is in the seperate ATMega8U2 or 16U2 chip on the Uno.

The Leonardo can do a lot more. There is support included for the keyboard and mouse activities, even when you are not explicitly using them.

The Leonardo has two serial ports, therefore 4 serial data buffers. The UNO has 1 serial port, therefore 2 serial data buffers.

Qbert:
I tried to compile "BLINK" example for both Leonardo and UNO.

Latter needs 1000 bytes. Leonardo needs 4826!!!

How come? Is it correct?

Isn't that because the Leonardo does it's USB serial data stuff in the chip itself rather then using a second on board USB serial converter chip? I don't own a Leonardo so I can't talk about it with any confidence, but it's enough of a different kind of animal that I would probably never own one on purpose. :smiley:

Lefty

I see. Thank you for your answers.
:slight_smile:

The hardware serial communication (RX and TX) are not used for the serial monitor communication via the USB bus. The Leonardo has a software serial communication over the USB bus. That needs programming code. So yes, the difference with the Uno is totally normal.

The USB bus on the Leonardo can do USB keyboard and mouse emulation, serial monitor communication, reset, sketch upload. All mixed together.