SOLVED - Convert Arduino (AVR) float to Microchip float
hello i have been working on project needs send floats 4 bytes pic 18f mcu. i thought simple task until realized after head scratching microchip use different format float representation. have found info on differences location of sign bit.i found code on ccs forum (i own picc compiler) might able use make conversion don't see how implement i appreciate this. my result not seem anywhere expect. i using windows 7 64bit , 1.0.5-r2. code: [select] [///from ccs forum - ttelmah float toieee(char data[]) { //this routine turn float ccs format iee format union { float value; char bytes[4]; unsigned int words[2]; unsigned long int lword; } block; int sign; //first re-arrange byte order block.bytes[3]=data[0]; block.bytes[0]=data[3]; block.bytes[1]=data[2]...