<< Back


Cesky: , English:

TI58 tiny - replica of the calculator TI-58C


Replica of TI-58C calculator with ATmega8 processor.
Accuracy of calculations to 19 valid digits, exponent 4 digits.

Originally it was an attempt to see if a very simple replica of the TI58 calculator could be programmed into a newer type of processor, the ATmega8. It has just enough RAM, ROM and EEPROM for such a task. So I didn't address the mechanical side of it - with the understanding that if the software succeeds, then I'll address the design. For maximum code economy, the firmware was programmed in assembly language, using optimizations from the ZX Spectrum (macro language). The work went nicely and interesting results were achieved. Unfortunately, 90% of the work started to run out of ROM memory and it became obvious that the code would not all fit in the ROM. In addition, the code started to become quite cluttered thanks to the assembler and I started to get lost. So I finally gave up, even though I didn't miss much. To use a higher, bigger processor - that would have lost the point. It's a shame, because most of the firmware is done, so maybe I'll come back to the project sometime, but I'll more likely continue working on another calculator with a much larger processor programmed in C.

EDIT: Eventually I continued in assembler, with ATmega328P processor, and ET-58 calculator was created.

Note: Click to enlarge the images shown here


In contrast to the original calculator, much higher accuracy and exponent range has been achieved (the original calculator calculates to 13 valid digits with an exponent of 2 digits). Some functions have been improved - e.g. the '=' button repeats the last arithmetic operation. The program is stored in the EEPROM (512 bytes) and so is preserved even when the power is switched off. The RAM (1 KB) is largely used for user memory cells. The memory cells do not share space with the program memory and therefore there is no need to change the allocation between them (everything is always accessible). Each memory cell has 10 bytes, of which 8 bytes are signed mantissa and 2 bytes are exponent with a bias of 0x8000. The calculator design does not assume the use of library modules. The display can easily be changed to either blue or green.

What's done:

In its current state, the calculator can be used as a regular calculator - i.e. arithmetic operations + - * /, powers and square roots of y^x, natural and decadic logarithm and exponent, goniometric functions and inverse goniometric functions (switchable between degrees, radians and grads), memory handling (storing in memory cells, adding, etc.) are available.

What's missing:

Only a small part of the programming and program interpretation is operational. In the current state, only the repetition of the key sequence can be used when starting from address 0. Program control codes - GTO, SBR, Dsz, Labels, flags are not functional. Functions using microcode are not functional: Op, HIR, P->R, statistics and regression lines.

Possible continuations and improvements:

It is possible to get the programming to a functional state - i.e. jumps, subroutines, labels, flags. There might still be room in the ROM for that. With further optimization, it would be possible to make some of the microcode functions - P->R and basic statistics, using macro code (which is more efficient than the original microcode). The Op and HIR functions and more complex statistics and regression may already be problematic enough.

The calculator wiring can be simplified by omitting resistors R4 to R8 (in the keyboard columns), which originally counted on sharing columns with the display signals.

If the calculator is to be operated on battery, the following procedure could be used: using a 3.7V battery, charging from a USB cable via a resistor may be sufficient in the simplest case (even the original TI-58 did not have a more perfect charging). The display will be problematic in this case, because the V0 contrast control requires a 5V difference from the supply voltage. This is commonly solved by LCD displays for 3.3V that include a charge pump. These tend to be expensive. Many displays include a place on the PCB to add a circuit for the charge pump - see the article https://www.codrey.com/electronic-circuits/hack-your-16x2-lcd/ . However, the simplest solution is to generate the negative voltage directly by the processor - use the output of the multiplexer column of the keyboard and via a capacitor, diode and resistive divider create a negative voltage of about -1.8V which is fed to the V0 input of the display. In this case, it is advisable to stabilize the battery voltage to 3.3V so that the contrast remains stable even when changing the power supply. Another alternative is to multiply the battery voltage for the whole calculator by a switched multiplier to +5V, thus ensuring stable working conditions independent of the power supply.

Another possible enhancement is a serial Flash memory that can contain library modules and possibly the ability to store user programs. The MOSI/MISO/CLK pins could be used as signals, but in this case the keypad column exciters must be shared with the DBx signals for the display and protective resistors are required (to prevent shorting of the signals when multiple buttons are pressed simultaneously; when connected simultaneously, the signals switch between LOW and 3D states, so there is no risk of shorting and resistors are not required).


The display is two rows. The lower row is used for calculation and programming, the upper row is used to indicate switches and to display adjacent memory steps during programming. The switches displayed are Deg/Rad/Grd angular measure, Fx fixed decimal places 0..8, Eng/EE exponential mode (Eng technical mode where the exponent is a multiple of 3), 2nd function switch, INV inverse operation. The last position of the 1st row displays the arithmetic operation currently being performed.


The USB connector is only used to power the +5V calculator. Resistors R4 to R8 are not necessary, the COLx outputs switch between LOW and 3D states, so there is no risk of short circuit between them. The crystal can be omitted and the internal 8 MHz RC oscillator used instead, the speed of the calculator will still be considerable (it works much faster than the original calculator).


To simplify the design as much as possible, micro switches without a fingerboard were used as buttons, only protruding above the calculator surface. The display connects via a pin rail to allow easy access to the board. This allows for easy replacement of the display - both blue and green LCDs were tested. The board connection is just a single-sided connection, with a few wire jumpers. The size of the PCB is subject to the size limitations of the Eagle Free and the 10x7.5 cm PCB used.

bottom side:

top side (wire jumpers are sufficient):



labels under buttons:

printed circuit board (the edges got scratched because they have a weaker layer of photoresist, it was necessary to "rewire"):

Board is screwed to the bottom of the box:

mounted board and display connector:

the display is attached to the board by a spacer:

blue or green display can be used:


Source codes of TI58tiny with firmware

Wiring diagram in Eagle Free

Graphic documents (schematic and circuit board)

Complete download of documents

Used components

The total price for everything is about 400 Kc (including the box, photocuprextit, micro switch using the quantity discount for 50 pcs).

Miroslav Nemecek

<< Back