It’s a kit

by Chuck April 22, 2013

WP_20130420_003One of the guys on the COSMAC ELF mailing list, Bill Rowe, asked the people on the list if they would be interested in purchasing a run of boards for my serial port adapter. Right after I read that on the mailing list, I saw a message from Bill in my inbox asking me if I’d be interested in working with him to make a printed circuit board for the project and sell it to people who are interested.

I was OK with the idea, but with everything that’s going on with Dana I haven’t had a lot of time for other projects. Or at least I didn’t think that I did. I sent the schematic and board files to Bill so that he could make a first pass on them – once he sent them back I started playing with the board files until I had something that I could send off to Osh Park to have fabbed. Waiting the two weeks that it takes to get the boards back isn’t fun, but it beats waiting months – or not making the project at all because you don’t have a board.

Anyway, the boards came back from Osh Park, the parts that I ordered online came in (along with a whole bunch of other stuff that I didn’t really need but I thought, what the heck, I’m ordering) and I started finding all of the little things that I managed to do wrong. The DB-25 connector needs to be on the solder side of the board, not the component side. Somehow I missed where I crossed two traces. After I corrected those two faults (one with a knife and a bit of wire, the other by putting the LEDs on the solder side)  it actually worked the first time when I got the prototype built.

I’m pretty proud of the whole thing. Something that I designed and outsourced work on and built myself all works like I intended it to.

I’ve already sent out the Rev. B of the board. It will have the DB-25 connector on the other side, and with that change I was able to add a couple of other jumpers to make it easier to put the LED enable and oscillator enable lines under control of the Picaxe. But the first one will always have a special place, ‘cause it was my first.

Tags:

Electronics

Pi Expander

by Chuck February 20, 2013

Got my Quick2Wire Raspberry Pi expansion connector and I2C port expander kit today. Came all the way from England, so shipping was almost as much as the kit. My only complaint so far is that the 26-wire expansion cable that plugs into the Pi at one end and the expansion connector on the other is only about 2 inches long. Another inch and it would easily reach the desktop when the Pi is in its case.

I haven’t started on the assembly yet, but it looks to be a straight-forward and easy build. Hopefully I’ll remember to take pictures as I work.

Tags:

Electronics

Terrible transistors

by Chuck February 14, 2013

D-Latch-ResetThat picture represents a terrible, terrible idea. Bad. Awful. Nasty. But one that is oh, so tempting. After the Visual 6502 Web site posted the control logic for the 1802, there has been a certain amount of wishful sort of thinking going around on the COSMAC ELF mailing list – along the lines of “I wonder how hard it would be to build an 1802 out of discrete transistors.” I’ll admit it. It crossed my mind. I’ve been working on building the 1802 control logic in Logic Circuit (see my last post) but I started wondering what it would take to build the logic gates that I’m simulating out of transistors.

So I did a little searching on the Web to find out how to build a 2-input NAND gate out of transistors. Turns out that it’s incredibly easy to find that information. And once you’ve found it, it’s pretty darn easy to build one on a breadboard. Or four, ‘cause that’s what you need to build a D-type transparent latch. That’s what you see there on the breadboard. Each of the little groups is a NAND gate, three 2-input NANDs and one 3-input NAND. In the section of the control logic that I’ve modeled there are 10 transparent latches of various orientations. The number of transistors goes up pretty darn fast in this thing.

Tags:

Electronics

Simulating the RCA 1802 control logic

by Chuck February 13, 2013

I've started building out the 1802 control logic from http://visual6502.org/wiki/images/6/64/Rca1802-control-reversed.gif using Logic Circuit (http://www.logiccircuit.org/). There have been a couple of things that I've had to kinda take on faith, but I seem to be getting some results.
 
I've been trying to create modules out of related gates, so far I've been able to get three modules working:

  • The Reset/Load/Wait/Run logic (U8-U11 and U73 to 78). I had to reverse the value on the CLR line to get it to work, so there may be an issue in the original tracing, but once I put an extra inverter in the CLR line the logic in that section worked great. There are only three signals that come out of this section, /LOAD, /RESET, and the clock.
  • The Johnson counter that drives the operation sequence (U133 to 139 and U190 to 193). This section has two inputs, the clock and the /RESET line. There are 7 outputs from this section, SEQ0 to SEQ7. I created special versions of D-type transparent latches that match layout of the latches in the schematic to make it easier to lay out the latches. This is an interesting section of the control logic to watch run. I attached "LEDs" to the sequence outputs so that I could follow the sequence visually. I expected each LED to light up in turn, but what happened was different. SEQ0 goes high on the rising edge of CLK0, SEQ1 goes high on the falling edge of CLK0. CLK1 raises SEQ2 and SEQ3, etc. until all of the SEQ outputs are high at the falling edge of CLK3. On the rising edge of CLK4 SEQ0 goes low, followed by SEQ1 on the falling edge of CLK4, and so on until SEQ7 goes low on the falling edge of CLK7.
  • The two 3-to-8 line decoders and the enable logic (U1 to U4). I combined these 4 chips into a single module that has 5 inputs (enable, B7 to B4) and 16 outputs (i0x to iFx). I set up the module so that the 16 outputs were in the order that the appear from top to bottom in the schematic to make it easier to follow the logic.

