Micom_Electric/마이컴_원칩 2011. 5. 22. 15:10
PWM mode 사용법 설명
.
http://extremeelectronics.co.in/avr-tutorials/pwm-signal-generation-by-using-avr-timers-part-ii/

추가 정보

PWM

Timers

 
==========
다른 사이트
http://www.8051projects.net/pulse-width-modulation/avr-pwm-example.php

//Global variables and definition
#define PULSE_WIDTH 0x40

void pwm_start(){
        OCR1AL = PULSE_WIDTH;   //Load Pulse width
        OCR1AH = 0;
        DDRD |= (1<<5);         //PortD.5 as o/p
        TCCR1A = 0x81;          //8-bit, Non-Inverted PWM
        TCCR1B = 1;             //Start PWM
} 
posted by 털보네i
: