UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 10th Oct 2020, 10:30 pm   #21
DeltaAlpha52
Tetrode
 
Join Date: Feb 2020
Location: Crawley, West Sussex, UK.
Posts: 77
Default Re: MK14 programming interface - Arduino version

Not sure about the firmware side of things but if I use "charlieplexing" I can control the 4 row and the reset optocoupler switches using 3 pins and the 10 column optocoupler switches with 4 wires. This allows plenty to have both ISP for an SD card and serial memory and I2C for a display even when using a Nano.

You can get a bit more memory when using a Nano by changing the boot loader to a Nano one.

Have done a schematic in Kicad and now to breadboard the design and see if it works. Not sure what value to use for the resistors as there are 2 resisters in series for each optocoupler with the "charlieplexing" design . Need to check the current drawn and what is a good "on" current - must remember to read the datasheets.

I'll let you know how I get on - although there might be a slight delay as the PCB I have done for a fix to the Nascom 2 has just turned up so I need to test that first

Cheers
David
DeltaAlpha52 is offline  
Old 10th Oct 2020, 11:17 pm   #22
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

My original (2012) MK14 uploader used individual optos to shadow each keypad key (so, 20 optos) and obviously it would have needed a lot of individual outputs to drive all of those opto LEDs so I connected them in a matrix, wired such that I could turn on any one specific opto by sending bit patterns held in look-up tables to the two sets of matrix lines.

However that, plus the awkward non-intuitive layout of the MK14's keypad grid, made it a very complex circuit to hand-build with almost infinite scope for getting it wrong either on the LED grid or the keypad grid and that was why I never put that version in the public domain. I could see myself trying to offer remote support to people who had managed to get the grid wiring horribly wrong.

The suggestion of using pairs of optos (one above the other) to join rows and columns came from TonyDuell, one of our forum members here. That cut the number of optos to 12, a small enough number to drive with individual GPIO outputs. Although still a bit wasteful, one GPIO output per LED is very easy to visualise and wire up and I wanted it, above all, to be easy for anyone else to hand-build and debug. The only people I personally know who have actually put one together are you and Tim and both of you managed to do it without any further input from me, it's usually the software, in particular the timing of the length of keypresses and / or the reset timing which seems to need fettling to suit individual machines.

I can totally see why you'd be considering going back the other way (more complex) when you are thinking of ways to add so much extra functionality with limited numbers of GPIO pins.
SiriusHardware is online now  
Old 11th Oct 2020, 7:16 pm   #23
DeltaAlpha52
Tetrode
 
Join Date: Feb 2020
Location: Crawley, West Sussex, UK.
Posts: 77
Default Re: MK14 programming interface - Arduino version

An interesting point about complexity and making it simple to hand wire it. I can get a bit carried away when I find out "clever" tricks like Charlieplexing. Maybe it might be better to keep in simple and just upgrade the Arduino up to a Mega 256. Not that much bigger than the Nano and then I can then get all the bits on a shield.

And well done for your nano shield it looks very neat, what are the chips you used for the optocouplers?
I see that you have a set of pins on the top, I assume you have a cable set to connect to the MK14 edge connector. How have you handled the reset switch? I have a couple of wires from the MK14 that end in a 2 pin plug on the board.

Yep PCB boards can be a bit of money but given what I have already spent building the MK14 replicas it's not too bad. If I do manage to produce one I certainly will make it available to others as as you say you normally have to have a number made in one go. Great if it works but a bit of a waste if it does not.

David
DeltaAlpha52 is offline  
Old 11th Oct 2020, 7:51 pm   #24
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

Well, there is a get-out clause for what I said above: If you provide people with a nice ready made PCB to build your project on it doesn't matter how complex the circuit is because the PCB takes care of all that. All the end user has to do is put the right parts in the right holes or on the right pads, the right way around. OK, there is still some scope for things going wrong even with a PCB.

It's actually an UNO under that shield and the circuit and the parts are exactly the same as on the Pi version, 13 * TLP185. The thirteenth opto is the reset output, the cable which plugs onto that 14 way pin row connector (4 + 8 keypad lines and reset plus and minus) has a 16 way single sided edge connector for the keypad connection on the other end.

