mọi người cho mình hỏi trong code mình viết dưới đây, khi bấm dịc sang file hex thì nó báo lỗi này:
"CANT NOT CHANGE DEVICE TYPE THÍ FAR INTO THE CODE " là lổi zì vậy ?, cách khắc phục như thế nào với ạ.
***********************
CODE :
#include <16F877A.h>
#include <stddef.h>
//#device 16f877*=16 ADC=10
#include <lcd.h>
#iNclude <lcd.c>
#USE delay(clock=20000000)
//#fuses LP,XT,HS,RC,NOWDT,WDT,NOPUT,PUT,PROTECT,DEBUG,NODE BUG
//#fuses NOPROTECT,NOBROWNOUT,BROWNOUT,LVP,NOLVP,CPD,NOCPD, WRT_50%
#fuses NOWRT,WRT_5%,WRT_25%
#use standard_io(B)
#use standard_io(C)
#byte portb=0x60
#byte portc=0x70
#define PIN_B0 LCD_E
#define PIN_B1 LCD_RS
#define PIN_B2 LCD_RW
#define PIN_B4 LCD_D4
#define PIN_B5 LCD_D5
#define PIN_B6 LCD_D6
#define PIN_B7 LCD_D7
//******************************************
// chuong trinh con //
void lednhay()
{
Output_high(PIN_C0);
delay_ms(200);
Output_low(PIN_C0);
delay_ms(200);
Output_high(PIN_C1);
delay_ms(200);
Output_low(PIN_C1);
delay_ms(200);
Output_high(PIN_C2);
delay_ms(200);
Output_low(PIN_C2);
delay_ms(200);
}
void lcd(void)
{
lcd_init();
lcd_gotoxy(1,1);
lcd_putc('N');
}
void main()
{
set_tris_C(0);
set_tris_B(0);
while(1)
{
lednhay();
lcd();
}
}
"CANT NOT CHANGE DEVICE TYPE THÍ FAR INTO THE CODE " là lổi zì vậy ?, cách khắc phục như thế nào với ạ.
***********************
CODE :
#include <16F877A.h>
#include <stddef.h>
//#device 16f877*=16 ADC=10
#include <lcd.h>
#iNclude <lcd.c>
#USE delay(clock=20000000)
//#fuses LP,XT,HS,RC,NOWDT,WDT,NOPUT,PUT,PROTECT,DEBUG,NODE BUG
//#fuses NOPROTECT,NOBROWNOUT,BROWNOUT,LVP,NOLVP,CPD,NOCPD, WRT_50%
#fuses NOWRT,WRT_5%,WRT_25%
#use standard_io(B)
#use standard_io(C)
#byte portb=0x60
#byte portc=0x70
#define PIN_B0 LCD_E
#define PIN_B1 LCD_RS
#define PIN_B2 LCD_RW
#define PIN_B4 LCD_D4
#define PIN_B5 LCD_D5
#define PIN_B6 LCD_D6
#define PIN_B7 LCD_D7
//******************************************
// chuong trinh con //
void lednhay()
{
Output_high(PIN_C0);
delay_ms(200);
Output_low(PIN_C0);
delay_ms(200);
Output_high(PIN_C1);
delay_ms(200);
Output_low(PIN_C1);
delay_ms(200);
Output_high(PIN_C2);
delay_ms(200);
Output_low(PIN_C2);
delay_ms(200);
}
void lcd(void)
{
lcd_init();
lcd_gotoxy(1,1);
lcd_putc('N');
}
void main()
{
set_tris_C(0);
set_tris_B(0);
while(1)
{
lednhay();
lcd();
}
}