Hi all,
Let me try and explain something here, I have bought a simple basic compiler for the Z80 micro, this compiler has a quite a comprehensive set of basic commands.It's data types are: bit,byte,integer, long(4byte integer) and single float(4 byte or 32 bit).This compiler even has a full transcandential math function support. The problem with the compiler is that it has limited i/o commands and these are 'put' and 'get' to and from ports. It also has the 'print' command which works exclusively with a uart like the 8251 and it does output floats to the terminal correctly, so the compiler is decoding 4-byte floats to 8/9 digit ascii, when using the 'print' command.The Z80 compiler does not have string support and does not have any commands for outputting floats to a lcd and this is my problem.
The solution seems to be to implement a small avr, of which can easily be coded, as I already have a very powerful compiler(Bascom-AVR). So I could code up the AVR to receive(only) 4byte floats+command byte. So the Z80 would bit bangs 4 +1 bytes to the receive only avr which basically displays the float or anything else for that matter, on a lcd. And walla, I have a powerful Z80 compiler with lcd support.
My prime interest with MPU/MCU 's is in calculator design, i.e., designing retro cool looking calculators. I already have coded up a HP45 in an AVR '168 and it works great, it is keystroke for keystroke identical to the HP45 but even so it does have some short comings, one is accuracy, I used single floats in the design and there is a lot of i/o string conversions going on which cause a small errors every time processing is done going from number to string and converting back again, causes small errors that grow with more processing.Of course real calculators never did use 32bit/64bit floats, they use/used 12 digit bcd and display 10 of the digits, very wasteful of ram, but this is not a problem anymore and avoids using strings altogether so no accuracy lost there. Anybody with an algorithm to multiply/divide 12 digit packed bcd? Is a compiler powerful enough to build your own data types?
Cheers
Commie