vandat07
10-09-2010, 08:33 PM
Chả là mình mới viết chương trình đầu tay nhưng mà khi dịch thì chương trình CCS báo lỗi tùm lum luôn, mặc dù code giống như một tài liệu hướng dẫn mình tìm trên diễn đàn.
(CODE:
#include "E:\Dien Tu\PIC\Practices\Test.h"
#include <16F887.h>
#use delay(clock=20M)
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
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);// This device COMP currently not supported by the PICWizard
//Setup_Oscillator parameter not selected from Intr Oscillator Config tab
TRISB = 0x00;
PORTB = 0xFF;
While(1)
{
PORTB = 0;
delay_ms(250);
PORTB = 0xFF;
delay_ms(250);
}
}
Mình gửi ảnh lên, mong các bạn sửa lỗi giúp.
Thanx,
(CODE:
#include "E:\Dien Tu\PIC\Practices\Test.h"
#include <16F887.h>
#use delay(clock=20M)
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
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);// This device COMP currently not supported by the PICWizard
//Setup_Oscillator parameter not selected from Intr Oscillator Config tab
TRISB = 0x00;
PORTB = 0xFF;
While(1)
{
PORTB = 0;
delay_ms(250);
PORTB = 0xFF;
delay_ms(250);
}
}
Mình gửi ảnh lên, mong các bạn sửa lỗi giúp.
Thanx,