ROM-stack and serial for the 1802 Membership Card - superceeded


Note: this Web page is now superceeded as of Feb 26 2014.Please go to the updated ROM-RAM stack page at this link.

Last updated Jan 12 2014. Edited by Herb Johnson, (c) Herb Johnson, except for content written by Mark Thomas, Lee Hart and others. As discussed in cosmacelf and in email by Mark Thomas, Lee Hart, Sept Oct 2013. Edited by Herb Johnson with permission from contributors.

This page references hardware for or about Lee Hart's COSMAC 1802 "Membership Card". Here's a link to the home Web page for the "Membership Card" It has history, development, current status, and links to other documents. There's a link there to the Web page for the current available version of the Membership Card kit, and a link on how to order it.

Introduction

Mark Thomas posted a question in the Yahoo group cosmacelf, "how to add a ROM monitor and serial interface to the Membership Card?" Lee Hart responded with some optionss, and Mark went with his idea of a piggy-back ROM and got it to work. I've edited his post with additonal discussion from Mark and Lee, and I added notes about another ROM monitor and a simple serial interface. - Herb Johnson

To ROM or not to ROM?

Sept 15th 2013, Mark posted:

So, I'm putting together a membership card in a slightly larger case than an altoids tin, and I got to thinking it sure would be nice if it had a ROM monitor, and I could put a serial port on my enclosure.

Could I piggy back an elf2k ROM with the RAM chip, do something with pin 20 to select the ROM for 0x8000? Are there any other issues that might prevent me from using a membership card with an elf2k ROM? Has anyone else done similarly? - Mark

Lee's response: There are several ways you can do this.

1. You can load a program into RAM, and maintain power to keep it there.

2. Same thing, but use a nonvolatile RAM, like one with the piggyback lithium cell, or a ferroelectric RAM. This way you don't need to maintain power.

3. You can build a ROM board, as designed by Richard or Herb Johnson. These are basically a binary counter to provide sequential addresses to a PROM or EPROM. Plug it in to the 25-pin front socket, and its contents is automatically loaded into RAM.

4. Get a 2nd Membership Card (rev.D or later). There are provisions to stack the two, with a ROM on one board and a RAM on the other board. Now you have both ROM and RAM, as well as a second I/O port.

5. I'm sure there are other ways as well. I can imagine piggy-backing two memory chips (one EPROM, one RAM), with one of the address lines used to chip-select between the two. - Lee Hart.

ROM/RAM stack

[ROM stack schematic]

Mark chose the "piggy-back" method of a PROM on top of a RAM chip. Here's Lee Hart's discussion on how to do that.

Hi Mark: Look at this portion of the schematic in the Membership Card manual. You can read in the Membership Card manual page 9 there are two ways to install transistor Q1. One way addresses the memory chip from 0-32k; the other way addresses it from 32k-64k. [You'll need to add a second transistor to get two addresses.]

What you also want to do is solder a 28-pin IC socket on top of your 32k RAM chip. Leave the RAM chip's pins clear, so it can still plug into the socket on the Membership Card.

All pins of the ROM socket solder to the RAM pins EXCEPT pins 1, 20, and 27. Install the jumpers at P2 and P3 for the bottom memory chip (the RAM). Install Q1 [on the PC board as usual] to address the RAM at 32k-64k.

Now, you'll have to hand-wire pins 1, 20, and 27 of the EPROM socket as described for the jumper options for your [size of] EPROM (27C256 if it's a 32k part). You will also need a second Q1 transistor and pull-up resistor. Wire them to chip-select the EPROM from 0-32k.

- Lee Hart

ROM/RAM mods

Some days later, Mark Thomas discussed and posted to cosmacelf, photos of his ROM as stacked on the RAM of the M/S card, without a socket. NOTE: Mark's version addresses the RAM at 0000H and the ROM at 8000H. You have to toggle in a jump at the start of RAM to run the ROM. ROM code must be assembled to run at 8000H and up.

Mark's photos of his ROM and card are on the cosmacelf Yahoo site under: at the photo albums in the cosmacelf Yahoo Web site. Or look for the Yahoo cosmacelf Web page, and select Photo Albums > Mark Thomas' Membership Card-2k.

Mark writes: Sorry the attached schematics are rough and hand-drawn. I am extremely appreciative of the guidance Lee provided on the wiring.

ROM piggy-back:

[ROM stack schematic]

Here's a VERY rough schematic for the ROM stack.

