Post Reply 
and now for something completely different...
03-17-2015, 01:45 PM (This post was last modified: 03-17-2015 02:09 PM by robert rozee.)
Post: #1
and now for something completely different...
hi all,
i'm wanting to float an idea, and hear what positive comments folks out there might have. the idea is of a pocket scientific calculator that is written in BASIC.

an aussie fellow by the name of Geoff Graham has produced a single-chip BASIC solution running on a 28-pin DIP device from microchip, a PIC32MX170. the processor + BASIC is called a "micromite" (running MMbasic) and has the following interesting features:

- 60k of space for BASIC code executing from flash
- 52k of RAM available to the running program
- ability to add 'custom functions' written in C
- built in support to drive standard LCD dot-matrix modules, 16x2, 20x2, 40x4, etc
- more than enough spare pins to scan a keyboard
- CPU speed adjustable with BASIC from 5MHz to 48MHz with current consumption less than 1mA/MHz
- runs on 2x AA batteries (3v). good down to 2.3v
- programmed through an attached VT100 terminal, then operates standalone

from the hardware perspective, this seems like a good candidate to run a pocket scientific calculator. current consumption is acceptable (300 hours run time form a pair of AA cells), and beyond switches and an LCD module no additional electronics is required; the micromite needs just one additional component to work, a 10uF ceramic capacitor.

form the software perspective. well:
- there is an 8-byte integer format that could be used as a 'container' to hold 15-digit BCD reals (IEEE754 'Decimal64' format)
- custom C functions can easily be created and linked into the code to perform the maths functions. these could be repurposed from the WP-34S project
- the BASIC language implemented is pretty feature-rich, with comprehensive support for strings, interrupt events, timing, etc. writing a UI would be relatively straightforward, as would implementing the calculator framework. the BASIC code would be blissfully unaware of the FP numbers that were being pushed around.
- by attaching a USB to serial bridge and running a terminal emulator, the calculator owner would be able to make their own alterations to the UI. custom functions are the only thing that need to be created externally.

what do folks think of the idea? could it all be done in 60k of BASIC code? there is the possibility that this 60k could be expanded upon, with the custom functions moved outside of the 60k limit, or by switching to an SMD version of the processor with twice as much flash. if programmability was desired, user programs could be held on external I2C or SPI memory devices. the BASIC supports both buses.

am hoping for some lively discussion!

rob :-)
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
and now for something completely different... - robert rozee - 03-17-2015 01:45 PM

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