Sunday, November 9, 2014

Keypunch now reading except it misses column 1 of each card - more progress on SAC interface

CHI INTERFACE AND DISK DRIVE

I looked inside the CHI interface box and really like the idea of using five dummy PCBs in the slots to connect to the SAC cable signals. With the CHI receiver/driver cards removed, nothing touches those leads, making it safe for me to use the sockets as a connector.

SAC signal wires are colored ones along left, connecting to backplane

The back side of the 160 pin socket with its colored wires in groups of 20

Front of the 160 pin socket
I will buy or make some 22 pin boards of the requisite width, then solder on leads from my interface boards. This isn't ideal electrically, as we get some discontinuity at the 160 pin connector, again at the socket and PCB, and then where the lines join my circuits, but hopefully the circuit is robust enough to tolerate any small reflections caused by these flaws.

I found prototype boards that are the right size, width, pin count and intended to plug into these sockets, but the cost for the five boards I would need will be about $130 with cheapest shipping. A second option is to use push-on terminals on the wirewrap backplane in the CHI unit but that makes it very difficult to switch back to using the CHI logic. A third option is to go ahead and by a 160 pin socket, wire up all the pins and use it on my box, which would be about $50 more. I decided to go with my own socket, making this interface easily movable to any 1130 with a SAC interface.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I hammered away at the issue of reading the sense pins - the timing was an issue I had not yet resolved. After some experimentation, I found I could get a reliable read of the pins at 60ms after I involved a cycle, however what I picked up was a column too late. That is, when I do the first space I am seeing the pins corresponding to column 2. This will require some cleverness to resolve.

I also have a mismatch between the actual rows and which pins I am reading - which I believe is caused by several factors. First, I have a wiring swap to accomplish at the dup relay, where I know that the sequence of pins are incorrect compared to the DB25 cable assignment. For instance, the rows 1 to 9 are assigned to the relay contacts of the same number, while 0 is assigned to 10, row 11 is 11 and 12 is 12. This was not the sequence I used on the DB25 connector, but I corrected the wiring so everything lines up with our 'standard' keypunch wiring.

After a bit more testing, I am confident that the card reading function works well, other than the "first column" problem. I read cards successfully in both ASCII and BINARY modes. I haven't tested the 'verify after punching' mode yet but that shouldn't be too bad since it mostly uses existing and debugged logic.

I checked to see whether I could see the hole pattern when the card is registered in the read station but before I punch the first space, but that doesn't work. My proposed solution is to use the multipunch feature to punch a space, assuming the keypunch can handle this mixed signal, then drop the multipunch key and issue the space again. That way I might read the initial column while in multipunch mode and get the second column as part of the first real space.

I do have to experiment to see if this can work - testing the logic of multipunching a space but also seeing if the escapement occurs immediately, moving me past column 1 on the read station. If it moves first, I will need a plan B and I don't have a clue right now about how I might address the issue.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I completed testing of all the circuits on the four boards, which helped me find two solder bridges and one resistor lead that wasn't soldered down. I then made the decision to buy a 160 pin socket, wire up all the pins and use it on my box. Ignoring the socket on the CHI interface and using my own makes this interface easily movable to any 1130 with a SAC interface.

My testbed to verify the circuits worked properly

Saturday, November 8, 2014

SAC interface and keypunch work proceeding well

CHI INTERFACE AND DISK DRIVE

I managed to find documentation on some of the chips used on the logic boards inside this box - they are old Fairchild circuits from the late 1960s, a mix of DTL, TTL and what they called MSI (medium scale integration) that would correspond to the 7400 series level of functionality in future years.

The receiver circuits are TTL hex inverters which convert the 0 to +3V swing of the transmission line to an inverted TTL output, pulling the line up with the 100ohm terminating resistor required for the SAC cable. The driving circuits are DTL dual gates which look very much like a basic SLT NAND gate with no pullup resistor, the same basic circuit used to drive the transmission lines, taking a TTL level input (apparently) and pulling the transmission line down to ground if when the input is positive.

Once I map the specific card assignments to the SAC cable signals, I will be able to pop out the boards used in the CHI interface and stick in some boards I manufacture which deliver the signals to my circuits instead. Alternatively, if I trusted the logic levels, I could take the outputs of the CHI boards as TTL inputs and inject TTL outputs to the driver boards.

