??? 04/16/09 20:33 Read: times |
#164675 - That's somewhat of a description Responding to: ???'s previous message |
Chico said:
Hello,
I'm trying to understand how the conversion of 16bit number to ascii occurs. I want to place a 16 bit code to a display. I could find some codes that make this, but could not really understand what they do, or why they do that way, I would like know some teory behind this, to understand, Google doesn't say much specifically about this. Can someone give some help to my neurons? Thanks. There's a significant difference, though. If he wants to display ASCII characters 0..9, he has to convert the value, nybble-wise to BCD, then add the BCD value to 0x30. OTOH, if he wants it in ascii-HEX, he has to compare the binary nybble with 9, then, if the value is 9 or less, add it to 0x30, else, given, now, that the value is greater than 9, he has to subtract 9 and add the difference to 0x41, or perform some equivalent operation. Don't you find those operations quite different, Andy? Neither is terribly difficult to understand, but ... RE |
Topic | Author | Date |
16bit number to ascii | 01/01/70 00:00 | |
Base conversion. | 01/01/70 00:00 | |
Number Base (Radix) and Place Value | 01/01/70 00:00 | |
ASCII | 01/01/70 00:00 | |
Right ... I forgot about that part. | 01/01/70 00:00 | |
What I'd wonder ... | 01/01/70 00:00 | |
Is it relevant? | 01/01/70 00:00 | |
That's somewhat of a description | 01/01/70 00:00 | |
D'oh! You've given it away | 01/01/70 00:00 | |
Well ... not quite ... | 01/01/70 00:00 | |
That was step 1. | 01/01/70 00:00 | |
not hard when talking in human language or C... | 01/01/70 00:00 | |
Irrelevant | 01/01/70 00:00 | |
Op code? | 01/01/70 00:00 | |
Ah, yes ... the Fairchild FND-70 driver ... | 01/01/70 00:00 | |
nybble-to-7-segment encoder | 01/01/70 00:00 | |
if... | 01/01/70 00:00 | |
30 years ago | 01/01/70 00:00 | |
That's a BIG if | 01/01/70 00:00 | |
Serial output | 01/01/70 00:00 | |
That might work in SOME cases ... | 01/01/70 00:00 | |
But I'm not that fast | 01/01/70 00:00 | |
What about infrequently recurring events? | 01/01/70 00:00 | |
FND-70 driver? Luxury! | 01/01/70 00:00 | |
Decoding DTMF | 01/01/70 00:00 |