International Electronics and Technology Forum
May 21, 2012, 02:00:45 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Pulse Width Modulation with MicroControllers?  (Read 1047 times)
Yawar
Newbie
*
Posts: 3


« on: May 14, 2011, 05:55:18 PM »

I am using an atmega16L and i am a beginner to all this.. I have use it for line tacking colour detection and running some motors. I have 2 questions:

1) can i overclock my atmega 16L (default max. frequency 8MHz) to 16MHz??? what damage it might cause??? Coz time required by device is crucial in my application and i cant use another mcu….

2) I have to generate PWM at 2kHz. But Prescalers are such that i can only get 0.5kHz or 4kHz for my motors at the xtal frequency. Can i use the internal clock for PWM only and make the rest of the program run at the XTAL frequency?Huh

ThankYou
Logged
veeyesvee
Newbie
*
Posts: 125


« Reply #1 on: May 14, 2011, 08:23:45 PM »

You cannot operate the device at 16 MHz if max rated frequency is 8 MHz.
The internal clock is what detrmines the rate of running of program. The presacler is only for PWM generation.
In short, if prescaler is set to divide by 16, program running will not slow down by a factor of 16.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC | Privacy Policy Valid XHTML 1.0! Valid CSS!