[SOLVED] problem with pic18f458 using mikroc

Status
Not open for further replies.

amrshata

Member level 1
Joined
Aug 9, 2011
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,501
i writing a program to measure distance i think i have problem at that part

char txt[6];
void Display_DIST(double AMR) {
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,"DISTANCE= ");
floattostr(AMR,txt);
lcd_out(2,1,txt);
lcd_out(2,11,"Meter");
delay_ms(1000);
}

void main() {
double x,T,DISTANCE;
float y;
......
.....
...
.
do{
....
...
.

x=20000-x;
T=(2.5*(10^(-5)))*x;
T=T/2;
DISTANCE=(346.45)*T;
display_DIST(DISTANCE);
}
while(1);
}
 

Attachments

  • qqq.PNG
    14.8 KB · Views: 62
Last edited:

Can you describe your problem? What is or isn't happening that you expect to occur?

---------- Post added at 21:43 ---------- Previous post was at 21:30 ----------

Also please post or upload your zipped source code.
 

sorry i forgot that
the problem when i try the code on proteus it doesnot work




**broken link removed**
 
Last edited:

With your code, I don't get any error in Proteus. Only the LCD shows a slight problem. Could you upload the mikroC source and project files here?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…