??? 05/12/06 10:22 Read: times |
#116044 - what is about Responding to: ???'s previous message |
hi,
D.narender Reddy said:
i need to write a floating point type number into EEPROM. how do u do this. iam using C language and ke*il u vison to write the program.
What is about to store float number byte-by-byte? void Write_float_to_EEPROM (float number) { // make some temporal variables unsigned char x, a, *ptr; // do loop for all bytes of float number via its address location for (x=sizeof(float), ptr=(unsigned char *)&number; x>0; x--) { a = *ptr++; Write_byte_to_EEPROM(a); } }Seems it should work? Regards, Oleg |
Topic | Author | Date |
writing into internal EEPROM off AT89S82 | 01/01/70 00:00 | |
Writing to internal eeprom | 01/01/70 00:00 | |
Partly wrong | 01/01/70 00:00 | |
thanks Andy | 01/01/70 00:00 | |
same for assembler | 01/01/70 00:00 | |
IEEE 754 standard | 01/01/70 00:00 | |
Missing the point | 01/01/70 00:00 | |
same for assembler Not | 01/01/70 00:00 | |
Context | 01/01/70 00:00 | |
"Keil" is not a swear word! | 01/01/70 00:00 | |
what is about | 01/01/70 00:00 | |
I'd make it generic | 01/01/70 00:00 | |
There's an echo in here | 01/01/70 00:00 | |
General-purpose pointer | 01/01/70 00:00 | |
indeed | 01/01/70 00:00 | |
Oleg | 01/01/70 00:00 | |
thanks but still | 01/01/70 00:00 | |
still nobody knows what you want | 01/01/70 00:00 | |
Back to basics | 01/01/70 00:00 | |
AT89S8252 Primer![]() | 01/01/70 00:00 |