I zipped up the Logic Circuit data file that I've been working on and put it on my Web site. You can download the file from http://www.bramblyhill.com/downloads/RCA1802-control.zip. If you download the zip file, you'll need to install the latest version of Logic Circuit from the Web site above. It does require the .NET Framework 4.0 or higher -- if you're running Windows 7 or 8 you have that installed. If you're running Windows Vista or NT you can install the Framework from Microsoft's Web site (http://www.microsoft.com/en-us/download/confirmation.aspx?id=17851) if you haven't already.

Tags:

Electronics

MC Panel -- Requirements

by Chuck November 23, 2011

Just to make sure that I know what I’m doing, here are the requirements that I’d like to meet with the control panel.

  • Must have the same form factor as the original front panel. By my measurements, that means 3.5 inches by 2.20 inches.
  • 16-key keypad.
  • 2 LED digits. 
  • Serial port to connect to PC using a BUB USB board.
  • Power for the Membership Card should come from the USB port, but there should also be a simple way to hook up an external power supply.
  • When the serial port is connected the front panel should be able to understand the simple command language that I developed for the serial port adapter.
  • If the serial port is not connected the front panel should act like a hex keypad connected to port 4, and do the standard DMA load.
  • Should have expansion connectors so that additional boards can be stacked.

So keep those in mind as I’m working on the front panel. Hopefully I’ll be able to make all of these work.

Tags:

Electronics

MC Panel–Building a new front panel for the Membership Card

by Chuck November 23, 2011

“Bee Dee” on the Yahoo COSMAC ELF group suggested that we document the progress of our various ELF2K and Membership Card projects with photos and videos to share on the Web. I’m not so much with video, but I can take a picture or two and write up what I’m doing.

I’ve been working on improving the serial port adapter that I build using a Picaxe 20X2. I showed the new version to the group on the mailing list, and suddenly I had a new idea to work on. I was inspired by a posting on the mailing list by Lee Hart – replacing the stock front panel of the Membership Card with a new keypad and LED digit display controlled by a Picaxe microprocessor. It sounded like a good idea to me, that is if I could get everything to fit on the small footprint offered by the Membership Card.

I’m going to be writing up my progress as I go along, providing a screen shot or photograph or two, and hopefully sharing what I learn. Right  now, I’m thinking that I’m going to have to jump through these hoops:

  • Figure out if I can get a Picaxe 40X2, a 16-key keypad, and two LED displays on a board the size of the Membership Card.
  • Come up with a tentative assignment for the input/output ports on the Picaxe.
  • Build a version of the circuit on a breadboard to make sure that it works.
  • Write software to make the whole package work.
  • Layout a PC board and get it manufactured.
  • Build a prototype and see if I got it right.

Hopefully I’ll keep engaged on this project until I get it done. Making a commitment to writing it up should help with that.

Tags:

Electronics

Dage MC-3

by Chuck May 27, 2011

One of the members of the Yahoo COSMAC ELF mailing list bought a Dage Scientific MC-3 on eBay. He wanted to know more about it, so I wrote up an article so that there is some information out there on the Web about this 1802-based microprocessor development system.

The article is here: Dage MC-3.

Tags:

Electronics

Membership Card Serial Port Adapter

by Chuck February 8, 2011

Last week I let the COSMAC ELF mailing list know that I had made a serial port adapter for the Membership Card. I’d been planning on creating an installation package for it, but the announcement was what Scott Guthrie used to call a “forcing function” – once I announced that I had the software, I pretty much had to create a package and send it out.

So, here it is: Membership Card Serial Adapter

I want to thank Herb Johnson for his reviews of the first packages that I created, and to Lee Hart (of course) both for creating the Membership Card and for saying in a post “The genius of Chuck's work is his software.” I know it’s just a figure of speech, but it’s a real ego boost to have someone whose work that you admire to call your work "genius."

Tags: ,

Electronics

One step forward...

by Chuck November 5, 2010

After getting the Membership Card to work with the serial interface circuit on my big breadboard, I decided it would be good to move the circuit to a smaller breadboard – one that only had the one project on it and that could stand in for an actual completed project.

I should never change something once it works. It took me most of the night to get the circuit to run on a different breadboard. When I moved it I decided to move some of the pins around on the PICAXE-20X2; then I had to troubleshoot those connections, change the control pin IDs in the software, rebuild, reload, do it again and again.

On the bright side, I’ve been watching some interesting shows on Hulu.com while I work on this stuff…

In any case, I’ve discovered that I can’t actually read the data bus with the 20X2 to send data back to the PC. The pull-up resistors on the data switches, um, pull up the bus to +5V when I read the bus, and all I get back at the PC are ones. I need to rethink how I’m going to get the data from the Membership Card back to the PC – I’m not sure I have enough data bits on the 20X2 – though I may be able to do something with diodes so that I can use port B to both write to the Membership Card and then read back from it. Worth a try…

