I'm using an Atmel ATmega32 with CodeVisionAVR. I checked the settings, and what do you know, yes, the default setting does NOT allow printf to output floats. So, I turned it on, and... "Evaluation...
Type: Posts; User: lava
I'm using an Atmel ATmega32 with CodeVisionAVR. I checked the settings, and what do you know, yes, the default setting does NOT allow printf to output floats. So, I turned it on, and... "Evaluation...
Weird. I just copied your code into my compiler and onto the microcontroller, and all I got was "output =", no number after. I have no idea what is wrong.
Okay, I tried this code:
char number[4];
float output;
while(1)
{
Thanks swoopy, I was not including string.h. I included it, and then tried this code:
char number[4];
float float_number;
while(1)
{
number[0]=0x3F;
I can't get either of these solutions to work. I tried this code:
char number[4];
sizeof(float)==4;
while (1)
{
number[0]=0x3F;
Thanks, will give it a try!
If I have an array, number[4], of these values:
number[0]=0x3F
number[1]=0xC7
number[2]=0xAE
number[3]=0x14
I want to use a printf(%f) statement to combine this array into a single number...