Pages: [1]   Go Down
Author Topic: Leonardo vs UNO compiling  (Read 569 times)
0 Members and 1 Guest are viewing this topic.
Rome
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Latter needs 1000 bytes. Leonardo needs 4826!!!

How come? Is it correct?

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin

Lefty
Logged

Rome
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I see. Thank you for your answers.
 smiley
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1018
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: