#avr | Logs for 2016-04-03

Back
[19:04:46] <edwardoid> Hi all
[19:05:58] <Casper> o/
[19:06:41] <edwardoid> Can anyone help me with fuses for atmega328p. I need to run it at 20Mhz external crystal, and don't want to waste space for bootloader
[19:06:45] <edwardoid> ?
[19:06:55] <LeoNerd> I usually use the online fusecalc
[19:07:13] <LeoNerd> http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega328p
[19:07:43] <edwardoid> I tried, but I don't understand meaning of all listed bits
[19:07:55] <Casper> datasheet
[19:08:04] <LeoNerd> Mostly you want to leave it at the defaults, and just change the ones you want to change
[19:08:14] <LeoNerd> I still need to find out where people get these defaults from...
[19:08:18] <Casper> http://www.engbedded.com/fusecalc/ <=== that's the one I use
[19:08:30] <Casper> LeoNerd: from the datasheet
[19:08:40] <edwardoid> That's the most popular one.
[19:08:42] <LeoNerd> Imean, in bulk
[19:08:49] <LeoNerd> I want a machine-readable set
[19:08:54] <LeoNerd> I want the data source these online ones use
[19:09:35] <edwardoid> I've read the day, but anyway I didn't found anything about 12/16/20Mhz
[19:09:41] <LeoNerd> There isn't
[19:09:48] <edwardoid> What bits are responsible for that?
[19:09:51] <LeoNerd> The actual frequency is set by the external crystal
[19:10:01] <LeoNerd> The bits just say "there's an external crystal"
[19:10:33] <LeoNerd> There's additionally ranges to configure it best for some range of frequencies or other.. I tihnk typically the atleast 8MHz and below 8MHz split
[19:11:48] <edwardoid> Ok, so I can fuses configuration for example 16Mhz, but attach 20mhz crystal?
[19:11:59] <LeoNerd> Hrm?
[19:12:36] <LeoNerd> There isn't a 16MHz option
[19:12:41] <LeoNerd> There's an "8MHz or more" option
[19:12:56] <edwardoid> What's the difference?
[19:13:07] <LeoNerd> One is a thing that exists. The other isn't
[19:13:20] <LeoNerd> "<edwardoid> Ok, so I can fuses configuration for example 16Mhz" <== I don't see why you say 16
[19:13:24] <LeoNerd> Where'd you get 16 from?
[19:13:42] <edwardoid> From topics in forums
[19:13:47] <LeoNerd> Well ignore those
[19:13:50] <LeoNerd> Read the page above
[19:13:50] <edwardoid> And blogs
[19:13:56] <LeoNerd> The actual list of the actual fuses on this actual device
[19:14:45] <LeoNerd> http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega328p for example, the one that says Ext. Crystal Osc.; Frequency 8.0- MHz
[19:14:50] <LeoNerd> That's "8MHz and up"
[19:15:33] <Casper> edwardoid: external full swing oscillator is what you want
[19:15:40] <Casper> err
[19:15:56] <Casper> yes, external crystal oscillator full swing
[19:15:56] <LeoNerd> You probably don't want full-swing. Just use the regular xtal
[19:16:16] <edwardoid> What is full-swing?
[19:16:28] <LeoNerd> Read the datasheet
[19:16:28] <LeoNerd> Really
[19:16:41] <edwardoid> Ok :)
[19:16:42] <LeoNerd> All I'm going to do to answer your question is read the datasheet and then parrot-out what it says
[19:16:48] <LeoNerd> You can do that more directly
[19:16:57] <edwardoid> Thank you guys.
[19:17:23] <edwardoid> I'll read ds once more :)
[19:18:29] <LeoNerd> For the 328P latest data sheet (rev 10/2014) you'll want to look at sections 9.3 and 9.4, which discuss the xtal oscillator choices in question
[19:19:10] <edwardoid> Thanks a lot!