Hello all,
thanks for the help,
Well, as I see in the robot club,
the younger people, who have all the luxury of they lives today,
they can order electronics part from anywhere in the world, for almost no money.
Today, the robot club haves only older guys (+55 years and older), who are building autonomous robots.
So, I want to proof that with very old hardware (68HC11 8 bits cpu) you can join the yearly robot contest.
But, this cpu runs on 8 MHz clock, and need 4 clocks per 8bit machine instruction.
So, I have a assembler FP library for the 68HC11 cpu, but this is very slow to calculate Cos(), Sin(), Tan(), Sqr(), ...
I want to use a lookup table for this, stored in an EPROM 27C40 or FLASH 29C40 = 4 Mbits = 256 KBytes
For my application I need 0.00 to 360.00 degrees in a resolution of 0.01 degree.
This gives me 36000 * 4 bytes/Single FP = 144000 bytes in memory.
In combination with Cos and Sin this is ok for the volume of the EPROM/FLASH.
To program this EPROM or FLASH, I use a (very old) PROM programmer,
So, to calculate this values I want to use PB to create this lookup table.
I want to use the IEEE 754 FP notations for this.
1 Sign bit, 8 exp. bits, 23 fraction mantissa bits = 32 bits FP data.
I did this more than ones in the years 1970+,
the manual conversion from DEC to Single FP 32bits.
But I had have to look on YT for doing the conversions (Old guy).
Here an example:
Sign = 1 bit
Exponent = 8 bits
Mantissa = 23 bits
Code: Select all
USER VALUE DECIMAL : 263.30
---------------------------------------------------------
BINARY LEFT VALUE : 100000111
BINARY LEFT VALUE LENGTH : 9
000000000011111111112222
012345678901234567890123
BINARY RIGHT VALUE : 0100110011001100110011001
---------------------------------------------------------
BINARY SIGN BIT : [0] 0=[+] / 1=[-]
BINARY EXPONENT : [10000111]
BINARY MANTISSA : [00000111010011001100110]
S EXPONENT MANTISSA---------------
BINARY IEEE 754 NOTATION : 0 10000111 00000111010011001100110
BYTE 0 [Binary] : 01000011
BYTE 1 [Binary] : 10000011
BYTE 2 [Binary] : 10100110
BYTE 3 [Binary] : 01100110
Thanks marc,