Scientific RPN Calculator (with ATTINY85)
|
03-20-2018, 01:01 PM
Post: #40
|
|||
|
|||
RE: Scientific RPN Calculator (with ATTINY85)
Hello Pauli!
You know that I am not very fast - but finally I took up your hint that the casting of the keycodes to ascii-characters can be done smarter: (03-08-2018 01:43 AM)Paul Dale Wrote: * I think buttoncast can be done with the tables by renumbering the KC use 0x00 - 0x0F and some bit operations. A straight log2 of the key scan could be the key code but changes elsewhere (checking for digits using ranges) would need modification. There might be a smarter way. And you are right. I tried this faster and shorter code with your log2-idea: Code: static byte buttoncode() { // Returns byte value with key number And it saves me 40 (!) bytes more - great. Mayby there are more "gold nuggets" in your former posts ... Thank you again. deetee |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)