How shall i convert a unsigned 8 bit integer to a string without using any libaries.... Only self written functions.
If you use C:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
Guest
#3630151
Why this construct with while(1)/if? This is simpler:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
or still shorter:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
I am trying to read it to an LCD display, but I am getting random character on the display...
When i number = 100, is the character i get on my LCD 11111 11010 11111 11111 11111 11111 11111 11111
Guest
#3631332
And what characters are on your lcd if you write out the string "100" direct?
when i write 100 the char. ] and 1111 1110 1100 1111 1101 1111 1111 1110 and if I write "100", 100 appears on the LCD. oh.. i might have found the solution.. is it possible to get beyond the limitation of the size of number..
Reply
Please log in before posting.