Close
0%
0%

1802 MemberChip Card

A retro-microcomputer in a micro-package. Learn from the ground up, just like the pioneers. Has monitor editor assembler BASIC FORTH LISP...

Public Chat
Similar projects worth following
The MemberChip Card is a complete microcomputer that fits in a tiny Altoids Smalls(R) tin.

- 1802 microprocessor, 32k RAM, 32k EPROM, and serial I/O.
- Build it yourself, and learn to solder. Entirely built with through-hole parts, big pads, and wide spaces.
- "Heathkit" style educational instruction manual with programming and hardware examples.
- Software includes monitor, visual debugger, mini-editor/assembler, BASIC, FORTH, LISP, VTL2, and Adventureland game.
- Expansion bus for additional I/O.
- Micropower operation; runs on batteries, PV panels, etc.

Once upon a time, microcomputers were simple and easy to understand. So simple in fact that a kid like me, with no computer experience whatsoever, could actually understand them, build them, program them, and put them to work in his very own projects! My first computer was the COSMAC 'ELF', built from an article in the August 1976 issue of Popular Electronics magazine. It used the RCA 1802; an exceptionally easy to use microprocessor. The ELF taught me about computing, and got me started on a career in engineering.

Today's computers are far more powerful than the 1802. But they have also become so complicated that almost no one can build them, or truly understand how they work. They come on pre-assembled boards, and require a powerful PC to download pre-written programs to do anything. The opportunity to learn from the bottom up is missing; it's as if the lower rungs of the ladder have all been cut off, so you have to somehow start at the top.

The MemberChip Card is my attempt to return to the basics. It's the "bicycle" of computers; simple enough so someone with no prior experience can get started, build and program it, and learn about the fascinating world of electronics and computing!

Hardware

  • CPU: RCA CDP1802ACE microprocessor
  • Clock: 4 MHz ceramic resonator
  • Memory: 64k (32k bytes RAM, 32k bytes EPROM)
  • I/O:
    - 4800 baud TTL serial port (for use with USB-serial adapter)
    - 20-pin I/O expansion connector (with data bus, R/W, and I/O port select strobes)
    - one 1-bit output (with red LED, for serial output)
    - four 1-bit flag inputs (one with green LED, for serial input)
    - one interrupt input
  • Connectors:
    - 6-pin power+serial connector (mates with USB-serial adapters)
    - 20-pin expansion connector with power, ground, and I/O signals
  • 100% through-hole construction (no surface-mount)
  • Size: 2-1/8" x 1-3/8" x 5/8" (55 x 35 x 15 mm)
  • Power: 3.6v to 5v DC at 2-3ma (depends on whether the LEDs are lit)
  • Aroma: A hint of curiously strong peppermint