Parts: 1x AT27C256R-45PU OTP ROM (elf2k v88, see below)
1x MOSFET, N-channel 2N7000 (Jameco 119423, same as original Q1)
1x 100k 1/8W resistor

I carefully bent back pins 1, 20, & 27 on the ROM. Then I soldered all the remaining pins in parallel with the corresponding RAM pins.

[photo 6] [photo 7]

ROM pin #1 needs VDD, which I wired to nearby pin #28.
ROM pin #27 needs to go to A14, available on P3 pin #6.
ROM pin #20 goes to the drain of the additional transistor, and a 100k pull-up.

[FET wriring]

The second FET to the ROM enable, is wired as follows:
The gate goes to the FET pin 3, that's A15.
The source goes to FET pin 4, that's ground.
The drain output goes to ROM pin #20 as described above, selecting the ROM when A15 is high for addresses at 8000H and above.

[photo of FET & ROM wiring] [photo of FET & ROM wiring]

The board is jumpered for 32K of RAM as follows:
P2 1-2, 4-5
P3 1-3, 2-4
note that P3 pin 6 or A14 goes to the ROM.

In Jan 2014, Mark discussed this work in Yahoo/cosmacelf, and made these comments:

"Soldering the piggy back chip was the easy part, for me. Wedging the transistor in next to the other, and getting the wires right, required more care, in my opinion. If you ever were making an update to that board, and included pads for the pair of transistors and the extra lines towards the ROM, that gets us most of the way there, with no surface mount or daughter card involved.". -- Mark G. Thomas

ROM monitor operation and choices

Mark Thomas used an Elf2k ROM, as he posted:

I installed an Elf2k ROM (from Spare Time Gizmos) on the Membership Card. I soldering it piggy back on the RAM, and adding a [second] transistor and resistor [to invert A15 to select the ROM at 8000H].

It works wonderfully, with no further modifications to the card needed. The chip adds some thickness, but not much, and my planned enclosure is deeper than an Altoids tin anyway.

To launch the ROM monitor, load in: C0 8000, then CLEAR, then RUN. The card then performs the elf2k initialization tests, leaving a 0x16 on the LEDs, waiting for an ASCII CR on EF3 for auto-baud detection, before outputting the startup screen on Q. Mine works fine at 1200 and 2400 baud, running at 5VDC, with the maximum clock speed.

[There are] URLs Bob Armstrong posted to this group last year [from his Spare Time Gizmos Web site]. There is a README file included, discussing the licensing of the various components of the source code and tools used to build it. - Mark

[Note from Herb: Read Bob Armstrong's Elf2K Firmware Web page for further discussion of his terms of use and distribution of the firmware products described there. The monitor software and some software components and the Elf 2000 are copywrited by Spare Time Gizmos. Other EPROM components are copyrighted by Michael H Riley, to whom he provides a Web link. Bob describes limited terms of distribution for third parties, and I conclude I'm a potential third party. Therefore, until I'm informed by Bob, I won't display direct links to the software described and used by Mark Thomas. The point of this Tech Note is to describe a hardware adaptation. - Herb Johnson.]

IDIOT monitor

A ROM monitor available at this site, is Lee Hart's "IDIOT" monitor from his BASYS product of decades ago. Here's the Web page where that monitor source is available. The EF4 and Q may need to be inverted to be compatible with whatever serial interface is used. I'll add notes based on results reported with a ROM containing this monitor. - Herb

Serial interface

Mark: For testing I used an el-cheapo USB to TTL serial adapter and a 4093 wired as an inverter to the Q and EF3 lines for a serial port. I believe the DE9+MAX232 interface I plan on using in my final enclosure probably won't require the 4093.

I'm tempted to install a faster xtal clock oscillator instead of the ceramic resonater oscillator. With the stock oscillator, the ROM serial port auto-baud detection works fine at 1200 bits per second. [See notes below for further discussion.]

RS232 or USB interface:

[serial schematic]

parts: 2x 10k 1/8W resistors
1x 4093 quad 2-input NAND gate (wired as a level inverter)
1x either a CP2104 TTL/USB converter or a MAX3232 TTL/RS232 converter.
(These are less than $5 on e-bay.)

I also installed a 0.1uf ceramic cap across the 4093 on the +5 and ground pins and grounded the 4093's unused inputs. I connected Q, EF3, and GND from P1 pins 12, 26, & 30.