Only some of the chips are currently available from sources such as Anchor Electronics, but not the DTL dual gate which drives the transmission line. That makes reliance on the CHI interfaces somewhat less desirable than simply connecting my receiver/driver boards to the cable.

I attempted to find the addresses controlled by the CHI box, issuing Sense DSW to all potential addresses. When I sense the internal disk drive, powered off, it returns a Not Ready bit in the DSW as it should. The CHI box did not return anything for Sense DSW for either the disk drive or the line printer which it implements. This tells me it is not healthy enough to be responding to XIO commands for its area codes.

I looked at the disk heads with some better lighting and the heads appear too scratched up to be used. Perhaps, however, if the disk adapter logic works properly, I can figure out how to interface the DEC RK05 drives to the CHI box. However, this is not a priority.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I discovered that the push pin connector for the +5V supply to the sensing pins in the keypunch was broken off inside the heat shrink tube, thus the wire and pin were hanging together solely because of the shrunken insulator tube. I replaced that connection and resumed testing.

However, no sooner did I turn on the keypunch and register and card, than it began punching the eleven row holes repeatedly (with no command input from me). Arrrrgggggggghhhh. Undoubtedly some electrical/mechanical treachery, coincidentally occurring just as I fixed the prior problem. However, I need to spend time to figure out what is causing this issue.

I am also concerned about lack of space in memory, since I have been bumping into problems from time to time and these don't behave cleanly, wasting diagnostic time before the root cause is seen to be lack of space. I converted my two fixed tables, the BCD and EBCDIC translations from ASCII, to place them in flash memory (program space) and to use only an unsigned integer rather than an unsigned long.

This change will save 512 words or 1024 bytes out of the 8192 bytes which are the entire dynamic RAM space for the program. I also switched all my uses of unsigned long to unsigned int (except for the time based functions which use the 32 bit variables), saving additional space.

While methodically testing with various components in and out of the circuit - no punch cable, no read cable, and so forth - I discovered that the errant punching occurs only when the reader cable is plugged in. My suspicion is that the +5V connection I recently repaired is bridging to some other circuit on the same relay, which is part of the DUP circuits that will punch a card from the values found on the card in the read station

After some adjustment of leads, I discovered that one of the read pins (for row 11) had popped out of its relay hole and was bridging to some other spot, inducing the spontaneous punching. After replacing the pin in its proper location, the spurious punching problem went away.

After some testing I can see that I have some slight errors in my direct access routines that are setting the microprocessor ports to fire the punch relays. Most of the holes are being punched as intended, but my code handling rows 8 and 9 are updating the 6 and 7 pins instead. Also, the release pin is not being activated.

After reviewing the code I found the problems. The next test showed they were corrected, except for the release which was only because the cable wasn't fully inserted. This leaves only the reading that isn't yet working right.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I finished installing all the wiring to the remaining boards, other than the lines from the SAC cable to the 1131 itself. I began the task of attaching the TTL signal wires to the connector I chose, a high density 78 pin type, but discovered that the pins don't crimp reliably around the wires, solder gets in the way of insertion, and placing these into the connector would require a special tool unless you want to be pushing a pin inward from the wire.

Pushing on the wire resulted in snapped connections, pulling on the pins to draw them into the connector resulted in deformed, damaged pins, and the fussiness of the crimp pin when trying to install the wires was just too high to tolerate for 78 leads on each side of the connection. I abandoned that choice for connecting the boards and will have to make a new design choice.

Tomorrow I will test out all 77 circuits before I begin testing their interface with the 1131.

Friday, November 7, 2014

Method to share SAC cable between CHI box and my interface, plus keypunch interface

CHI INTERFACE AND DISK DRIVE

I have a choice to make. I have a single IBM cable that attaches to the SAC interface of the 1131. Currently it is plugged into the CHI box on one end. Since the CHI box appears functional and may provide a second disk drive, I am not willing to destroy it by removing the receptacle, but the alternative if I don't use the connector from the CHI is to find the 160 pin socket myself and install that in my box.

After some investigation, I did find the sources for the connector, allowing me to build my own cable from my interface box to the 1131. The socket base is approximately $45, the pins will be about $95 and the miscellaneous hardware is around $30, for a total of approximately $170 bought from Digikey.