Software

  • Standard ROM:
    - Machine-language monitor to examine/change memory and registers
    - RCA floating point BASIC3
    - Vintage Adventureland game by Scott Adams
  • Advanced Elf-OS ROM by Mike Riley:
    - MINIMON monitor program
    - EDT/ASM mini editor/assembler
    - VISUAL/02 visual debugger
    - Integer Tiny BASIC (a classic from the 1970's)
    - FORTH (an interactive stack-oriented programming language)
    - LISP ( a pioneering programming language still used today)
    - VTL-2 (a Very Tiny Language, even simpler than BASIC)

How did I get it so small? Here's the trick: It uses just one normal 2-sided PC board, but with parts mounted on both sides, to effectively double the space. They are carefully positioned so their pins miss each other, and are accessible for soldering. The PCB and schematics are also old-school; they were produced with last-century OrCAD software running on a 30-year-old PC.

The MemberChip card itself has a small amount of I/O for simple projects. But you can add expansion cards to greatly expand it. Here is an example of an I/O expansion card built by Herb Johnson using the 8255 (or 82C55). It adds three 8-bit expansion ports.

The schematic for it is shown in the gallery above. The red connector plugs into the 1802 MemberChip card expansion port, and the dual right-angle pin header at the bottom brings out power, ground, and the 24 I/O port pins. It was hand-wired on a piece of perfboard. Below is a photo of it plugged onto the 1802 MemberChip card to make a very compact 2-card stack.

MC20ANSA.BIN

This is the standard MemberChip card system ROM. It contains the 1802 monitor by Chuck Yakym, floating-point BASIC by Ron Cenker, and Adventureland game by Scott Adams and Richard Goedecken. Burn it into a 32K EPROM (27C256 etc.) and install it at U2.

octet-stream - 32.00 kB - 03/28/2023 at 20:13

Download

BASIC3v11user.pdf

Here is the manual for RCA's floating point BASIC level 3 by Ron Cenker that is included in the MemberChip card standard ROM.

Adobe Portable Document Format - 189.01 kB - 06/10/2023 at 18:37

Preview
Download

ELFOSDA.BIN

This is an alternate MemberChip card system ROM with Mike Riley's ELF-OS mini 1802 operating system. It contains a monitor, visual debugger, editor, assembler, integer BASIC, FORTH, LISP, and VTL2. Burn it into a 32K EPROM (27C256 etc.) and install it at U2.

octet-stream - 32.00 kB - 04/21/2023 at 02:44

Download

1802ME.ZIP

This ZIP file contains the Gerbers for the MemberChip PCB layout. These can be submitted to the PCB vendor of your choice to make your own PC boards.

x-zip-compressed - 26.65 kB - 05/11/2023 at 21:26

Download

  • 5 × C1, C2, C3, C4, C5 0.1uF 50v ceramic MLCC capacitor
  • 1 × Q Red LED high brightness T-1
  • 1 × EF3 Green LED high-brightness T-1
  • 1 × P1 Header 6-pin on 0.1" centers
  • 1 × P2 Header 20-pin on 0.1" centers

View all 15 components

  • 9/20/23 Update

    Lee Hart2 days ago 0 comments

    I added a link to Josh Bensadon's short Youtube video demo of the MemberChip Card. (Thanks, Josh! I've never made a video in my life, and didn't know how I was going to add one to meet the contest rules.)

    I now have a program to read files from the upper pages of a larger EPROM. This opens the door to using a file system like Mike Riley's Elf/OS.

    The standard ROM is 32k bytes (1 bank), and is simply addressed from 0-32k. But by rewiring the chip-select logic (a single 74HC132), the 1802 can select up to eight 32k banks in a larger ROM.

    Here's the trick: EPROM /CE is selected by *either* /MRD or /MWR, and address bit A15 is connected to EPROM /OE. This means any address from 0-32k selects the EPROM. Obviously, you can't write to an EPROM.

    However, 1802 I/O instructions move bytes from the data bus to/from memory. For example, the INP 1 instruction sets /MWR low, puts the register pointed to by X on the address bus, and writes whatever is on the data bus into that memory location *and* into CPU register D.

    INP 1 thus sets /MWR low (to select the EPROM), sets /MRD high (addresses the upper 32-64k bank), and register X provides the other 15 bits of the address to read in that 32-64k bank. The byte read from the EPROM goes into the 1802's D register. It can subsequently be used, or saved anywhere in RAM.

    The 1802 has three bits (N0, N1, and N2) to indicate the I/O port address. The INP instructions set these to reflect the I/O instruction (INP 0 to INP 7). These three bits can be connected to the address bits of larger EPROMs to address up to 256K bytes of banked memory.

  • 8/27/23 Update

    Lee Hart08/30/2023 at 03:25 0 comments

    More updates to the manual at sunrise-ev.com/photos/1802/1802me-manual.pdf.

    I figured out a clever scheme to double the EPROM size (from 32k to 64k) with bank switching. This will allow me to put both the standard and alternate ROMs in at once. Now I'll have to see if there's enough room on the PCB to actually implement it!

    Numerous small bug fixes and enhancements have been made to the Alternate ROM software.  Allow tabs in the editor. Handle the illegal 1802 opcode 68h in the monitor and debugger. Add new words to FORTH, etc.

  • 6/2/23 Update

    Lee Hart06/03/2023 at 00:00 0 comments

    Added some new material to the manual, and updated the parts list.

    I've also started to document the programs in the Alternate ROM package. It has tiny versions of several classical programming languages (BASIC, FORTH, LISP, etc.) so many users will need some "hints" on how they work.

  • 5/15/23 update

    Lee Hart05/15/2023 at 18:38 0 comments

    Corrected a few typos on the schematic, and clarified the text. Updated the PDF manual.

  • Project Log

    Lee Hart05/13/2023 at 06:25 0 comments

    I've been working on this project for a few years, but only created this Hackaday.io Project on March 28, 2023. So I'm afraid my log will have to be retroactive. Here is the history of how I arrived at this point:

    1976: The August 1976 issue of Popular Electronics magazine had an article "Build the COSMAC Elf - A Low Cost Experimenter's Computer for under $80". http://www.exemark.com/Microcontrollers/PopularElecwebc.pdf I built one, and it worked! It taught me about computers, and started me on the path to a successful career in computers and engineering.

    1980's: I furthered my education by building and using dozens of kits; test equipment, TVs, stereos, ham gear, etc. I built many brands, but Heathkits were the best. Their great designs and excellent manuals taught me how to solder, what parts look like, and how to troubleshoot and repair your own gear. College taught me the theory; but Heathkits taught me the practical side of electronics. I figured if I was going to make a kit, that was the way to do it!

    2010: I retired; but still had the "itch" to do something with electronics. But computers were no fun any more. They had become appliances that were designed, built, and programmed by "someone else". They were mainly used for games, entertainment, shopping, and social media. People bought pre-assembled boards, and ran pre-written software, to do things that someone else wanted you to do.

    So, I designed an updated version of my old COSMAC Elf. It ran the same software, but had greatly expanded speed, memory and features. But it was *still* simple, easy to build, and cost under $80. It was entirely built with vintage parts and through-hole technology, and fit in an Altoids tin. I called it the 1802 Membership Card. http://www.sunrise-ev.com/1802.htm Quite a number of people wrote programs for it.

    2017: There is quite an active community of 1802 enthusiasts at http://cosmacelf.com/ For April Fool's day, someone mocked up an even smaller version of my 1802 Membership Card that fit in an Altoids Smalls tin, using surface-mount parts, DIP switches for the front panel, etc. But it was a fake; it didn't actually work. Commenters pointed out that "such a thing was impossible".

    Naturally, I took that as a challenge. :-) I started scheming and schematicing to see if there was any way to actually do it. I stripped the circuit to its absolute minimum, while still remaining a working computer, compatible with the existing Elf software. I wanted to stick to through-hole logic, so beginners (and old-timers like me with weak eyes and shaky hands) could build it. I figured out that it could be done with just five ICs; the CPU, RAM, ROM, address latch, and a quad NAND gate as "glue" logic.

    But there wasn't room for that many ICs on an Altoids Smalls size (2.15" x 1.35") PCB. I built and debugged a prototype, but it took two stacked PCBs. It worked, but was too tall to fit in the tin.

    2018: Chuck Yakym and others collaborated to put RCA's 1981 BASIC3 floating-point BASIC3 on the 1802 Membership Card. The same code ran in my MemberChip prototype, too.

    2019: Aha! What if I mounted the chips on both sides of the PCB! This is often done with surface-mount parts. But with through-hole, there have to be pads for the pins on both sides. It took quite a while to figure out a layout so the top and bottom IC pads missed each other. I also had to work out an assembly order so putting parts on one side didn't block access to soldering the parts on the other side.

    2020: I made my first batch of PCBs, and sent them out to various friends in the 1802 community. Since it ran the same software as my regular 1802 Membership Card, it was immediately usable with a number of programs. I got lots of good comments on fixes and improvements, and started writing a manual.

    2021: Based on the feedback, I made a new batch of rev.A PCBs. The main addition was a 20-pin expansion port, plus some tweaks to make it easier to build and a better fit into the...

    Read more »

