Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] ccs c function problem: function used but not defined delay_ms

Status
Not open for further replies.

mvliege

Junior Member level 2
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; 
}



code.JPG
 
Last edited by a moderator:

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?
Yes, at least with recent compiler versions. The statement also enables the internal PLL.

delay_ms() would also work in this context.
 
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
 

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.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top