Feb 212014
 

I was planning on writing a beginner’s tutorial for using PWM on raw AVR chips, but I found that Arduino already has a nice guide here: http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM

The only change you need to make to their code to use it without the Arduino software is to remove calls to “pinMode”. Do so by using the appropriate DDR register twiddling or macros such as these: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=66939&start=0

 Posted by at 1:33 pm

Leave a Reply