| ??? 07/18/00 13:20 Read: times |
#3817 - RE: hex to ascii |
Questions:
By "3 digit hex" do you mean: (1) a binary value between 2^0 and 2^11 (2) 3 nibbles in to bytes of values {0000b to 1111b) By "ascii" do you mean: (1) An ascii string of 3 characters representing the three digit hex equivalent. (2) An ascii string of characters representing the value in a decimal character string or some other number base. (3) A mapping of a 12 bit binary into two 7 bit ascii characters. Usually, it would be interpreted as converting 3 nibbles into 3 ascii characters. Two methods can be used, (1) convert 0000b to 1001b to {0..9} and with a range test 1010b to 1111b to {A..F} or (2) use the MOVC A,@A+DPTR to do a quick character lookup into a 16 character table. The latter method is preferred when writing to a LED device when the pin mappings are contorted for the convenience of the PCB trace layout. Hopefully the PCB layout didn't contort all LED numerics DIFFERENTLY as that would involve separate tables for each display digit. By the way... I do PCB trace contortions for better layout geometry but I maintain all digits with the same mapping. -Jay C. Box |
| Topic | Author | Date |
| hex to ascii | 01/01/70 00:00 | |
| RE: hex to ascii | 01/01/70 00:00 | |
| RE: hex to ascii | 01/01/70 00:00 | |
| RE: hex to ascii | 01/01/70 00:00 | |
| RE: hex to ascii | 01/01/70 00:00 | |
| RE: hex to ascii | 01/01/70 00:00 | |
RE: hex to ascii | 01/01/70 00:00 |



