Post Reply 
Scientific RPN Calculator (with ATTINY85)
03-23-2018, 05:45 PM
Post: #45
RE: Scientific RPN Calculator (with ATTINY85)
Hi Maximilian!

Good to see how fast you go on.

I'd like to help with "starting scary after switching on":

So the first thing is to check the pins of the hardware and software:

Code:
#define DATA   2 // 5 green    // ATTINY85
#define CLOCK  1 // 6 yellow   // HW-pins: 8 7 6 5  SW-pins: 3 2 1 0
#define STROBE 0 // 7 orange   //          1 2 3 4           4 5 6 7

Second is the initializing software in the setup-area:

Code:
  //cmd(0x88); // Activate and brightness "1000 abbb" (a=1)
  cmd(0x88 | EEPROM.read(EEADDRBRIGHTNESS)); // Read brightness from EEPROM (saved with ff)
  for (byte i = 0; i < STACKSIZE; i++)       // Read stack from EEPROM (saved with ff)
    EEPROM.get(EEADDRSTACK + i * sizeof(double), stack[i]);

If you have deleted the load-stack-from-EEPROM-lines you should uncomment the first line to activate the display and set the brightness.

If you did not delete the EEPROM-loading you are reading garbage after flashing. Note the according instructions in the readme file for initializing the display (at least pressing CLX, than f-CLX and 3 times the f-key should help):

Code:
  FIRST LAUNCH AFTER FLASHUNG THE ATTINY85:
    As ScArY saves the state (stack and brightness values) when pressing the
    f-key twice (screensaver) it also loads the state after switching on.
    But flashing the ATTINY may clear the EEPROM. So the loaded state when
    switching on the first time after flashing gets undefined values
    (... and maybe a dark or nonsense display).
  So the following procedure may help to bring ScArY in a defined state:
    1 Press CLX (X=0) ... even if the display remains dark
    2 Set brightness (f-CLX) ... at least a nonsense display should be readable
    3 Press CLX (X=0) ... value of 0 should be readable
    4 Press ENTER 3 times to clear the stack (X=Y=Z=T=0)
    5 Press STO (f-1) to clear mem
    6 Press f twice (f-f) to save the state to the EEPROM (activates screensaver too)
    7 Press f to (re)activate the screen
    8 Done! (till you flash the ATTINY again)

Regards
deetee
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-23-2018 05:45 PM



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