Discussion in "PIC Microcontroller Discussion" started by    vohsty    Nov 12, 2013.
Fri Nov 29 2013, 01:19 PM
#11
hi tech c integrated into mplab
Sun Dec 01 2013, 02:56 PM
#12
ok.. can you post error log? It should not be giving error though.
Sun Dec 01 2013, 03:04 PM
#13
Build I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\IDTPM for device 16F877A
Using driver C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin\picc.exe

Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\main.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\LCD162.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\delay.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\mystrings.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\877_eeprom.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\DS1307.p1" is up to date.
Make: The target "I:\pic industrial timer\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.p1" is out of date.
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin\picc.exe" --pass1 "I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c" -q --chip=16F877A -P --runtime=default,+clear,+init,-keep,+osccal,-download,-resetbits,-stackcall,+clib --opt=default,+asm,-debug,-speed,+space,9 --warn=0 -D__DEBUG=1 --double=24 --float=24 --addrqual=ignore -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 35.7 undefined identifier "RA4"
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 38.1 function declared implicit int
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 38.13 undefined identifier "LCD_clear"
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 39.1 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 40.1 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 40.17 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 42.1 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 45.18 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 45.37 function declared implicit int
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 53.38 undefined identifier "setstring"
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 53.50 pointer required
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 53.50 pointer required
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 54.38 undefined identifier "setstring"
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 54.50 pointer required
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 54.50 pointer required
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 58.35 undefined identifier "rlyonoff"
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 58.53 pointer required
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 58.53 pointer required
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 62.4 undefined identifier "RD1"
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 66.30 pointer required
Error [981] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 66.30 pointer required
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 68.4 undefined identifier "RD0"
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 78.1 function declared implicit int
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 88.69 function declared implicit int
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 94.4 undefined identifier "RD2"
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 100.28 function declared implicit int
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 106.4 undefined identifier "RD0"
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 112.4 undefined identifier "RD1"
Warning [361] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 117.1 function declared implicit int
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 131.7 undefined identifier "RD2"
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 132.13 undefined identifier "LCD_clear"
Error [192] I:\pic industrial timer\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\alarm.c; 146.4 undefined identifier "RA4"
Advisory[1] too many errors (21)

********** Build failed! **********



i only changed wht u instructed me
Sun Dec 01 2013, 03:15 PM
#14
Looks like issue with header file. Are you using MPLAB or MPLABx (new IDE)?
Sun Dec 01 2013, 03:26 PM
#15
MPLAB and not the MPLABx
Sun Dec 01 2013, 03:57 PM
#16
Well he did a very awkward way of building code. He is including C file instead of header file. that might be causing issue. Probably the new Hi-Tech C compiler does not allow this. You need to work a little bit and create header file to add all the function prototypes to one header file that you can include it in all your C file.

e.g. for set_alarm function prototype will be
void set_alarm(void);

for LCD_send_packedbcd function
void LCD_send_packedbcd(unsigned char data);

You get it? errors coz probably of latest version of Hi-tech C.
Sun Dec 01 2013, 09:29 PM
#17
To be honest i dint understand what u sayed.I am not all that good in this
Wed Dec 04 2013, 06:37 PM
#18
Its really difficult to help you if you do not understand what I am trying to say. Its basic C that I am talkin about. You need to create header file thats it. Anyways let me see if I can create it for you.
Sat Dec 07 2013, 11:51 AM
#19
I have been reading and i think i got an idea of what you are saying but i will greatly apreciate if you made one for me
Sun Dec 15 2013, 05:31 PM
#20
Here is the header file code, save it in a file name idt.h

#ifndef __IDT_H__
#define __IDT_H__

// EEPROM
void Eeprom_write(unsigned char address, unsigned char data);
unsigned char Eeprom_read(unsigned char address);

//DS1307
void rtc_init(void);
void rtc_settime(unsigned char h,unsigned char m,unsigned char s);
void rtc_setdate(unsigned char y,unsigned char m,unsigned char d,unsigned char w);
void rtc_gettime(unsigned char *h,unsigned char *m,unsigned char *s);
void rtc_getdate(unsigned char *y,unsigned char *m,unsigned char *d,unsigned char *w);

// LCD
void LCD_enable(void);
void LCD_data(unsigned char ascii);
void LCD_command(unsigned char ascii);
void LCD_gotoxy(unsigned char x,unsigned char y);
void LCD_string(unsigned char *lcd_string);
void LCD_init(void);

//mystring
void LCD_send_packedbcd(unsigned char data);
void LCD_timeset(unsigned char data,unsigned char position);
unsigned char hex2bcd (unsigned char x);

//Alarm
void set_alarm(void);
void set_time(void);

#endif // __IDT_H__


Now make following changes in following files..:
877_eeprom.c
DS1307.c
LCD162.c
delay.c
mystrings.c
alarm.c
main.c

Add #include "idt.h" in all the above files.

And from main.c remove all the C files
#include"877_eeprom.c"
#include"DS1307.c"
#include"LCD162.c"
#include"delay.h"
#include"mystrings.c"
#include"alarm.c"


Now once you done these modification, now add all the C files in the project so that they gets compiled. Hope it works for you

Get Social

Information

Powered by e107 Forum System

Conversation

Wed Mar 25 2020, 09:39 AM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 06:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 08:55 AM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 12:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 11:58 AM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 05:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 01:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.
Tue Jan 14 2020, 02:08 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me
Tue Dec 17 2019, 08:44 AM
Devangi
hello..i am programming industrial timer using 8051 with 24lc64 eeprom. i have query in storing the 3 diff value in eeprom with enter button. can anyone share c code ?
Tue Dec 17 2019, 05:30 AM
Andrius
Hello. Can anyone share the code in Bascon and scheme in Proteus?

Downloads

Comments

ukkorikerist
Thu Apr 09 2020, 12:05 AM
Oswaldrib
Wed Apr 08 2020, 11:08 PM
Rachelsig
Wed Apr 08 2020, 04:57 PM
Franksig
Wed Apr 08 2020, 03:38 AM
OliverKiz
Mon Apr 06 2020, 07:54 PM
Nikolaynom
Mon Apr 06 2020, 09:13 AM
Paulinewop
Sun Apr 05 2020, 10:33 PM
NormanJeops
Sun Apr 05 2020, 03:26 AM

Online

Guests: 68, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 01:37 AM

Members: 38149
Newest member: ukkorikerist
Forum Activity
PHANTOM28 Avatar
Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
ananyagupta Avatar
Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...
sarrahjuzar Avatar
Posted By sarrahjuzar
Wed Feb 19 2020, 04:24 AM
I have a gsm module sim900a and dht22 connected to...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 18 2020, 04:52 PM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:59 AM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:50 AM
wounder Avatar
Posted By wounder
Mon Feb 10 2020, 03:32 AM
From below sample code for nuvoton 8051 timer0 mod...
Just4Fun Avatar
Posted By Just4Fun
Sat Feb 01 2020, 09:20 AM
If you want to use a CH55x MCU there isn't any adv...