Maybe this weekend I’ll make a couple more steps forward – and avoid the steps back.

Tags:

Electronics

Killer Serial

by Chuck November 2, 2010

adapter-smallThe Membership Card has a 25-pin connector on the standard front panel. The designer, Lee Hart, intended for this connector to be used to control the Membership Card using a standard PC parallel port.

The only problem is that most PCs, and all laptops, don’t have parallel ports any more. And even when they do, there aren’t any commonly available parallel port drivers for computers that run Windows Vista and Windows 7. It’s a dilemma, especially since even the one computer that I have at home with a parallel port runs Windows 7.

But we are not without our resources here at Brambly Hill, and one of the resources that we have is the Revolution Education PICAXE® microcontroller. Specifically, the PICAXE-20X2. The 20X2 has enough I/O to provide an 8-bit bi-directional data port and all the other control and data lines that I need to connect Membership Card to a PC via a USB serial port.

Terminal program communicating with Membership Card serial port adapterWindows Membership Card Control Panel programAll that it takes is a little software, and I know how to do software. I am, after all, a professional. A little software here, a little hardware here, and I had a serial port interface for my Membership Card. In the picture you can see it running on my large breadboard (along with a another bit of hardware that I’m experimenting with). I actually built this circuit up before I got the Membership Card from Lee – I wanted to bench test the software to make sure that it was working the way I expected. Having the Membership Card simulated by a set of LEDs let me work the kinks out of my PICAXE software, and do a lot of improvement to the code before I ever saw the actual hardware. Not only does the serial port adapter work with a standard terminal program, but I was also able to write a simple Windows application to act as a control panel for the Membership Card. Two for the price of one, and they both worked. At least with the simulated hardware. The next step was to test it with the actual Membership Card.

And that’s where the fun starts.

I started with the easiest control line, INP. Just toggle the control bit, and the Membership Card should write the data on the switches to the RAM. It’ll show up on the output LEDs, and I’ll be able to reset and run the program using the toggle switches. Piece of cake. And it was. I spent a happy few minutes toggling in programs and then pushing the INP button on the Windows control program to load them into memory. Even that was an improvement – that tiny little input switch on the front panel was starting to hurt my finger when I pressed it.

So far, so good.

I hooked up the Memory Protect line – and discovered that it worked opposite of how I originally thought. When I put the Membership Card in Read/Only mode, you could write to the RAM, and in Read/Write mode, you couldn’t. That was a simple change in the PICAXE code for the adapter. Now I can control whether you can read and write RAM from the Windows program. Cool.

I hooked up the LOAD and CLEAR lines. Nothing worked. I couldn’t get the Membership Card to load data, I couldn’t get it to run, nothing. I pulled all the control lines out. I put them all back. I checked the schematic, I swapped pins. I changed the high/low states of both lines. Nothing.

After the fourth time that I’d pulled all the wires out of the breadboard I noticed on the schematic that when the LOAD and CLEAR switches on the Membership Card are in the LOAD position (both down), they are connected to ground. When they are in the RUN position (both up), they are connected to +5V through a pull-up resistor – and to the 25-pin connector. I put the wires back in place, flipped both switches up, and was immediately able to put the Membership Card into RESET, LOAD, and RUN modes from the Windows control program

The last thing to do was connect the data lines and start sending data from the Windows control program to the serial adapter and then from there to the Membership Card. I busily attach jumpers from the control port to the breadboard to hook up the data bus. All eight. I turn everything on, and then try to send data. Nothing happens. Even the LEDs connected to the 20X2 port aren’t lighting up. I pull all the data bus jumpers. I send data. The LEDs flash in the appropriate pattern for the data that I send. I put the jumpers back in. No illumination on the LEDs. I pull ‘em again. The LEDs light up.

You’re probably ahead of me. I glanced up at the schematic. When the data switches are in the down position, they connect to ground. In the up position they connect to +5V through a pull-up resistor – and to the 25-pin connector. I put all the jumpers back in again. I switch all the data switches up. I load the RAM with the simple “Hello world” program (7B 30 00). I set the Membership Card into RUN mode. Nothing happens.

ARGH!

I reset. I step through memory. The pattern on the data LEDs change. They look – odd. They’re – backward? I look at the breadboard. I’ve connected D0 to D7, and so on. I’ve reversed the connections on the data bus. Pull ‘em out. Put ‘em back in the opposite order. Load the RAM. Reset. Run.

Q LED lights up.

More rainbows. More bluebirds. Or something.

I load a few programs. I’m happy. I try to use the Windows control program to load an Intel HEX file onto the Membership Card. It fails. I’m sad. I try putting a delay in between the PICAXE-20X2 “pressing” and “releasing” the INP switch. I load the HEX file again. It works.

I’m really happy. It’s also midnight, so I’m really tired.

Just for fun I load Herb Johnson’s version of Dennis' Boone’s implementation of Steve Gemeny’s program to blink the Arecibo message on the Q LED. I go to bed with a “70’s vintage interstellar communications system” blinking away on my desk. I go to bed.

Tags: ,

Electronics

Log in