Aug 9, 2011 #1 A 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: Aug 12, 2011
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); }
Aug 9, 2011 #2 bigdogguru Administrator Joined Mar 12, 2010 Messages 9,821 Helped 2,350 Reputation 4,694 Reaction score 2,272 Trophy points 1,413 Location Southwest, USA Activity points 62,385 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.
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.
Aug 10, 2011 #3 A 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 sorry i forgot that the problem when i try the code on proteus it doesnot work **broken link removed** Last edited: Aug 12, 2011
sorry i forgot that the problem when i try the code on proteus it doesnot work **broken link removed**
Aug 11, 2011 #4 A 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 any help !
Aug 12, 2011 #5 Tahmid Advanced Member level 6 Joined Jun 17, 2008 Messages 4,756 Helped 1,798 Reputation 3,588 Reaction score 1,656 Trophy points 1,413 Location Berkeley, California Activity points 30,586 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?
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?