Pages: [1]   Go Down
Author Topic: Whats the Bare Minimum Hardware for a Standalone Leonardo?  (Read 1694 times)
0 Members and 1 Guest are viewing this topic.
Ballston Spa, NY
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been building home-made PCB Boards for standalone Arduino projects for about a year. I have memorized the bare-minimum schematics for a standalone atmega328 PCB, but I want to move to using the atmega32U4 so I can retire my old FTDI Cable.

Can someone please help me out by providing the bare-minimum schematics for a standalone Arduino Leonardo?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
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

I would say something like this.


* standalone_32U4.png (22.11 KB, 1235x623 - viewed 172 times.)
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.

Ballston Spa, NY
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome! Thanks!

One question though: What is the HWB / BOOT_EN for?
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 3
Posts: 717
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.atmel.com/Images/doc7766.pdf
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 0.7.2

Ballston Spa, NY
Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I already read it in the datasheet, it forces the bootloader after reset.
But what I wanna know, in Arduino Terms, what does this do for the Arduino? Is it required? what is it required for?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
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

This is from the Leonardo Hardware page:
"Automatic (Software) Reset and Bootloader Initiation
Rather than requiring a physical press of the reset button before an upload, the Leonardo is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the Leonardo's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the Leonardo. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.

Because of the way the Leonardo handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board. "

Leonardo schematic shows PE2 with a 10K to GND, part of a resistor pack.
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.

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

I am drying some similar stuff and I thought to leave the Quarz with 16 Mhz away because the ATmega32u4 has an internal Clock of 8 MHz and i guess it`ll gonna work.

What do you think?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
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

Will need to change the fuse settings to select internal clock then.
Also, make a new boards.txt set of entries reflecting the slower clock?
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.

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

could you give me a hint what kind of steps do i have to undertake to set the fuse and change the boards.txt

To set the internal clock:
PLL Controll Register PLLCSR= '0001010'
are there some other register to change?
Where do I have to include these Register in the code?

in the boards.txt
added:
leonardo.build.f_cpu=8000000L

in what do i have to change the low and high_fuses? or where could i find it out?

I guess i have to change the caterina/Caterina-Leonardo.hex file. How do I manage that?

best regards
coolf
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
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

Umm, got me there, I've not attempted these kinds of changes yet.
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.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 I don't think I would either... The Internal RC oscillator isn't accurate enough for high speed comms W/O calibration. At one temp and voltage.
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

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

Docedison you are totally right.

I am going to order a 16 MHz Quartz Oscillator.

I would like to drop the operating Voltage to 3,3 V
I just had a look into the datasheet of Atmega32u4 and if I reduce the operating voltage do i have to change the bodlevel fuses? (i don`t get it well,Brown-out Detection on page 52 in the data sheet?) (EDIT: NO) or anything at the bootloader? (EDIT: NOT JET KNOWN).... the connection for sure. (like the teensy 2.0 http://www.pjrc.com/teensy/schematic.html)

greetings
coolf
« Last Edit: June 10, 2013, 10:00:34 am by coolf » Logged

Pages: [1]   Go Up
Jump to: