Tech Note: Undocumented COSMAC 1802 State?


Introduction

Lee Hart has produced a varient of the COSMAC ELF, an RCA 1802 CPU based micro, called "the 1802 Membership Card. , This note discusses an undocumented state of the 1802 processor as manipulated by various input status lines. Current production of the 1802 Membership Card, is described and priced on the "membership card" home page. That home page also has links to software and hardware, notes and documents, and more resources.

Last updated May 13 2017. Edited by Herb Johnson. from posting in cosmacelf and by private communication July 31 2012, and May 2017 by Lee Hart.

Undocumented 1802 current-consuming state?

I was playing with powering my Membership Card with a solar panel scavenged from one of those cheap yard lights. They deliver a few volts at a few ma or so; enough to run the 1802 just fine.

But I discovered something interesting that I had never noticed before. Switch to CLEAR, then LOAD, and set any data toggle switch high. The supply current goes way up! It can be as much as 50ma if all 8 are up!

It turns out that going to the CLEAR state, then LOAD, puts the 1802 in a special cycle until it gets its first IN pulse (the first DMA-IN cycle). MPM-201C page 90, Table 1, line 2 has an unlabelled State (no state code) described as "First cycle after reset. Not programmer accessible. Operation = Initialize. Data Bus = 0. /MRD = 1."

It turns out that LOAD *holds* the 1802 in this state until the first IN pulse (DMA cycle). In this state, the 1802 is grounding the data bus, and holding /MRD high.

The way the Membership Card (and by extension, I think all Elfs) are designed, the data bus input switches are connected to the bus by gates that are enabled when /MRD is high and you are in LOAD mode. That means the switches are *enabled* during this special cycle, and put their value on the data bus. If any switch is set high, it *fights* the 1802 which is setting them low, and you have high supply current.

After the first IN pulse, normal LOAD mode behavior begins. The 1802 does the DMA-IN cycle, then lets the data bus float and sets /MRD = 0. This eliminates the bus fight, and supply current is again low.

With only my little solar cell for power, the supercapacitor would charge up, and the Membership Card worked fine. The LEDs got dim if left on so the supply voltage sagged, but when it got low enough, the LEDs nearly went out but the 1802 kept right on running whatever program it had.

But if I switched to CLEAR, then LOAD with any switch up, the "bus fight" dumped all the stored charge in the supercapacitor in a few seconds.

Resolution

There is no easy "fix" I can see. But the workaround is to set all the data switches low before switching to LOAD.

So to minimize power in standby, set all the toggle switches down EXCEPT the WAIT switch up. Then set the /ON pin high (to stop the clock).

To start back up, the switches should still be in the above positions. Set the /ON pin low. If your program needs to write to RAM, set the WRITE switch. Then set the CLR switch up, and away you go! :-)

NOte that if you don't have the Front Panel plugged in, this all happens automatically on power-up and power-down. That network of resistors, capacitors, and diodes in the lower left corner of the board, automatically handles the power-up and power-down sequencing.

Amazing that this old CPU still has some surprises! - Lee Hart

More discussion on current consumption

The 1802 Membership Card, can draw current during "standby" under some conditions, a millamp or two. This may vary among M/S card revisions. Check this Tech Note for details.


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

This page and edited content is copyright Herb Johnson (c) 2017. Copyright of other contents beyond brief quotes, is held by those authors. Contact Herb at www.retrotechnology.com, an email address is available on that page..