RCA CDP1802 Micro

May 2010 (updated November 2023)

It's hard to believe it's been 30+ years since I started learning about and working with microprocessors. Back in 1985 I attended a night school class led by the late (2009) David Lang at the Community College in Wanganui, New Zealand. We built a "trainer" which Dave designed around the RCA COSMAC CDP1802 microprocessor. Dave was a real 1802 enthusiast. He sometimes mentioned there were "radiation hardened" versions used in satellites and MinuteMan guided missiles (ICBM's). There were 1802's in NASA's Galileo space probe. It was also used in AMSAT's AO-040, OSCAR 10 and OSCAR 13 satellites. (https://www.amsat.org/amsat-history/ and http://www.ka9q.net/AMSAT-Tech-Journal-2.pdf page 44). It has appeared in many commercial products from pay telephones (e.g Kimus 2) to "black box" recorders for trains (e.g Locolog by PEC NZ Ltd aka Production Engineering Co. whom Dave sometimes mentioned as an exemplar of electronics innovators).  Are 1802's still used in nuclear bombs? The Sandia-developed B77 (https://en.wikipedia.org/wiki/B77_nuclear_bomb) was announced to include the 1802 (Microcomputer Digest Nov 1976). It's development was not finished but was instead replaced by the B83, which is apparently still around today.

I got thinking about Dave and all the stuff we did in his classes. This made me want to get the old trainer out again and re-live some of that time. I'm documenting the experience here, also somewhat in honour of Dave's efforts. So I dusted off the trainer and powered it up. I had to repair a couple of connections but that's all that seemed wrong. Wow it still works!  I found a 2716 EPROM containing a monitor program Dave wrote. A 2716 EPROM holds a whopping 2k bytes! I had never used this monitor EPROM. I soldered up a 3-wire serial cable, fired up TeraTerm on an EeePC netbook, plugged the EPROM into the trainer -> Reset, Run and....

It didn't work. I had some suspicions, so I got the trusty 'scope out and found the trainers' clock circuit was a bit flaky. I replaced the pot, adjusted for 2MHz (whoa, too fast!) then tried again - this time it worked! Serial out at 2400bps by bit-banging the 1802's Q line, then polling the EF4 line for incoming. This works  well enough, and was fairly common on 1802 systems. It's funny how things change, these days PC's don't even have serial ports. I used a cheap USB-to-Serial adapter on the Netbook.

I delved into the old night school notes and my original paperback copy of Tom Swan's excellent book "Programmer's Guide to the 1802" (link to Tom Swan's GitHub repo), 

and started to re-learn it all. I found a circuit design with a bag of parts I hadn't used, for a "multiplexed, multi-digit display",also from Dave's night school classes. This uses two CDP1852 chips (byte-wide I/O port). I built the circuit on Veroboard (aka perfboard, or strip board), over a couple of days, following Dave's original design. Then one night I finally reached the telling moment, where I would connect it to the trainer, plug in some op-codes and see if it...   it works! Now I've got Dave's original monitor and the multiplexed display working together - too good.

During this little journey down memory lane, I came across all kinds of useful things from all around the Internet. The Internet is the one thing that has dramatically changed things since 1985. Among the goodness, I found 1802 tools like cross assemblers, disassemblers, compilers, documents and data sheets. I even found some free 1802 simulators! One simulator I downloaded (emma02) was very useful for helping me re-learn 1802 machine code. Also, I was able to load, run and single-step through Dave's monitor code. This was great for examining how that works. I've since created my own 1802 simulator. 

The Tera Term image above shows Dave's monitor running, with a hex dump of a machine code program to display "HELLO" on the multiplexed display. Directly above is the multiplexed display with the program running. Below are some closeup shots of the trainer. Left image shows the hex keypad, which is an ex-calculator keypad Dave supplied to the class as a kit we had to modify. This included re-labelling some keys using Letraset transfers, and varnishing them for protection. Centre image shows the mode jumper, system clock, and 1802 micro. Right image shows the Serial port and status LEDs.  Click images for full-size view.

The 7 segment displays show address and data in hexadecimal. This is done using DM9368 hex-to-7segment decoder/driver IC's (equiv Motorola MC14495). 

Block Diagram of "Commander" 1802 Trainer. (hand drawn by Dave Lang)

Documents, Code and other links

The following are scans of the original documents about the trainer as provided to the night school class of 1985. Some of them may have notes I added.

Most are typed (on a typewriter!) and some were hand written by Dave Lang.

1802 Commander Trainer (pdf)

1802 Expanding the Trainer (pdf)

The 1802 for Beginners (pdf)  Dave's night school notes about the 1802.

1802-Mon-1.0 Commands (pdf)  Dave's monitor commands and instructions. Includes a hex listing of Dave's monitor.

1802mon.rom  Dave's monitor in a file format compatible with Emma02 emulator and my 1802sim.

1802mon.hex  Dave's monitor in Intel Hex format.

1802 Multiplexed Display Addon (pdf)

1802 User's Meeting Notes 17May1987 (pdf)


My 1802 Simulator  I developed this 1802 simulator which can run Dave's monitor program. It includes serial terminal simulation to support the monitor.

If by some chance, you are one of the people who attended Dave's classes and built one of these "Dave Lang specials" - it would be nice to hear from you. 

6th August 2003

My name is Greg Newton from Sydney, Australia. If you want to contact me, or you want more information, you can email me at: greg dot newton dot oz at gmail dot com (written like that to avoid spam bots).