![]() |
![]() |
#32 |
Đệ tử 1 túi
Tham gia ngày: Dec 2011
Bài gửi: 11
: |
em mới tìm hiểu về pic.thấy bài viết của bác TXT hay wa.thanks
hôm qua em làm thử bài nháy led code e lập theo wizad như sau: #include "D:\PIC\tuhoc\New folder\led2.h" #include<16f877a.h> #include<def_877a.h> #FUSES NOWDT,HS,NOPUT,NOPROTECT,NODEBUG,NOBROWNOUT,NOLVP, NOCPD,NOWRT #use delay(clock=20000000) 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_DISABLED); setup_timer_2(T2_DISABLED,0,1); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); TRISB=0x00; PORTB=0xFF; // TODO: USER CODE!! While(1) { PORTB=0x00; delay_ms(250); PORTB=0xFF; delay_ms(250); } } nhưng khi dịch lại bị lỗi: |
![]() |
![]() |
Ðiều Chỉnh | |
Xếp Bài | |
|
|
![]() |
||||
Ðề tài | Người gửi | Chuyên mục | Trả lời | Bài mới |
Hướng dẫn ORCAD cơ bản (Update 16/11/2005) | falleaf | Thực hành | 167 | 23-10-2013 04:30 PM |