Close

ESP32 Mockup Completed

A project log for Terminal-BASIC programmable calculator

A poket-to-laptop size microcomputer/programmable calculator, based on Arduino DUE and Terminal-BASIC

ptravptrav 5 days ago1 Comment

Finally got the working mockup running. Currently the hardware includes:

The LCD part can be easily removed from the primary board - it is held attached by a header.



Power consumption in this configuration:

I have also compared this to the power consumption of Arduino Mega 2560 with a TFT 480x320 color screen and an SD card (see the video in the Project Log 01). Two different Mega we used: "Classic" and "OSEPP" (in brackets).

I could not find an elegant way of disconnecting/managing the TFT power and the TFT backlight as it is mounted on a shield.

Obviously, Mega with a BW LCD would make a decent calculator with about 30-50 mA consumption, which equates to one month of a continuous running! Unfortunately, this system has only 4-byte arithmetic, no real-time clock, no WiFi, etc.


The calculator connects to the PC in three ways:

The Terminal BASIC on ESP32 is working... kind of. I have replaced the capitalized keywords with a lower-case. 

The SD card code is not compiling properly as the ESP32 and the Arduino libraries are different - still working on it. The hardware is fully operational, and I am able to run independent tests:

The Terminal BASIC is seemingly having a hard time working with double-precision numbers on ESP32. This program calculates a factorial in integers:

Now replacing r% with r - for 4-byte floats:

Finally, we replace "r" with "r!" ("!" stands for long reals) results in busted stack!

Next: debugging Terminal BASIC on ESP32!

Discussions

Andrey Skvortsov wrote 5 days ago point

Absolutely great job! I will look at TB code for the possible double floats problem.

  Are you sure? yes | no