Post Reply 
Scientific RPN Calculator (with ATTINY85)
03-08-2018, 11:05 AM
Post: #22
RE: Scientific RPN Calculator (with ATTINY85)
Hi all!

It is like christmas - the codesize is now 7368 bytes which means I have 824 bytes free for more functions!

I changed (see attached code file):
* Stack variables (xyzu) as global (incl. push and pull subroutines) -510 bytes
* Declare subroutines and some local variables as static -224 bytes
* Own subroutine _sqrt() which holds calculation formula -37 bytes
* Bug: Push stack if number entering starts with '.' +16 bytes
* Bug: 1/x for negative values +4 Bytes

Some hints did not free space:
* Own CASE for atan and atanh (+16 bytes)
* Replace log10() with log()/log(10) (+50 bytes)

For some hints I have further questions:
* @Pauli: I can not see how to merge asinh and acosh

Some hints mean spending more time:
* Avoiding some math functions
* Minimize buttoncast()

And there are topics where my knowledge is to weak:
* How can I reduce the optimization level in the arduino suite (IDE) to check if the code will become smaller?
* I would like to place data in the EEPROM (512 bytes) and read it with EEPROM.read. But when I flash the ATTINY85 (via Uno as ISP) the EEPROM of the ATTINY is deleted. I read something about setting fuse EESAVE. How can do this in the arduino suite (IDE)?

Next plans:
It is relatively easy to implement
* physical constants to EEPROM (but how to not burn EEPROM?)
* statistics/regression
* conversions: polar/complex h/h.ms
* functions: nCr nPr

What is your opinion what to implement first (as long as free memory exists)?

Regards
deetee


Attached File(s)
.txt  180308_scary.txt (Size: 25.11 KB / Downloads: 10)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Scientific RPN Calculator (with ATTINY85) - deetee - 03-08-2018 11:05 AM



User(s) browsing this thread: 1 Guest(s)