HEX or Binary numbers to ASCII numbers
ratoth
Posts: 4
I am currently working on a project for my instructor. I have designed a device that gives me the time between AC voltage and current (power Factor). I am using pulsin on the BS2 to measure the result and I would like to display these results on the Parallax serial display (2X16). All went fine untill I tried to send the display numbers after converting to degrees. I realize I need to convert these Hex or Binary numbers to their ASCII equivalent, for the display to understand them. I begin with a 16 bit word, 42 microseconds per degree, my results are 0 to 180 (Degrees) lead or lag. Do you have a routine that can help me? Any help you can offer is extremely appreciated. This device will be duplicated as a tool for all lab benches at Cuesta College, it is more than just a student project. Thank You for any and all help,
Robert Toth
ra-toth@hotmail.com
Robert Toth
ra-toth@hotmail.com
Comments
Jim
value DIG n ' returns the nth decimal digit of value.
debug DEC value DIG n + "0" prints the ascii value of the n'th digit.
Robert Toth
SEROUT TX, LcdBaud, [DEC time, " ", "DEG"] ' send to LCD
LcdBaud= Baud rate for the LCD.
time= captured time from PULSIN
Thanks again for all your help.
Robert Toth
Edit. I take it back. I reread your original post and saw "after converting to degrees". My bad