Sunday 29 January 2017

avr - How can I change the frequency of my ATmega168?


I'm completely new to MCU programming. I have an ATmega168 and a 20 MHz oscillator. My question is, how can I "tell" the controller to use this oscillator? I tried to read the datasheet, but that didn't help a lot!


My guess is that I should set the "fuse bits"!


Is it possible that I use this oscillator and run the controller with a lower frequency say 16 MHz?


By the way, I'm using Atmel Studio 6 to program this.


UPDATE


After dextorb's comment, I've uploaded this image:



myAVR ProgTool screen


In the datasheet Table9-5 they say that for a 20MHz frequency range CKSEL3..1 should be 011! Where can I put this value and after setting it, does it mean that I'm good to go with 20 MHz?




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...