PIC Industrial and Domestic Timer Compile error!!!
Discussion in "Project Doubts" started by robotgirl Oct 15, 2014.
Wed Oct 15 2014, 12:19 am
Hi. I am new here.
I found this fantastic website with great project while searching over net.
I want to build the PIC Industrial and Domestic Timer (Relay Controller) which is found here...http://www.8051projects.net/download-d233-pic-industrial-domestic-timer-relay-controller.html
I tried to compile the code in mplab, but getting huge error.
Im using mplab v8.10 and Hi-tech 9.60
heres the error log, hope someone can help me solving this.
BTW. Its really need to mention that im pretty new to PIC micro controller.
Ill ve really glad if anyone here to help me out with this thing.
Thanks in advance.
I found this fantastic website with great project while searching over net.
I want to build the PIC Industrial and Domestic Timer (Relay Controller) which is found here...http://www.8051projects.net/download-d233-pic-industrial-domestic-timer-relay-controller.html
I tried to compile the code in mplab, but getting huge error.
Im using mplab v8.10 and Hi-tech 9.60
heres the error log, hope someone can help me solving this.
BTW. Its really need to mention that im pretty new to PIC micro controller.
Build C:\MPLAB PROJECT\IDTPM for device 16F877A Using driver C:\Program Files\HI-TECH Software\PICC\std\9.60\bin\picc.exe Executing: "C:\Program Files\HI-TECH Software\PICC\std\9.60\bin\picc.exe" -C "C:\MPLAB PROJECT\main.c" --chip=16F877A -P --opt=default,+asm,-debug,-speed,9 --warn=0 --double=24 -q -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s" Warning [176] C:\MPLAB PROJECT\DS1307.c; 78.0 missing newline Warning [176] C:\MPLAB PROJECT\LCD162.c; 66.0 missing newline Warning [176] C:\MPLAB PROJECT\mystrings.c; 29.0 missing newline Warning [176] C:\MPLAB PROJECT\main.c; 139.0 missing newline Warning [349] C:\MPLAB PROJECT\i2c.h; 79.17 non-prototyped function declaration for "i2c_init" Warning [349] C:\MPLAB PROJECT\DS1307.c; 8.1 non-prototyped function declaration for "rtc_init" Warning [349] C:\MPLAB PROJECT\LCD162.c; 14.1 non-prototyped function declaration for "LCD_enable" Warning [349] C:\MPLAB PROJECT\LCD162.c; 55.1 non-prototyped function declaration for "LCD_init" Warning [349] C:\MPLAB PROJECT\alarm.c; 33.1 non-prototyped function declaration for "set_alarm" Warning [359] C:\MPLAB PROJECT\alarm.c; 39.28 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 53.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 54.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 57.24 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 58.22 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 58.53 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 66.30 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 83.47 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 88.62 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 98.48 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 99.16 illegal conversion between pointer types Warning [349] C:\MPLAB PROJECT\alarm.c; 128.1 non-prototyped function declaration for "set_time" Warning [359] C:\MPLAB PROJECT\alarm.c; 133.22 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 134.34 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 134.70 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 150.27 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 152.27 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 166.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 167.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 168.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 169.50 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 173.25 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 176.34 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 176.70 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 177.38 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 179.33 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 187.23 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 189.33 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 195.25 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 207.62 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\alarm.c; 215.62 illegal conversion between pointer types Warning [349] C:\MPLAB PROJECT\main.c; 20.1 non-prototyped function declaration for "system_initialize" Warning [359] C:\MPLAB PROJECT\main.c; 28.24 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 29.25 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 97.17 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 102.27 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 124.34 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 127.20 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 129.82 illegal conversion between pointer types Warning [359] C:\MPLAB PROJECT\main.c; 130.42 illegal conversion between pointer types Warning [337] C:\MPLAB PROJECT\main.c; 138.1 line does not have a newline on the end Executing: "C:\Program Files\HI-TECH Software\PICC\std\9.60\bin\picc.exe" -oIDTPM.cof -mIDTPM.map --runtime=default,+clear,+init,-keep,+osccal,-download,-ramtest,-resetbits main.obj --chip=16F877A -P --opt=default,+asm,-debug,-speed,9 --warn=0 --double=24 -q -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s" Error [491] ; . can't find 0x3B words for psect "rdata_0" in segment "BANK0" ********** Build failed! **************
Ill ve really glad if anyone here to help me out with this thing.
Thanks in advance.
Wed Oct 15 2014, 11:35 pm
I see most of them are warnings but just one error: "Error [491] ; . can't find 0x3B words for psect "rdata_0" in segment "BANK0"
I feel its because of version issue. The code was compiled in 9.80 Hi-tech C. try if you can attach the MAP file created in the project directory (zip it). also in alarm.c try making "unsigned char alarm_check[]" as const and see if that makes any difference.
Also you might need to play with some optimization settings of the compiler as its of space issue. Are you using a full/pro version of this compiler or lite version?
I feel its because of version issue. The code was compiled in 9.80 Hi-tech C. try if you can attach the MAP file created in the project directory (zip it). also in alarm.c try making "unsigned char alarm_check[]" as const and see if that makes any difference.
Also you might need to play with some optimization settings of the compiler as its of space issue. Are you using a full/pro version of this compiler or lite version?
Thu Oct 16 2014, 12:49 pm
Hello Ajay. Thanks for your reply.
After reading your comment, i downloaded the mplab ide version 8.92 and Hi tech c compiler version 9.80.
Now the code copile successfully but with this little warning.
anything i should change or do anything to get rid of that warning?
*can you tell me which mplab version you used in that project?
Thanks again for your kind help.
^_^
After reading your comment, i downloaded the mplab ide version 8.92 and Hi tech c compiler version 9.80.
Now the code copile successfully but with this little warning.
Build C:\MPLAB PROJECT\IDTPM for device 16F877A Using driver C:\Program Files (x86)\HI-TECH Software\PICC\9.80\bin\picc.exe Make: The target "C:\Users\user\Desktop\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\main.p1" is up to date. Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.80\bin\picc.exe" -oIDTPM.cof -mIDTPM.map --summary=default,-psect,-class,+mem,-hex --output=default,-inhx032 main.p1 --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" HI-TECH C Compiler for PIC10/12/16 MCUs (PRO Mode) V9.80 Copyright (C) 2010 Microchip Technology Inc. Serial number: HCPICP-654321 (PRO) Warning [1257] C:\Users\user\Desktop\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\i2c.h; 140. local variable "_data" is used but never given a value Memory Summary: Program space used BB1h ( 2993) of 2000h words ( 36.5%) Data space used 6Dh ( 109) of 170h bytes ( 29.6%) EEPROM space used 0h ( 0) of 100h bytes ( 0.0%) Configuration bits used 1h ( 1) of 1h word (100.0%) ID Location space used 0h ( 0) of 4h bytes ( 0.0%) Loaded C:\Users\user\Desktop\IDT\MPLAB PROJECT\MPLAB PROJECT\MPLAB PROJECT\IDTPM.cof. ********** Build successful! **********
anything i should change or do anything to get rid of that warning?
*can you tell me which mplab version you used in that project?
Thanks again for your kind help.
^_^
[ Edited Thu Oct 16 2014, 11:38 pm ]
Sat Oct 18 2014, 01:07 am
Can anyone tell me that the situation is now with Hi-Tech ?
I know that Microchip bought out Hi-Tech, but what happened to the
9.80 Hi-tech compiler.
All my searches lead back to the Microchip site where it says the
9.80 Hi-tech compiler is not available for purchase !
I know that Microchip bought out Hi-Tech, but what happened to the
9.80 Hi-tech compiler.
All my searches lead back to the Microchip site where it says the
9.80 Hi-tech compiler is not available for purchase !
Mon Oct 20 2014, 02:39 pm
Initialise _data in the header file to some value to get rid of this warning.
Sat Nov 08 2014, 07:06 pm
hi. thanks for the suggestion. can you elaborate a little please?
what i did in i2c.h file was like
the line 11 is what i changed from"data <<= 1" to data = 1"
it gives me no error, and build successfully.
but the problem is, all the system starts up, with working button and display.
but it is not setting the time and date as i input. i can set the time and date, all function is okay, says time and date has changed at the end, but after that, it returns to default date at the static screen.
it seems that rtc is not storing/acknowledge my data.
then i tried with your Hex file (in project folder) and unfortunately it displays jumping time and date like this.......
??-??-?? AS-ON
??-0?-20?? ....
those question marks flicker randomly without any kind of interaction.
whats going on?
what i did in i2c.h file was like
///// unsigned short i2c_read unsigned short ack { unsigned short i; char data; I2C_SDA_1; // Release the data pin // grab the data for(i=0;i<8;i++) { data = 1; I2C_SCL_0; I2C_delay(); // Clock is low I2C_SCL_1; // Clock released to high. while (I2C_SCL_IN==0) {;} // Wait here if clock is pulled low by slave if (I2C_SDA_IN) {data |= 1;} // Sample the data I2C_delay(); // Clock is high } // Send ACK or NACK I2C_SCL_0; if (ack) I2C_SDA_0; // ACK else I2C_SDA_1; // NACK I2C_delay(); // low T/w. I2C_SCL_1; I2C_delay(); // high T/2. I2C_SCL_0; // Return clock to safe state. return data; }
the line 11 is what i changed from"data <<= 1" to data = 1"
it gives me no error, and build successfully.
but the problem is, all the system starts up, with working button and display.
but it is not setting the time and date as i input. i can set the time and date, all function is okay, says time and date has changed at the end, but after that, it returns to default date at the static screen.
it seems that rtc is not storing/acknowledge my data.
then i tried with your Hex file (in project folder) and unfortunately it displays jumping time and date like this.......
??-??-?? AS-ON
??-0?-20?? ....
those question marks flicker randomly without any kind of interaction.
whats going on?
[ Edited Sat Nov 08 2014, 07:10 pm ]
Sun Nov 09 2014, 02:20 am
the line 11 is what i changed from"data <<= 1" to data = 1"
it gives me no error, and build successfully.robotgirl
Put it back as it was,then change
char data;
to
char data=0;
[ Edited Sun Nov 09 2014, 02:24 am ]
Powered by e107 Forum System