Most of my projects look neat from above because I tend to put only components on top and all the all the wiring underneath, so they are the stuff of nightmares viewed from below.
SiriusHardware is online now  
Old 17th Oct 2020, 8:51 pm   #25
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

A new revision (V1.2) of the PC-side MK14 uploader script send14.py (for_Arduino version). This fixes the problem described in #15 of this thread where if the autorun feature of the uploader was used, it had the unwanted side effect of writing the execution address into addresses 0FFE and 0FFF. Writing anything into address 0FFF using keypad entry (...as the uploader does) caused the states of the hardware flag outputs to be changed as well. Bad news if you happened to be controlling something with them.

It wasn't just a one-line change or line swap this time so unfortunately this new version of the script has to replace the older version. Any edits you may have made to your previous version such as the 'MK14_OS=' setting or alterations to the keypress / key release times will need to be transplanted into this version. If running under Linux you may have to make the script executable by your user, as you would have with earlier versions.

As before I have bundled the revised send14.py script for Arduino in a .zip file along with DA52's companion Arduino sketch (unchanged) and the moonland.hex file as a 'starter kit' so you don't have to run back through previous posts looking for the other bits.

I will post a V1.2 of the script for the Pi version of the uploader in that version's thread in due course.
Attached Files
File Type: zip send14_for_arduino.zip (6.4 KB, 71 views)
SiriusHardware is online now  
Old 17th Oct 2020, 9:47 pm   #26
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

Incidentally DA52 asked how I'm making the connections from the uploader to RESET on the MK14 - the MK14 I'm using almost 100% of the time now is my 'issue VI' designed by Slothie of this ilk - it makes several improvements over previous genuine and replica MK14s, one of which is that it repurposes one of the two 0V connections at the top end of the keypad edge connector as a reset input, the other is still 0V, so the reset output from the uploader in this case can go directly to the highest two pins on the keypad edge connector.

If you have a JMP replica you could make a discreet track cut and rewire one of the 0V fingers as reset_in and do the same thing.

On the original issue V / 'Martin' replica I believe the input of the reset circuit has one less inverter and is taken up to +5V for reset, so you would have to cut both of the top two connector fingers loose from 0V and make one +5V and one Reset-in, with the reset-opto collector connected to +5V and reset-opto emitter connected to Reset-in.
SiriusHardware is online now  
Old 20th Oct 2020, 11:13 pm   #27
DeltaAlpha52
Tetrode
 
Join Date: Feb 2020
Location: Crawley, West Sussex, UK.
Posts: 77
Default Re: MK14 programming interface - Arduino version

So the revised versions of the MK14 have another inverter in the reset circuit.

Is there an updated schematic for the MK14 "issue Vi" ?
DeltaAlpha52 is offline  
Old 20th Oct 2020, 11:43 pm   #28
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: MK14 programming interface - Arduino version

Quote:
Originally Posted by DeltaAlpha52 View Post
So the revised versions of the MK14 have another inverter in the reset circuit.

Is there an updated schematic for the MK14 "issue Vi" ?
Yes, Here is the latest schematic for rev 1,2 of the Issue VI. Note that this is not the same as the JMP or Martin replicas, it has an extra logic IC to allow ram at 0x200-7FF and optional support for 65X61 RAM chips, as well as having all the signals required for the VDU brought to the edge connector.
Attached Files
File Type: pdf mk14_v6_1_2.pdf (398.9 KB, 71 views)
Slothie is offline  
Old 21st Oct 2020, 12:01 am   #29
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

I went looking for the issue VI circuit, blinked, and Slothie had already rocked up with it. Thanks Slothie. I believe Slothie is also working on rev 1.3 of the issue VI as well, although I don't think it is a priority for him as he has several other projects on the go as well.

The lowdown on MK14 reset inputs is:-

- JMP replica, which is reportedly an 'issue 0' clone - active low reset input.
- Original issue II through issue IV - active low reset input.
- Original issue V and Martin L replica - active high reset input.
- Issue VI replica - active low reset input.

