Close

Won't Fit

A project log for How Far is Mars

A project to continually display the distance to every planet

bill-smithBill Smith 11/12/2015 at 05:000 Comments

I used my scripts to build a full set of arrays of the function tables. I used all of the data from the files of formulas to generate fixed-point C constant files.

I compiled the C constants. The .o file was 254218 bytes long. I'm not sure how much overhead there is in the .o file, but it can't be much considering the data is all large unsigned char arrays.

That means that the data tables won't fit in a AVR. I don't want to upgrade to a 32 bit AVR or ARM that have enough flash to save the tables. I like that making an AVR as the host is something that I can put on a PCB and be pretty confident that it will work the first time. I'm pretty confident different platform than 8 bit AVR would be better but I don't want to go there yet.

In my parts box I have a 4 MB flash chip that I can use to hold the parameters.

Today's project was writing Perl multiple precision algorithms to build CORDIC algorithms and make the calculations outside of the microcontroller. I only got multiplication working because I spent a lot (too much) time writing testing code.

It's looking like I'm fortunate that you can calculate the d/dt of the position. That way I can do the full calculations in the background yet keep the display moving continuously.

Discussions