Osawa_Odessa
Banned
Hello,
I need your help again. I am trying to measure humidity using HS1101, pic 16F877A and CCS compiler. I have the code bellow but when I try to compliler it, there are too many error that I can't fix it.
Here is the code:
Here there are many errors like this:
I need your help again. I am trying to measure humidity using HS1101, pic 16F877A and CCS compiler. I have the code bellow but when I try to compliler it, there are too many error that I can't fix it.
Here is the code:
Code:
#include "main.h"
#include "var.h"
#include "lcd16x2/lcd16x2.c"
#include "hs1101/hs1101.c"
#INT_RTCC
void ngat_timer0(void)
{
disable_interrupts(GLOBAL);
set_timer0(5);
count++;
if(count==78)
{
frequency=get_timer1();
set_timer1(0);
count=0;
enable_display=1;
}
enable_interrupts(GLOBAL);
}
void main()
{
uint8_t str[20],humi;
DDRB=0xfe;
DDRD=0x00;
DDRE=0x00;
LCD_Init();
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_256|RTCC_8_BIT);
sprintf(str,"BanLinhKien.Vn");
LCD_Puts(str);
delay_ms(4000);
set_timer0(5);
set_timer1(0);
enable_interrupts(INT_TIMER0);
enable_interrupts(GLOBAL);
while(TRUE)
{
if(enable_display)
{
humi=HS1101_GetHumi(frequency);
enable_display=0;
sprintf(str,"Do Am:%3u",humi);
LCD_Gotoxy(0,1);
LCD_Puts(str);
LCD_PutChar('%');
}
}
}
*** Error 28 "C:\USer\Odessa\Deskop\CCS\main2\var.h" Line 18(17,25): Expecting a (
...Expecting a declaration
Expecting a declaration
Expecting a declaration
Expecting a declaration