Sunday, November 21, 2010

I remember taking my time to wire wrap the CPU board together and also buying a Willem Programmer so I could put the monitor (tinkerbug) in the 28C16 EEPROM. And I remember that it worked the first time I powered the thing on. It was very exciting. I then decided that I needed some mass storage and that floppy diskettes would be the way to go since that was the storage of choice back when this stuff was new, about 30 or so years ago.

Now would probably be a good time to confess that I already have another machine similar to this one but running FLEX 2 on a 1MHz 6802 CPU. One of the predecessors to the 6809. I also have a floppy controller for that machine and I decided to copy that circuit for this 6809 machine.

So I wire wrapped a second board for the floppy controller following the schematic I have for the already working board. And after completing that project I found that it didn't work. After some troubleshooting that didn't turn up much I decided to put this project aside for a while. It turned out to be a little over a year. So this time when I picked it back up I wasn't locked into the mindset I had back when I put it together. This time I found out that one chip on the schematic had the pins reversed. It was a HEX buffer chip and from comparing the schematic to the datasheet for the chip I found that the inputs and outputs were reversed. That's not going to work. so I fixed that fairly easily. Now I was able to seek to tracks and actually read some stuff off of the diskette. But the data looked a bit strange. After some digging I found that running the 6809 at 2 MHz would require some additional circuitry to stretch the E-pulse to accommodate older and slower chips. So I slowed the CPU down to 1MHz and all of a sudden all the data read from the floppy looked perfect. So on to writing to sectors.

Ok, so here's where things turned a bit more interesting. When I tried to write a sector, that sector became unreadable. Certainly not what I wanted! So I started doing some more troubleshooting but couldn't find any reason for this. I took the working board out of the other machine and ran a test with it and was able to write to the diskettes and then read it back without problems. So the problem was definitely with my new board. I spent several hours trying all kinds of things and found that my biggest problem was that I couldn't see what the board was doing electrically. So I used my small digital storage oscilloscope to look at the various signals. After some time I found that of the two signals from the chip that has to do with writing data, only one showed activity. The other one showed no activity at all. I needed some other way to watch the signals on the board. I was able to borrow a USB-connected Logic Analyzer from a friend and with it I looked at every single signal on that board. I also compared those signals to the already working board while running the exact same tests only to find that everything looked the same between them. Except the one signal that wouldn't show any activity on the new board. Incidentally, that was the Write Data signal. Kind of important. I started thinking that perhaps I wouldn't be able to get this thing working after all.
As I was sitting there thinking about what my next step should be, I was looking at the schematic for the board. My eyes fell on the capacitor that sits between the Write Data signal and ground. After staring at it for a while I realized that it should have a value of 100pf. I looked at the board and realized I had 0.1uf there instead. So I decided to disconnect it and run a test. By the way, the test I was running was to format a diskette. The first pass, the one that writes the tracks, takes about a minute so that gave me time to really look at the signals. Then it moved on to the verification process which always failed since no data was written, and the command was aborted at that point. After I removed the 0.1uf capacitor I ran another format process. While that process was running I was looking at the schematic and just as the write process was done I snapped view with the Logic Analyzer. I then realized that the verification process actually ran this time! I looked at the view on the Logic Analyzer and saw that the Write Data line actually showed lots of activity this time! So as it turned out, I spent several hours troubleshooting a Write Data signal that essentially was shorted to ground by a capacitor with a totally incorrect value! I put a 100pf capacitor in place and everything works beautifully!

So now it was on to adapting FLEX 9 to my machine. I'll post a few pictures here to show the machine actually running FLEX from diskettes once I get it working.

No comments:

Post a Comment