I looked at another alternative, if I pull the circuit boards in the CHI box which terminate the various signals from the SAC cable and build my own dummy boards to connect onward to my box, I could manually swap which interface is hooked to the 1131 without disturbing the existing cable. Examining the inside of the CHI box, the card sockets look to be 44 pin (two sided 22 each) at .156 spacing. There are three spare sockets placed in the box which ensures I could get my signals in and out just with what is available there.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I did another test, looking at the pins early as well as after the expected wait time. They came in as spaces at both timings. I will prepare a safety-net test that samples these throughout the entire time when I am punching a space on the prior card - if I don't see a signal, then my problem is over on the electrical/mechanical wiring side.

The results are confusing and may represent the problem, once again, where the Arduino environment doesn't have enough space, skipping execution of code rather than signalling any specific condition. It is difficult to debug relatively complex code in a development and test environment that is hobbyist-grade at best. If necessary, I will chop out big chunks of code temporarily and see if the results are different.

I re-coded the logic to read the sense pins, directly retrieving the value from the ATMEL microprocessor ports instead of using digitalRead - much faster. A bit cumbersome inside the routine which does this, since the pins which are in a neat sequence on the Arduino are scattered across four ports on the processor.

I can do the same for punching a card - setting the output ports by updating the output ports of the processor instead of individually issuing digitalWrite for each row. This minimizes skew between when various relays are energized.

What is not making sense yet is the complete lack of sensed values on the read attempts I am doing - although sporadically I will see some junk columns further down the card. I will turn my eye to the continuity of the lines from and to the keypunch over the read cable. I did discover yesterday that I had misplugged a few of the rows, but can easily pull and replace those on the relay board of the keypunch. All that would do is give me miscodings - swapping which rows I see. .

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I soldered together the last receiver and last six drivers, then moved on to adding the power and TTL signal wires to the boards. By midday break I had the power wires installed on all four boards and was starting on the internal power links (ground and +3V to the receiver circuits).

By the end of daylight, I had board two wired with all its signal lines, and was almost done with the internal power wiring for board three. Won't be much longer before all four boards are complete and ready to hook to the high density 78 pin socket I chose for the TTL input and output signals.

Finishing up the wiring of the boards

More keypunch debugging, further assembly of the SAC interface box, and an interesting test tool

I had to visit the Consulate of China to apply for a visa for a stopover I will make in December in Shanghai. Two hours round trip to get there plus almost two hours waiting to file my paperwork - all valuable time taken from the 1130 restoration.

Maglev train in Shanghai
My visit will only be a couple of days but one of the things I am looking forward to experiencing is the magnetic levitation train that runs from the airport to a transportation hub. It will reach a peak speed of 430 kph (about 270 mph) - it will feel like a trip into the future for an old science fiction story fan.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I did more testing and validation - still having problems getting the timing right for the read of a card going through the dup station - but the rest seems to be working perfectly. I spent time with the keypunch documentation and derived some relative timings but they don't work in practice.

Interface being debugged
The activation of any hole magnet or the space magnet causes a set of contacts to close which energizes the escapement relay in the keypunch. Supposedly, it takes 12 milliseconds for the card to move to its new target column, after which the punch clutch is triggered starting a punch cycle.

The punch cycle is 50 ms overall, with the pins at their best point to sense at 17-18 ms into the cycle. Based on this, I assumed that the cumulative duration  is 12 + 17, thus if I read the pins at 30 ms after I trigger the punching for the column, it would be the right time. However, the pins are not extended enough to make any contacts, registering every column as containing a space.

My earlier experiments found non-space results at 40ms and 60ms after I trigger a punch, not the 30ms I used which failed. I will work on this more deliberately tomorrow, identifying the range of times when the pins show good results.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I finished the corrections on the first board, installing the replacement resistors for those positions where I had mis-installed the pairs backwards. In addition, I have eleven sets of driver and receiver circuits assembled on the third board, just one more to go. One more board will be needed to hold five more driver circuits. A bit more soldering of components, then wiring of power and TTL signals to the boards, and then I can test these out.

Boards one, two and three from top to bottom

IBM IPAT TEST TOOL KIT

