PIC Vietnam

PIC Vietnam (http://www.picvietnam.com/forum/index.php)
-   Cơ bản về vi điều khiển và PIC (http://www.picvietnam.com/forum/forumdisplay.php?f=8)
-   -   Timer atmega16 (http://www.picvietnam.com/forum/showthread.php?t=13140)

hoanghuy1811 13-01-2012 10:42 PM

Timer atmega16
 
OCR1AH=11;
OCR1AL=181; //Duty cycle servo1=1000us=1.5ms (0 degree)

OCR1BH=7;
OCR1BL=104; //Duty cycle servo2=1500us=1 ms (-90 degree)

ICR1H=156; //Time period = 20000us=20ms
ICR1L=32;

Cho e hoi cach tinh nhung con so 1.5ms 1ms 20ms. biet chip atmega16 chay tan so 2MHZ


Múi giờ GMT. Hiện tại là 11:38 AM.

Tên diễn đàn: vBulletin Version 3.8.11
Được sáng lập bởi Đoàn Hiệp.
Copyright © PIC Vietnam