NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » TTL/CMOS Output Crystal Oscillator
August 10, 2010 by Rick_S |
I got a few 18.432MHz oscillators (not crystals, full 5v powered crystal oscillators) and I wonder if anyone has had any experience with them. I was thinking about modifying the bootloader to support the new frequency since like the 14.7456 it is a multiple of standard baud rates so should present virtually no problem with serial communications. I understand to use it I'll have to change the fuse settings to get an external clock source. Before I take the plunge however, I thought I'd see if anyone has any pro's/con's successes/failures etc... Rick |
---|---|
August 10, 2010 by Ralphxyz |
Rick would you please explain the fuse settings and how one goes about setting them. I assume (since I know absolutely nothing about the fuses) that different projects need different fuse settings. I have seen a reference to a Mike.txt file that outlines the default fuse settings but I do not know where to find that file. It is not in my standard download, maybe it was on the original Nerdkit CD. I think it would be great to have a outline of the what, where and why of the fuse settings. You are also a great candidate to do this as your post are usually so easy to read and understand. I have a ISP and have loaded the bootloader onto new 168 and 328 MCUs but never had to touch the fuses. Ralph |
August 10, 2010 by Rick_S |
Sure, The file you are looking for is in the bootloader folder and is called fuses_mike.txt There is one of those files in both the bootloader and bootloader328P folders. It contains a list of all the fuses for a chip with the NK bootloader. The reason I mentioned that I would have to change my fuse settings if I used this crystal oscillator is because with the chip configured for use with a crystal it is setup differently than with an oscillator. The crystal connects between pins 9 & 10 where the oscillator only connects to pin 9. Pin 10 is left open. The fuses are kind of like a bios setting, when the chip starts, they determine how it goes about doing it. The fuses that effect the clock source are CKSEL3..0 (The lower 4 bits of the Low fuse byte)and can be found on the datasheet in the system clock and clock options section. Below is the fuses_mike.txt file for the 328P.
You can see the low fuse byte sets the mcu clock settings. Their default is set for a full swing crystal oscillator. I would have to change CKSEL3..0 to 0000 for an external oscillator. Hope that gives a bit of insight. Also, near the end of the data sheet, it gives a full list of all the fuse and lock bit settings. It's in teh Memory Programming section. Rick |
August 10, 2010 by Ralphxyz |
Thanks, I can see why you would need to make the changes. Now how does one change their fuses? Ralph |
August 11, 2010 by Rick_S |
You use an ISP programmer. They can be set with AVRDude and in the bootloader folder there is a separate makefile for doing just that. Rick |
August 11, 2010 by Ralphxyz |
Thank you, I got the ISP to see if I could recover a MCU that went bad after I tried to instal a reset switch on pin one. Maybe I'll try reseting the fuses, all I had tried was reinstalling the boot loader. Other than that I really have not had a need for a ISP, but since I had one I purchased a few 168 and 328 MCU's from Mouser and loaded the bootloader (sorry Nerdkit guys but I am cheap and on unemployment :-). I have been wondering what else I could do with a ISP. Is it possible to put the bootloader on other ATmega MCU's? That would be something I could see being of interest. Ralph |
August 11, 2010 by Rick_S |
You can also program the chip with the ISP programmer. If you program with that, you don't even need a bootloader on the chip and can use all available flash for your application. The bootloaders come in handy when you want to program a chip without the need for special external hardware. As for putting the bootloader on other chips, it can definatly be done. I'm pretty sure I remember on of the other common members here doing it... Maybe Ted (Phrank916). Anyway, it requires modifying some of the bootlader code to make that work properly with different chips. Rick |
August 11, 2010 by Ralphxyz |
I "tried" loading programs without the bootloader using the ISP, but they did not work. Maybe I'll try again. Other ATmega MCU's could be really interesting. Ralph |
August 12, 2010 by Rick_S |
It will definately work, I've done it often on other atmel chips such as the ATMega128, ATTiny2313, ATMega8, ATTiny45, and on occasion the 168 and 328Ps. There may be a fuse setting that prevented things from working on the chips you tried?? Rick |
Please log in to post a reply.
Did you know that a thermometer can be made "faster" by using a bit of math? Learn more...
|