Of the above, only the issue VI replica has the reset input already available on the keypad edge connector.

The reset output of the uploader, being opto-isolated, copes perfectly well with either case - on all but issue Vs / Martin L replicas the reset opto collector goes to reset-in and the reset opto emitter goes to 0V.

On the original issue V / Martin replica, +5V and reset-in would have to be made available at the edge connector with the reset opto collector going to +5V and the reset opto emitter going to reset-in.
SiriusHardware is online now  
Old 21st Oct 2020, 9:40 am   #30
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: MK14 programming interface - Arduino version

When I made my uploader for my prototype that didn't have reset on the keyboard connector I just put the reset on a flying lead with a small croc clip, irs easy to clip onto the top of the reset capacitor (near the reset button).
Slothie is offline  
Old 21st Oct 2020, 5:15 pm   #31
DeltaAlpha52
Tetrode
 
Join Date: Feb 2020
Location: Crawley, West Sussex, UK.
Posts: 77
Default Re: MK14 programming interface - Arduino version

I have a Martin L replica board and put a flying connector the attaches to either side of the reset switch, and a 2 pin connector on the MK14keys board.

That is to 5v and the junction of the capacitor and the resistor.

I am not sure that having a 5v connector on the edged connector would be a great idea.
Think it would be best to have a separate 2pin female connector, less change of accidental connections, and probably under the MK14 so it is hidden.

Thanks for the information on the various versions.
DeltaAlpha52 is offline  
Old 21st Oct 2020, 5:37 pm   #32
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: MK14 programming interface - Arduino version

Quote:
Originally Posted by DeltaAlpha52 View Post
I am not sure that having a 5v connector on the edged connector would be a great idea.
That's why when I revised the rev1,2 board I didn't want to put +5v on the keyboard connector. because I needed to use one of the two inverters in the reset signal, that's what others have done - invert the input reset ti make it active high. I was conscious that someone might short the supply with a mis-aligned connector not expecting there to be +5 on the connector, or by plugging in an older keyboard designed for the original device. Instead I re-arranged the logic using a spare AND gate instead of an inverter to buffer the signal so that the reset signal would be active zero. If an old keyboard is plugged in it would just hold the CPU in reset, not disastrous.
Slothie is offline  
Old 21st Oct 2020, 6:22 pm   #33
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: MK14 programming interface - Arduino version

I agree that it would be undesirable to have hard +5V on the keypad edge connector because the connector is not keyed, therefore +5V could end up anywhere in the event of a mishap.

A compromise might be, rather than take hard +5V to the edge connector, take it via a 470R or 1K resistor - a low enough value to take the reset input up to logic 1 against the action of the already existing 4K7 pulldown resistor. If a slip does occur, the resistor will limit the current and therefore the damage.

My Pi version of the uploader was made to use with my issue II MK14 which does not have reset available on the edge connector, but because it is a 40+ year old museum piece and possibly quite valuable I would not consider applying even the smallest of mods to it now.

For that one I just used a pair of flying leads with test clips attached to the leads of the reset capacitor as mentioned by Slothie. (See image). Not pretty, but it involves no modification to the target machine and since the connections are directly to the reset capacitor it does not care whether the machine is active-high reset or active-low reset as long as the opto collector goes to capacitor + and the opto emitter goes to capacitor - . The 120R resistor in series with the collector is to prevent the opto transistor from discharging a fully charged capacitor through itself without any current limiting.

I am not aware of a single legacy add-on or project which used either of the 0V connections on the keypad edge connector, although some individuals may have used one or both as a handy place to pick up 0V from on their individual system builds. The external keyboard itself does not require 0V. 0V would however come in handy if you used a non-isolated interface scheme which required a common 0V between the interface and the MK14.
Attached Thumbnails
Click image for larger version

Name:	PiZero_MK14_PRG_3.jpg
Views:	59
Size:	40.5 KB
ID:	218513  
SiriusHardware is online now  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 1:42 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.