I want to make things like this
With Float...
BEGIN
A_tick:=(A_tick1)*(1/100)*(1/3600);
A_tick2:=A_tick2 + A_tick;
Ah:=INTEGER (A_tick2);
Ah_invert:=Ah;
END;
Then I want to convert it from Float To String with an logikal output on LCD!
Kalkulate with Float und convert in String
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Hello,
please, create a support ticket and attach complete problematic project archived in zip or rar format and we will inspect it.
http://www.mikroe.com/en/support
Thanks.
Best regards,
Losic Tihomir
please, create a support ticket and attach complete problematic project archived in zip or rar format and we will inspect it.
http://www.mikroe.com/en/support
Thanks.
Best regards,
Losic Tihomir
mikroElektronika [Support team]
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Hi corado,Then I want to convert it from Float To String with an logikal output on LCD!
in mikroPascalPRO for AVR we have procedure "FloatToStr", which converts a floating point number to a string.
Parameters :
input: floating point number to be converted
output: destination string
The output string is left justified and null terminated after the last digit.
Note: Given floating point number will be truncated to 7 most significant digits before conversion.
Example:
Code: Select all
var ff1, ff2, ff3 : real;
txt : array[23] of char;
...
ff1 := -374.2;
ff2 := 123.456789;
ff3 := 0.000001234;
FloatToStr(ff1, txt); // txt is "-374.2"
FloatToStr(ff2, txt); // txt is "123.4567"
FloatToStr(ff3, txt); // txt is "1.234e-6"
Losic Tihomir
mikroElektronika [Support team]