How to convert the decimal value to hexadecimal value which needed to be stored in the timer? for example: Timer Low and Timer High only need 2 values such as the 0xFB. How can we extract it if we able to get the hexa from decimal? Have any ideas abt this ? thanx
"... communicating to the embedded controller over a serial port the ASCII string to integer conversion seems best done by the host application." Maybe, maybe not. There are plenty of Gotchas! with sending pure binary data over serial links...
I've got some serial port code I tend to reuse or adapt as needed but it always includes some level of error detection and a retransmission request. Having the "What did you say?" command available forgives a lot of errors, of course the host application has to support this so again I usually write my own. The ASCII code wastes( or uses, depending on your viewpoint) a lot of bits to represent digits.