![]() |
|
![]() |
#1 |
Nhập môn đệ tử
Tham gia ngày: Feb 2008
Bài gửi: 5
: |
Code:
#include "C:\Documents and Settings\User\My Documents\thu pwm\hhff.h" #byte portc=0x07 #use fast_io(c) void bam() { set_pwm1_duty(800); set_pwm2_duty(677); } void main() { setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); setup_psp(PSP_DISABLED); setup_spi(FALSE); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); setup_timer_1(T1_INTERNAL|T1_DIV_BY_1); setup_timer_2(T2_DIV_BY_1,255,1); setup_ccp1(CCP_PWM); setup_ccp2(CCP_PWM); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); set_tris_c(0); bam(); while (1) { } } thay đổi nội dung bởi: namqn, 19-03-2008 lúc 02:59 AM. |
![]() |
![]() |
![]() |
#2 | |
Trưởng lão PIC bang
|
Trích:
Thân,
__________________
Biển học mênh mông, sức người có hạn. Đang gặp vấn đề cần được giúp đỡ? Hãy dành ra vài phút đọc luồng sau: http://www.picvietnam.com/forum/showthread.php?t=1263 |
|
![]() |
![]() |
![]() |
Ðiều Chỉnh | |
Xếp Bài | |
|
|