??? 04/14/08 13:55 Read: times |
#153253 - 8051 - int to string |
Hey guys,
I'm currently trying to convert and integer to a string and then add it on to the end of another string to be sent over the serial cable. I have tried many methods including itoa but none of these work or are accepted by RIDE. The next idea I had was to convert each digit in the int to its ascii value, convert to a character and add to the end of the string. I've already converted to the ascii value (by adding 48 to the digit) but I'm having trouble converting this to a char to add on to a string. (And I'm using C by the way!). Any ideas? /ben |
Topic | Author | Date |
8051 - int to string | 01/01/70 00:00 | |
Use sprintf() to do the lot. | 01/01/70 00:00 | |
tried those :( | 01/01/70 00:00 | |
If you had read the manual ... | 01/01/70 00:00 | |
just tried that... | 01/01/70 00:00 | |
You need to think about it![]() | 01/01/70 00:00 |