Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Program did not return error but __Lib_Delays.c & P16F876A.c

Status
Not open for further replies.

sanjoy

Member
My RTC project made of 16f876A, 1307, 1820 devices with clock 8MHz. The Program is compiled using mikroC Pro for PIC. The written program didnt return any errors but the associated file " __Lib_Delays.c " & "P16F876A.c" returns some errors after compile. I cannot go ahead for the errors. if anyone know the solution pls let me know. thanks.

The written program attached here as zip.

The Errors is as follows:
0 1 mikroCPIC1618.exe -MSF -DBG -pP16F876A -DL -O11111114 -fo8 -N"E:\CKT\program_edt\MyProject_Clock.mcppi" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\defs\" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\Uses\P16\" -
0 126 All files Preprocessed in 343 ms
0 122 Compilation Started MyProject_Clock.c
200 123 Compiled Successfully MyProject_Clock.c

0 122 Compilation Started __Lib_Delays.c
1 393 'Get_Fosc_kHz' Identifier redefined __Lib_Delays.c
7 393 'Delay_1us' Identifier redefined __Lib_Delays.c
11 393 'Delay_10us' Identifier redefined __Lib_Delays.c
15 393 'Delay_22us' Identifier redefined __Lib_Delays.c
19 393 'Delay_50us' Identifier redefined __Lib_Delays.c
23 393 'Delay_80us' Identifier redefined __Lib_Delays.c
27 393 'Delay_500us' Identifier redefined __Lib_Delays.c
31 393 'Delay_5500us' Identifier redefined __Lib_Delays.c
35 393 'Delay_1ms' Identifier redefined __Lib_Delays.c
39 393 'Delay_5ms' Identifier redefined __Lib_Delays.c
43 393 'Delay_8ms' Identifier redefined __Lib_Delays.c
45 312 Internal error '' __Lib_Delays.c
0 122 Compilation Started P16F876A.c
2 393 'B0' Identifier redefined P16F876A.c
3 393 'B1' Identifier redefined P16F876A.c
4 393 'B2' Identifier redefined P16F876A.c
5 393 'B3' Identifier redefined P16F876A.c
6 393 'B4' Identifier redefined P16F876A.c
7 393 'B5' Identifier redefined P16F876A.c
8 393 'B6' Identifier redefined P16F876A.c
9 393 'B7' Identifier redefined P16F876A.c
11 393 '__FLASH_SIZE' Identifier redefined P16F876A.c
14 393 'R0' Identifier redefined P16F876A.c
15 393 'R1' Identifier redefined P16F876A.c
15 312 Internal error '' P16F876A.c

0 102 Finished (with errors): 27 Dec 2014, 11:15:44 MyProject_Clock.mcppi
 

Attachments

  • program_edt1.rar
    27 KB · Views: 172
I have looked through this project.... I belive that it has become corrupted because the original CCS code has tried to include parts that shouldn't have been..

Try and remove delays and the processor files from the library manager.... ie unselect everything and recompile..

Worst case.... write a small delay routine and just leave the lib delay.c out of the compile... Change you code to suit the newer pin definitions.... RB6_bit instead of PORTB.F6... Then at least it should work
 
Actually a re-think..... The errors with the lib delay.c is down to the soundplay() routine if you comment this out then it will leave out those errors... I had to re-write the sound routine ... I have sent a email to MikroE and they are looking in to it.... If all else fails try the delay_cyc() function...
 
Delay_Cyc_Long(16394); // 16394 cycles pause

Or..

Delay_Cyc(1, 10); /* 1x16384 + 10 = 16394 cycles pause */ For shorter delays

If you make a function called DelayMs() and call Delay_Cyc() with the amount of clock cycles that creates a ms delay you will have your own Ms delay to call...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top