I found an interesting looking tool on eBay, a suitcase unit used by IBM labeled the IPAT 5800 unit. I saw some bus and tag terminators along with ribbon cable, which made it appear to be useful for some kind of IO channel testing. I was able to get it for a low enough price to be worth the gamble.

Inside the briefcase

Control panel - selecting cable, lines and a few test types
Chart to interpret distances of malfunctions
The unit sends pulses down various lines in the cables, displaying on an oscilloscope and allowing the identification of the type and location of any problems - break in a wire at xx feet along the cable, or short or open instead of proper termination - designed to work with 360 style bus and tag cables but also the twisted pair type cables used with the 1130 and with coax cable as used with 3270 terminals.

Thursday, November 6, 2014

Keypunch interface in final paces of checkout before release of beta code, with just a few minor issues with the card reading function

Today I didn't have a lot of free time and what I did have was spent at the Computer History Museum helping out with some tape drive, card reader and power up issues on the 1401s. I also worked on a new faster way to scan in manuals which I can use to ensure all documents I have are preserved digitally on bitsavers.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I opened up the punch cable connector and replaced the treacherous pin 20 which supplies the power for the release function activation, since it keeps popping out rather than sliding over the mating male pin of the socket on my interface box. With that corrected, release worked perfectly as expected.

I next fiddled with various delays until I found I could sense the pin values consistently during reading at 60ms after the trigger of the space - I am dropping the space solenoid at 20ms after trigger, then wait another 40ms before reading the sense pin values.

I found some small flaws in how I am recording the values and displaying the resulting card image, which I will fix in the code and do some final testing tomorrow. Once I have read working satisfactorily, everything is ready and I can release this to the other project members for their testing.

Tuesday, November 4, 2014

Minor work done, keypunch debugging going very well

Feeling a bit better and spent a couple of hours with the machine today.

1442 CARD READER/PUNCH RESTORATION

Peter Vaughan of The National Museum of Computing in the UK has restored an 1130 system much like mine and has been an invaluable source of tips and shared experiences as I work on this machine. When I was disassembling the feed and read clutches to clean up the lubrication issues, I found a short narrow pin with rounded ends sitting in the bottom of the machine compartment.

Peter recognized it from the description, since he had exactly the same thing happen to him while he was working on the 1442. It is a pushrod that must be reinserted in the feed path mechanism. If only he could tell me where my dropped punch is sitting, all my problems would be solved.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I had very solid progress today. The binary mode works properly, as does the automatic multipunch mode. I discovered a small flaw in the code that was blocking the release function, corrected it I thought, but it wasn't working.

Continuity testing showed me that the signal wasn't getting through my interface box. The wires inside the box to the plug on my box were working, but no continuity through the cable. I finally discovered that pin 20 of the female plug had pushed out rather than sliding over and mating with the pin of the male connector on the box.

I opened the connector, pushed the pin back into place, reassembled the connector but once again, no connectivity!  Clearly the pin is not latching as it should into the connector body. The next time I work on this I will open the plug housing AGAIN, but this time chop the wire off the defective pin, toss that pin in the trash, and put on a new pin.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

The third board is now more than half done - seven pairs of driver/receiver circuits installed out of twelve. Once again, ran out of daylight or I would be done.

I began repairing the flaws in the first board - I have just five pairs of resistors left to insert. One of the pair (12K) is already installed into the +5V rail, waiting for me to open the hole and insert the other end where it belongs. The 1K resistor need holes for both sides opened and then the resistors installed. This won't take that much time until it is wrapped up.

Monday, November 3, 2014

Very little done other than root canal and bit of discomfort

Yesterday a molar began to really hurt, last night the dentist set up an appointment with the oral surgeon, and today I stumbled through my appointments on Tylenol w Codeine until the root canal was done at lunchtime. I felt okay for a short while and did a bit of soldering on the SAC interface, but now my jaw is swollen with an inch diameter bump over the tooth and I am down for the count again. Nothing is going to happen today and I hope that I can resume later tomorrow.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I corrected the flaws in the second board, which only needs its wiring now to complete it. I didn't get to the first board, which had nine pairs of resistors to replace, because I ran out of steam.

I did start board number three but only put in one pair of driver and receiver.