The MAX3232 requires a real terminal, or a PC/Mac with a serial port. The TTL/USB adapter requires appropriate drivers for PC or Mac use: Here's a Web link to those drivers.

RS-232 only circuit

[simple serial schematic]

Herb Johnson adds: A simple RS-232 compatible interface can be constructed from a few parts. Here's a simple schematic for one that Lee Hart discussed with me some time ago. YOu can mount a DB-25 and a DB-9 on a perfboard and put these parts in between the connectors. The DB-9 would be wired to match old-school PC's serial ports.

Q&A on a serial/USB interface

Lee Hart asked: Great work, Mark! How many of the programs in it have you tried? Are there any that don't work without the extra hardware on the Elf2K?

The MAX232 inverts, so the extra 4093 shouldn't be necessary. Or, you can change the ROM code to invert Q and EF3. The Membership Card can already accept RS-232 or TTL data on EF4, and many RS-232 receivers will accept the TTL level from the 1802's Q line directly. - Lee Hart

Mark later posted in cosmacelf:

I just posted more pictures (once approved by the moderator), detailing completion of the project by installing it in a small project case case, with a home-made Lexan front panel, rechargeable batteries, a MAX232 de-9 rs-232 interface, and charger/regulator electronics on some perfboard the size of a postage stamp. This ended up being a tighter fit than I expected, but with care it all fit!

The MAX232 card still required a logic inverter (to remain compatible with the unmodified elf2k ROM), so I glued a 4093 upside down on top of the surface mount MAX232. The interface cards were qty 5 for $12 + $2 shipping on e-bay from China. I also used a CP2104 USB to TTL serial adapter for some preliminary testing. These are less than $3 each on e-bay, have both Mac and PC drivers, and might be more desirable for others than rs-232.

I used a LP2950CZ-5.0 low-dropout 100ma 5vdc regulator and the necessary caps, diodes, and resistor, to power the membership card at 5VDC, and provide a current limited (~7.5V) trickle charge to the 6 AA cells. This is not the ideal way to charge NiMh or even NiCd batteries, but I'm sure the cells will last for years anyway. I guess I should post schematics for the ROM wiring, the serial interface module, and the regulator/charger module. This charges the batteries and/or powers the membership card from a 9VDC-12VDC wall wart.

The plastic case (270-1805), six NiMh AA batteries, and the DPDT mini toggle switch came from Radio Shack. The Lexan for the front came from Home Depot. I also ended up mounting a small SPST switch above the DC power jack, after having odd results getting the membership card to consistently sleep at <1ma.

I wanted it to be battery powered and self contained, but with the serial port provides an easy way to load and even develop software, thanks to the awesome collection of utilities on the 32K elf2k ROM chip that sits piggy-back on the membership card's 32K SRAM.

- Mark

Q&A on a faster clock rate

Lee Hart posted: I supply a 1.8 MHz resonator with the rev.F kits, to match the frequency normally used in ELFs with the 1861 chip. But you can replace it with a faster one. 2 MHz will certainly work; maybe higher. These resonators are available from Mouser, Digikey, etc.

Bill Rowe wrote: "I think I remember Lee saying you could speed up the current clock by using a different chip for the inverter in the RC circuit."

Yes, you can. The stock part is a 4093 schmitt-trigger 2-input NAND gate, with about a 300 nsec propagation delay. The 4011 has the same pinouts, and is about 3 times faster. However, the 4011 won't oscillate as an RC oscillator; you either must use the resonator, or rewire the circuit as a 2-gate oscillator with the 1802's internal inverter.

The 1802 is spec'd at 2.5 MHz at 5v, though many run faster.

The newest Membership Card (rev.F) has both the RC oscillator *and* a 1.8 MHz ceramic resonator. The earlier ones had only the RC oscillator.

- Lee Hart

Lee Hart added privately: The supported baud rate is strongly affected by the 1802 clock frequency. Just like baud rate generator ICs, certain clock frequencies are good, others are bad. You have to be able to "hit" the baud rate within 1-2% with one of the coarse choices of clock divider integers. The baud rate divisor in the RCA and IDIOT monitors was pretty coarse (they expected teletypes and other slow mechanical consoles). - Lee Hart


Contact information for Herb Johnson:
Herb Johnson
New Jersey, USA
To email @ me, see
see my home Web page.

This page and edited content is copyright Herb Johnson (c) 2014. Contact Herb at www.retrotechnology.com, an email address is available on that page..