AnsweredAssumed Answered

Numbers to ASCII

Question asked by Matthew Smith on Nov 10, 2012
Latest reply on Nov 11, 2012 by Erich Styger

I am sure that this utility must exist, hey, there may even be a ProcessorExpert bean for it - but I don't know what it would be called or what to look under.

 

Having a bit of trouble getting results with ADC on HCS08 - not sure what is going on, so what I would like to be able to do is to send the value of a variable off over the UART at various steps in the code (or when I change certain inputs.)

 

What I want is something small and efficient that can take an int, and convert the value to an ASCII (human-readable) representation, which I can send out over the UART and view through the Linux screen utility.

 

I could have a stab at writing something myself, but I am sure that it would be anything but efficient, and probably not appropriate for a light-weight embedded system (I come from a high-level language background [Perl].)

 

Is there a tool for this ready to use and, if not, what exactly would a utility like this be called?

Outcomes