Aug 5, 2014 #1 M mvliege Junior Member level 2 Joined Jan 13, 2014 Messages 22 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Location Turkey Visit site Activity points 1,456 Hi, I used internal oscillator with PIC18F46K22 but, I have faced this problem (it's delay problem in the lcd.c, it appears when I complied. ) "function used but not defined delay_ms 609 SRC=1356" problem is about using internal oscillator? you can find an image for code the following attachment below thank you, Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <main.h> #FUSES INTRC_IO #include <lcd.c> int a=0; #use delay(internal=64MHz) #INT_TIMER0 void TIMER0_isr(void) { set_timer0(15536); if(a==1) output_low(pin_c0); output_toggle(pin_c1); printf(lcd_putc,"\f ERROR \n PLC CHECK"); } #INT_EXT void EXT_isr(void) { if(input(pin_b0)==1) a=1; } Last edited by a moderator: Aug 5, 2014
Hi, I used internal oscillator with PIC18F46K22 but, I have faced this problem (it's delay problem in the lcd.c, it appears when I complied. ) "function used but not defined delay_ms 609 SRC=1356" problem is about using internal oscillator? you can find an image for code the following attachment below thank you, Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <main.h> #FUSES INTRC_IO #include <lcd.c> int a=0; #use delay(internal=64MHz) #INT_TIMER0 void TIMER0_isr(void) { set_timer0(15536); if(a==1) output_low(pin_c0); output_toggle(pin_c1); printf(lcd_putc,"\f ERROR \n PLC CHECK"); } #INT_EXT void EXT_isr(void) { if(input(pin_b0)==1) a=1; }
Aug 5, 2014 #2 FoxyRick Advanced Member level 4 Joined Jan 8, 2004 Messages 1,249 Helped 321 Reputation 640 Reaction score 277 Trophy points 1,373 Location England, UK Visit site Activity points 12,979 Is #use delay (internal=64MHz) valid? "internal" is not mentioned in my manual - have you looked at the #use delay directive?
Is #use delay (internal=64MHz) valid? "internal" is not mentioned in my manual - have you looked at the #use delay directive?
Aug 5, 2014 #3 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 53,226 Helped 14,794 Reputation 29,875 Reaction score 14,318 Trophy points 1,393 Location Bochum, Germany Visit site Activity points 301,551 Is #use delay (internal=64MHz) valid? Click to expand... Yes, at least with recent compiler versions. The statement also enables the internal PLL. delay_ms() would also work in this context.
Is #use delay (internal=64MHz) valid? Click to expand... Yes, at least with recent compiler versions. The statement also enables the internal PLL. delay_ms() would also work in this context.
Aug 6, 2014 #4 M mvliege Junior Member level 2 Joined Jan 13, 2014 Messages 22 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Location Turkey Visit site Activity points 1,456 Thank you guys, I solved the problem, I have tried the following code below and it solved Code: #use delay(internal=64MHz) #include <lcd.c> thanks, BS
Thank you guys, I solved the problem, I have tried the following code below and it solved Code: #use delay(internal=64MHz) #include <lcd.c> thanks, BS
Aug 6, 2014 #5 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 53,226 Helped 14,794 Reputation 29,875 Reaction score 14,318 Trophy points 1,393 Location Bochum, Germany Visit site Activity points 301,551 Oh yes, a problem of statement order. You can have multiple #use delay statements in a program and it's only valid for the code below it. So lcd.c is compiled without a clock frequency specification.
Oh yes, a problem of statement order. You can have multiple #use delay statements in a program and it's only valid for the code below it. So lcd.c is compiled without a clock frequency specification.