Format and print once used similar algorithms to convert to decimal. It was the one which is still implemented in the format library. It is quite slow and limited to dwords. When I rewrote the print library, I planned to rewrite the format library, too, but I found no time yet. The new approach runs on very small devices like pic10f322, as you can limit it to work with bytes or words only. And it can work on larger variables like byte*255 (or even byte*256, cant remember what the compiler supports). It can therefore output numbers with 300 decimal digits, and there are samples which show at least byte*32.
I thought it was well tested within the last six years. Which chip are you using? Can you run an unmodified print sample?I see, all print samples are serial. Might this be an issue? Greets,Kiste Am Montag, 1. April 2019, 23:07:31 MESZ hat Rian De Rous <[email protected]> Folgendes geschrieben: I made some progress on this issue... At first, casting was indeed my issue. After using devices like ARM M3 and Raspberry Pi that have more than enough ram and where 32-bit datatypes are common practice, i forgot that this is important.... If you don't do this, the answer is indeed 16... (wich is in that case correct behaviour for the compiler, but gives the incorrect result)... print_dword_bin(lcd,c) -- ok!print_dword_hex(lcd,c)-- ok!print_dword_dec(lcd,c)-- not ok!format_dword_dec -- ok! The format library works, but the print not (at least with decimal formatting, binary and hex is ok)... So there's a problem. I tried to print a byte with a loop (all numbers 0-255) to my lcd with the print_byte_dec, but it seems to display the ASCII table instead of the digits. I wonder why both libraries doesn't share common code. The print and format library require both a function to split a byte, word, dword, ... into seperate digits. Now I there are two different implementations for this.... (and there may be an issue with one of them)... -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout.
