converting to ascii
jsesti
Posts: 5
is there a command that allows me to convert a value·to ascii?
thanks
thanks
Comments
Take a look at "Simple_Numbers.spin" located in the directory that you installed the Propeller IDE.
What you have to do is basically look at each digit and then offset each digit by $30.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Of course, $30 means hexadecimal 30, binary 110000, or decimal 96 48. (AJM yup, saw too many 0's I guess).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 7/2/2009 5:25:13 PM GMT
as a global answer to your global question "is there a command that allows me to convert a value to ascii?"
the global answer is: Yes.
If I would stop writing here it would be unsatifying.
The FullDuplexSerial-object and it's derivates FDX+, Extended_FDSerial etc. have a method
DEC.
You call this method with a value as parameter and the method is sending out a single character or a string which is the ascii-code or ascii-codeS of the digits
of the value.
But there are many other ways how your question could meant to be.
So please describe in detail what you would like to do in the end.
best regards
Stefan