Close
0%
0%

Toy BASIC Computer

BASIC Programming Language on a PIC18F26K22

Similar projects worth following
Essentially a single-chip BASIC interpreter implementation w/RS-232 interface and 256KB of program storage. It's powered from a USB port, but the I/O interface is old-fashioned RS-232.

This project pretty much worked in reverse from how one would normally do a design. Normally, you'd select the processor (and other hardware) based on the required functionality. In this case, I had some spare processors and so defined the functionality to match the hardware limitations.

The schematic is quite simple & straightforward. Note that the PIC's PORT A is unused (shown connected to J4 in the schematic), so could be used for digital input or output if someone wanted to add appropriate statement code.

The PCB is laid out with ExpressPCB, using their MiniBoard service. I have Eagle, I could have used it & made the PCB smaller and cheaper to buy in small quantities, but I hate it so I only use it when I have to (i.e., someone is paying me to use it). It uses a mixture of surface mount and trough-hole parts. The ICs are all surface mount with the exception of the voltage regulator. That's mostly because I had some TO-92 regulators on hand, so it saved a few cents in parts cost.

The PDF file has the documentation for the project, including the details of the dialect of BASIC that it supports. Note that I did NOT use Tiny BASIC, which seems to be very popular for projects of this nature. It's a complete, from-scratch implementation designed to make maximum use of the limited RAM in the PIC processor.

Source code is in the ZIP file. It is licensed under GPLv3.0

Sample Programs.zip

Sample BASIC programs: BATNUM, CALENDAR, HAMMURABI, PRIMES, SLOTS, WUMPUS

x-zip-compressed - 7.69 kB - 06/03/2017 at 02:54

Download

gpl-3.0.txt

Software license

plain - 34.97 kB - 06/02/2017 at 20:06

Download

Toy BASIC.zip

Source code & MPLAB project files

x-zip-compressed - 319.07 kB - 06/02/2017 at 19:08

Download

Toy BASIC.hex

Firmware HEX file

hex - 80.46 kB - 06/02/2017 at 18:44

Download

TBasic.pcb

PC Board Layout (ExpressPCB file)

pcb - 20.62 kB - 06/02/2017 at 18:34

Download

View all 7 files

  • 1 × LP2950-3.3 3.3V Voltage regulator
  • 1 × PIC18F26K22 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × SST25PF020B Memory ICs / FLASH Memory
  • 1 × SP3232 Interface and IO ICs / Multiprotocol Transceivers
  • 1 × Micro USB connector

View all 14 components

  • Demonstration Video

    Steve Toner06/21/2017 at 15:55 0 comments

    Here's a demonstration video :)

  • The Prototype

    Steve Toner06/20/2017 at 03:08 0 comments

    btw, here are photos of the prototype. It easily fits on a Busboard BR1. The only part that is not available as a thru-hole part is the flash memory chip, which needs an adapter. So if you want to build one but are put off by having to make a PCB for it, this is the simple solution (provided you can read a schematic and know how to solder).

    Wiring is done with wire-wrapping wire. I have some pre-cut lengths that I bought as a package around 1980 (!) - still haven't used them all up. But you can just get a spool and cut them to custom lengths...

    The two empty sockets are for testing the DAC as an audio output. It's easy to generate triangle waves. Passed through a low-pass filter, they don't sound horrible.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates