What does this mean ?

Thread Starter

HArvey Levi

Joined Aug 2, 2016
3
#define_XTAL_FREQ_20000000
#define RS RD2
#define EN RD3
#define D4 RD4
#define D5 RD5
#define D6 RD6
#define D7 RD7
#include<pic.h>
#include<htc.h>
#include<stdio.h>
#include<string.h>
#include<xc.h>
#include "lcd.h";
#include "uart.h";
#include<pic16f877a.h>

#pragma config FOSC=HS // Oscillator Selection bits (HS oscillator)
#pragma config WDTE=OFF // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE=OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN=ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP=OFF
#pragma config CPD=OFF
#pragma config WRT=OFF
#pragma config CP=OFF

void main()
{
while(1)
{

//char,irfid[10]"0007143195";

char i,rfid[];
TRISD=0x00;
Lcd_Init();
Lcd_Clear();
Lcd_Set_Cursor(1,1);
Lcd_Write_String("Scan Your Card");

UART_Init(9600);

for(i=0;i<5;)
{ if(UART_Data_Ready())
{
rfid=UART_Read();
i++;

}
}
if(rfid[0]^rfid[1]^rfid[2]^rfid[3]==rfid[4])
{
unsigned long number=0;
char rfidnumber[10];

if(rfid[10]!=0){
number=number+rfid[0];
number=number<<24;}
number=number+rfid[1];
number=number<<16;
unsigned long number2=0;
number2=number2+rfid[2];
number2=number2<<8;
number2=number2+rfid[3];
number=number+number2;

sprintf(rfidnumber,"%lu",number);
Lcd_Clear();
Lcd_Set_Cursor(1,1);
Lcd_Write_String(rfidnumber);
if(strcmp(rfidnumber,"7143195")==0)
{
Lcd_Set_Cursor(2,1);
Lcd_Write_String("Identified Tag");
_delay_ms(2000);
}
else
{
Lcd_Set_Cursor2(2,1);
Lcd_Write_String("Unknown Tag");
_delay_ms(2000);
}
}
else
{
Lcd_Set_Cursor(2,1);
Lcd_Write_String("Error Reading");
_delay_ms(2000);
}
}
}
 

Thread Starter

HArvey Levi

Joined Aug 2, 2016
3
hi. im not good in programming and not even know how to program. i need help in this situation which i want to use for my final year project. and its really confuse me. i follow up the code that have been given. but it seem to have problem with #include<uart.h> and <lcd.h> . which it say not found. can anyone please kindly help me here? :D thanks
 

MrChips

Joined Oct 2, 2009
30,618
It means it is looking for files on your computer and cannot find them.

Search your computer for the files:
uart.h
lcd.h

#include "uart.h" means that it is looking for file uart.h in your directory that you are working in.

#include <uart.h> means that it will search the systems directory.

If you don't have these files on your computer, get them from the source where you got your compiler.
 

WBahn

Joined Mar 31, 2012
29,932
So let me get this straight -- you are working on YOUR final year project and you are using code that you got from someplace (i.e., that you didn't write) and you don't have the faintest idea what it is or what it does or how to use it. So just what will this final year project tell your instructor about whether YOU deserve to graduate?
 

Papabravo

Joined Feb 24, 2006
21,094
So let me get this straight -- you are working on YOUR final year project and you are using code that you got from someplace (i.e., that you didn't write) and you don't have the faintest idea what it is or what it does or how to use it. So just what will this final year project tell your instructor about whether YOU deserve to graduate?
I have an answer for this question, but I'm pretty sure it will not enjoy universal popularity.
 

ci139

Joined Jul 11, 2016
1,898
YOU deserve to graduate?
some disciplines are must have aside your main - i don't think there a problem - how 1 get's those done - if the person never more get involved with those :p (muhahahahaaa) - if they later need it - they have heared something about it in lectures or at allaboutcircuits ???
 

MrSoftware

Joined Oct 29, 2013
2,186
Assuming your major is not programming (if it is then you should know these errors):

The errors mean the compiler cannot find the header (.h) files. You're including them with quotes, "", which means the compiler is expecting to find them in the same directory as the rest of your source code files. First check your computer to make sure you have those files. If you do then either (1) copy them to the same directory as the rest of your source code files, or (2) change your compiler search path settings to include the directory where they are located and then include them using <> instead of "".
 
Top