View all 5 project logs

View all instructions

Enjoy this project?

Share

Discussions

Mark B Jones wrote 04/24/2023 at 16:51 point

Loving your concept and idea Lee, kids need better accessible entry into tech, engineering, programming and IT and this looks a real cool way to tap into their curiosity. have followed, would be great if you could follow me too 🙏 hackaday.io/zxfan

  Are you sure? yes | no

Lee Hart wrote 04/25/2023 at 05:54 point

Thanks Mark! I'm hoping that the unusual form factor and "story" in the manual will help get beginners interested. I'd love to hear comments on what people think, and how I could improve on it.

  Are you sure? yes | no

Lee Hart wrote 04/12/2023 at 23:24 point

Yep! All it takes are 8 data switches and a one-shot to DMA bytes into an 1802. A serial loader program is about 16 bytes. Tedious; but that's how it was done before EPROMs.

On the cosmacelf.com list, we recently talked about a diode-ROM. A 1-of-16 decoder, pull-up resistors, and a handful of diodes can provide a "ROM" with that 16-byte serial bootloader.

Or, a vintage UART like the 1602 or 1854 can be wired to the 1802's DMA channel, so every serial byte received goes into memory. That can bootload programs with no ROM, front panel, or other hardware.

  Are you sure? yes | no

