Topic : Ride7+Rkit-51: Problem with "float value"

Forum : 8051

Original Post
Post Information Post
May 16, 2025 - 3:28pm
Juergen Babenhauserheide

 Hello,

I'm having a problem with the Ride7 compiler displaying "float values" when programming (displaying on the LCD) the MC AT89C51RC2 (8051).

#include <stdio.h>         /* prototype declarations for I/O functions */
#include <stdlib.h>
#include <absacc.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <reg51.h>

float value = 10.00;

unsigned int n = sprintf(char buffer[20],"Size = %5.2f m",value);

lcd_sendstring(buffer);

The problem here is that I'm not getting any display.

With "Floating point = BDC: float only"

Juergen