crun wrote 04/13/2023 at 01:15 point

Compressing diode roms - now there's a fun time waster. Especially for small roms where the code will never change. Like this.

1) Using shift registers or analog switches instead of decoders, you can choose the polarity to minimise the number of diodes. (i.e. use pull up or pull down R's to minimise the number of diodes. In a cosmac, choosing a particular register might help

2) You can mix pull up and down by bit to minimise the diode count on each bit. Either invert that bit line with a transistor, or use transistors instead of diodes to invert in the rom 

3) You can double diode so that where there are common groups of diodes (e.g 4 diodes select a register) you have that group common, and connect it to the decoder with another diode.

4) Sometimes an address line can correspond to a bit. A bipolar or fet can gate this.

  Are you sure? yes | no

Lee Hart wrote 04/13/2023 at 01:48 point

See http://sunrise-ev.com/1802.htm#nametag for an extreme example of this. It uses the 1802 to display a 32-character scrolling message with *no* RAM or ROM! The program is created by the network of resistors between the address and data buses.

  Are you sure? yes | no

crun wrote 04/13/2023 at 20:27 point

> http://sunrise-ev.com/1802.htm#nametag for an extreme example of this.

I bow down before thee !

  Are you sure? yes | no

crun wrote 04/13/2023 at 01:19 point

Of course a punch card / paper tape reader needs 9 piece of wire or 9 phototransistors if you want to get fancy. That would be the cheapest and simplest way. Also allows longer roms. Easy to laser cut the cards nowadays.

Not to forget marksense cards. The user has to colour in the paper rom with a 2B pencil. I measure ~50k, so easy to sense.

  Are you sure? yes | no

crun wrote 04/12/2023 at 22:23 point

So another possible architecture here is to dma the code into ram and ditch the eprom. Adding a shift register would let the ftdi bootstrap the ram with it's non-uart spi function.

It would be further possible to use a simple r-c-d circuit to let normal uart signals push 1/0 into the shift register (you only put one bit / char into the SR). e.g char 0xFE=1 , 0x8F=0 , 0x00=DMA strobe byte. (so 9 chars per byte)

A specially crafted bootloader file would be required (but no special hardware or pc software), but this is very much like bringing up a pdp11, where you had pre-bootloader to load the bootloader paper tape. All that would be required is the bootloader file, and any serial terminal to dump it out at the required baud rate.

  Are you sure? yes | no

crun wrote 04/12/2023 at 22:23 point

My 1802 used cmos rams. What was nice about 1802, was it had the DMA pin, and so you could write switches direct into ram, i.e. toggle* the code in without having to have an eprom programmer. (The other issue being that roms were total power hogs - the true cmos rams and fully static 1802 drew less than 1uA ).

*[I made a hex keypad to do it pretty quick, as setting toggles was beyond tedious. I had no serial terminal, and thus no monitor, so programs were keyed in as hex, from the beginning every time. Made a strong incentive to try and get it to work first time]

  Are you sure? yes | no

Lee Hart wrote 03/30/2023 at 02:10 point

Glad you like it. I'm still working on it, so will be adding to the hackaday.io page as I go. What do you think of the manual? I'm trying to get novices interested.

  Are you sure? yes | no

Dan Julio wrote 03/30/2023 at 00:25 point

Always had a sweet spot for the quirky 1802.   Nice job Lee.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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