UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio 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.

Reply
 
Thread Tools
Old 7th Apr 2019, 8:09 pm   #21
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

Click image for larger version

Name:	MK14working.jpg
Views:	32
Size:	134.3 KB
ID:	181026 - Yay it works - thanks to SiriusHardware for so quickly blowing my PROMs. Only fault was SENSEA not grounded so it would not run code (but, that was due to a missed solder on my header 0v PIN) and it reset a few times as I had a dry joint on the 9V feed (old 1980's socket is my excuse...). Click image for larger version

Name:	VeryDryJoint.jpg
Views:	27
Size:	169.1 KB
ID:	181027

Seems the IO chip is faulty as I get no RAM at 0800 - hopefully they will replace that for me as they seem fairly reputable (although see later in case it could be a board issue?).

Anyway I typed in the scrolling message and as I have heard described in a review the most fun was had in building it so I thought I would give a go at SiriusHardware MKII PI programmer as in this thread with some hints from the maestro himself (thanks again). Well had a few to drink when I wired the 3v straps and missed the transition from strapping collectors to emitters for the row selects. Duh - reset worked... Click image for larger version

Name:	PIprogTop.JPEG
Views:	34
Size:	175.1 KB
ID:	181028 Click image for larger version

Name:	PIprogBOT.jpg
Views:	27
Size:	174.9 KB
ID:	181029so a quick fix and mess up my nice layout and it seemed to start working except for some keys... 4->5 5->7 6->9 7->8 E->9/0 and F gives 6/0. Hmm must have been wired wrong - double checks for shorts and numbers and mistakes and it all seems OK. Click image for larger version

Name:	PIprogPATCH.jpg
Views:	30
Size:	171.6 KB
ID:	181030

Anyway after quite a while I decided to tap out the JM Version 0 board edge with a patch lead to simulate keys. Seems that 6 and 8 are not N/C but give characters 6 and 4 respectively - so the columns (pins 8-3) return 0-9 as clean numbers - I assumed that the two marked NC actually presented 8 and 9 from the BCD to Dec decoder IC13 on a real MK14? Can anyone confirm that? So they should do nothing although with just shorting the selector to the row if they are low it would look like a key perhaps giving the effect I see of 0-9 on the columns.

So it seems I need to wire another connector (without the missing pin) and work out how to modify the programmer to allow for the different layout.
It seems (and its a guess) that the other issue is Pin 13 and 14 are reversed so a different row select is happening.
Timbucus is offline   Reply With Quote
Old 7th Apr 2019, 9:44 pm   #22
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

OK well I had an hour to waste so I soldered on a ribbon with another connector - 13 and 14 are not reversed it is the pins 3 and 4 which generate column 6 and 7 so on the JM he has kept them in order and they appear as pins 5 and 6 where 5 is col 7 and 6 is col 6.

key14 ran fine but, send14 failed so I doubled the constants

KeyPressLength to 0.07
KeyReleaseLength=0.010
ModeChangeSettleTime=0.012

And message.hex went in a lot quicker than when I typed it in... I will try and tune them down later but, it is quite mesmeric watching it type.

Moonlanding took a while and I crashed...

I would still like to know if columns 8 and 9 appear on pins 8 and 6 on a real MK14...
Timbucus is offline   Reply With Quote
Old 8th Apr 2019, 12:16 am   #23
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Wow, you don't hang around. Glad the PROMs turned out to be genuine and programmed OK.

I'm interested in the fact that you had to lengthen the delay constants - is that with a 4.43MHz crystal or a 4.00MHz crystal in the MK14?

I'm also interested in the apparent difference between the keypad edge connector on my (issue II) MK14 and the JM replica.

It's a little bit late to look at it tonight but I will repeat your experiments with a jump lead to see if the edge connector pins I marked 'NC' on my diagram really are not connected on my machine.

The 'NC' on my diagram may just mean 'Don't connect this' as opposed to 'There is nothing connected here'. My original sketch for the keypad connector layout (from which all of this more recent stuff is derived) is more than 40 years old.
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 12:54 am   #24
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Well, curiosity got the better of me so:

(Assuming the keypad edge connector pins are numbered 1-16 from top to bottom starting at the reset switch end):

On my (original) issue II MK14...

Taking edge connector pin 16 (Row 0-7 according to me) to edge connector pin 6 produces an '8' keypress.

Taking edge connector pin 16 to edge connector pin 8 produces a '9' keypress.

Those 'NC' connections do therefore go somewhere, but I have never needed to connect them to get an external keypad (or something which simulates one) to work.

Looking at the MK14 diagram (or at least, the diagram for the issue II) the keypad is definitely shown as having keys 0-7 on one row and keys 8-9 on their own row.

Am I right in thinking that the 'fix' for getting this to work with the JM board is to swap over the connections going to edge connector pins 3 and 4?
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 1:14 am   #25
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Ah, no, on second reading, I think you mean that not only have those two column lines been swapped into the right order, they have also been moved downwards, further down the connector, as well?
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 8:10 am   #26
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

Yes that is correct they now represent a clean sweep after the four column selects in numeric order for the BCD decode lines - that was my problem I had no connection physically on the 6 in the salvaged edge connector I built it with or I could have modified the patching - this way I now have an edge connector for an original as well.

This is a 4.43 crystal but. I was using a PI0 not a W so I think that may have an effect. I do seem to have an issue though as the reset does not seem to take all the time - removing the programmer the fault shows anyway just not as often maybe the cap/resistor combination is not holding it low long enough - will put a scope on it when I can make room on the bench for a full size one.
Timbucus is offline   Reply With Quote
Old 8th Apr 2019, 9:00 am   #27
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

OK - that's annoying as I'm going to have to add that detail to the project, and maybe generate a version of the diagram specifically for the JM version PCB. It certainly makes a mess of the way I chose to lay the project out so that everything had a one to one physical relationship to the thing it has to connect to.

I'm sorry you had to be the pioneer who found this out, but I appreciate the way you persevered.

Fellow forum user 'Slothie' had a similar problem with the reset on his replica and I think he felt that was related somehow to his use of a SMPSU / Wallwart - I can't remember where / in which of the numerous MK14 threads he mentioned that, or what the outcome was.
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 9:27 am   #28
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

No problem half the issue with modern systems is the inability to trace faults - I think the design is fine in the end - it is only the pinout used which can be done by changing where the ribbon connects on your block - so a warning on the diagram really is needed as it is likely all original MK14 use the same as you - we will have to see about the one from martin and indeed Slothie’s. It does mean that a full 40 key keyboard could be added if the software could ignore the echo’s that are generated by using pins 8 and 6 or 3 and 4 in my case. I have a cunning plan...
Timbucus is offline   Reply With Quote
Old 8th Apr 2019, 5:12 pm   #29
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Somewhere in the originial MK14 documentation, the text alludes to the fact that the key row / column matrix can support more than just the 20 keys of the onboard keypad. Once your own software is in control of the machine it is entirely up to you which row / column intersections you look for and how you act upon them.

Slothie's MK14 is of his own unique design so I think he will know how he has routed the row / column lines to the keypad edge connector on his own PCB.

I get the strong impression (admittedly unconfirmed) that Martin's PCBs are near exact clones - possibly from scans - of the issue V PCB and so with any luck the column / row routing to the edge connector on that version is as per the original machine.

That said, there is no guarantee that the keypad edge connector layout remained the same through each issue of original MK14 - I would like to hope so, but I have no idea if that is definitely the case.
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 7:22 pm   #30
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Tim: If you get a moment, could you have a look at these two diagrams, attached?

The first is the Pi-MK14 programming interface V2 modified to suit the JMP PCB in the way that I believe you modified yours, by shifting some of the output lines down and crossing the top two over.

The second is the version I propose to make the 'final' JMP version. In this version, instead of swapping over the optocoupler output connections to columns 6 and 7, I have swapped over the connections to GPIO 5 (IDC 29) and GPIO 7 (IDC 26) instead. This has the same effect, but keeps the left hand side of the circuit looking a bit tidier.
Attached Thumbnails
Click image for larger version

Name:	MK14_Pizero_Interface_JMP_V1.0.jpg
Views:	33
Size:	74.0 KB
ID:	181069   Click image for larger version

Name:	MK14_Pizero_Interface_JMP_V1.1.jpg
Views:	36
Size:	73.4 KB
ID:	181070  
SiriusHardware is offline   Reply With Quote
Old 8th Apr 2019, 8:45 pm   #31
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

They both look spot on - as you say the second one is a neater solution but, it can then only be used with a JM Precision board - I will have one of Martin's soon so even if I don't make it up as yet, I can check the routing - I am with you that I am sure it will be the same as MK14 v5. Can I suggest you add the pad numbers from 1 at the top down to 16 to clarify it - I did that on my copy.

I had wondered about a simple patch system based on a 14 pin IC socket on the board for the top lines - it would be easy to make up some patches on another two 14 pin sockets for the two we know about already and other machines if they proved to be different - e.g. MK1-5 originals. This will be neater for me than the flying lead I have now as I want to be able to program original MK14's as well... just in case (or at least Martin's if I make it). I will then just swap my connector soldered to the board for my new one on the flying lead that has all the pins in it... I knew the find was too good to be true of one with Pin 6 missing...

Click image for larger version

Name:	RevisedSHpi.jpg
Views:	25
Size:	144.9 KB
ID:	181073

I also wonder about having an optional two extra TLP that could support the extra rows for using it as a full keyboard interface - again hooked up with the patch system if wanted. I might fancy having a play with that once I add some expanded memory to the MK14 and two extra GPIO on the PI to use... It will be a hack on mine as they will have to go at the bottom but, there is more than enough space on the board for them if started out correctly.

Which leads me to the final conclusion with all 14 connected it would be simpler to have some software switches change over the GPIO Col select in the key14 and send14 programs for board version then.... and save all the above patching... as you did with the SCIOS version...

I will probably add another one in at least for your and KarenO's Cassette / RS232 save trick and hook it to the PI serial port for saving data generated on the machine and to act as a text output terminal...

I was thinking that would add two way comms so the PI could see if the reset had happened as well... try a small save of known data and see if the answer came back!

I also did some testing and I could get KeyPressLength down to 0.024 and KeyReleaseLength to 0.006 - I put ModeChangeSettleTime back to default 0.006 and it was still fine.

I had to set the last time.sleep after reset up to 0.08. I still get the occasional failure but, as I said I get that anyway on the switch - I will investigate a non wallwart switch mode power supply as you suggest - a bigger heatsink, reverse to +Ve outer and one of the hundreds of Spectrum PSU's I have may be better!

On the extra memory topic I found that some samples from the holy grail book are available online in case anyone missed it... The contents at the front and interestingly the whole technical section from the back (Back Matter) are a PDF download which includes a diagram for an extra 1.5K of RAM. If you download the sections they will be named the same so watch out...

https://link.springer.com/book/10.10...-1-349-81357-5

Wow that was a bit of brain dump...

Tim

Last edited by Timbucus; 8th Apr 2019 at 9:00 pm.
Timbucus is offline   Reply With Quote
Old 8th Apr 2019, 9:45 pm   #32
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Quote:
Your and KarenO's Cassette / RS232 save trick
That was entirely and only Karen's idea - I just had an MK14 to try it out on.

I have to admit my thinking, once you discovered that the JMP board had different connections, was that most people are only ever going to have one MK14 in their life, so the idea was to keep the interface that they would have to build for their particular variant as simple as possible. If you have an 'Original' or presumably a 'Martin', build it one way: If you have a JMP, build it the other way.

However, the idea of fully expanding the range of optos to at least 14 or more is a good one and not just because it would create the possibility of a soft-selectable interface which works with both variants, as you say: It means that the same interface can be used to upload to virtually any sort of retro system with a matrix keypad, an idea originally mooted by forum member GrahamN (who also has a JM replica). You could use that one multi purpose interface with utilities similar to send14 but tailored for other systems, imagine 'sendacorn1' or 'sendkim1'. I don't propose to take this very much further myself, but the idea / project is public domain, I have no problem with anyone else taking it and running with it and making it better / more versatile or even producing and selling a nice PCB for the interface (in which case, please sell me one!).

I was thinking earlier about what might have caused you to have to slow the uploader down and it occurred to me that probably the biggest potential difference between any two machines (in terms of timing) might be the value of the reset capacitor - not the marked value, the actual value. Electrolytic capacitors have a very wide variation in tolerance. If your machine happens to take longer to come up out of reset than mine, then with the timing optimised for mine the script might have been starting to send the code before yours had had time to come back up out of reset. I was going to suggest that you disconnect the reset opto from the MK14, then gradually turn those values back down to the smallest which worked (manually resetting before each upload) and then reconnect the reset output of the interface to the MK14.

If that stopped it from working again, it would strongly suggest that the script was not allowing enough time between reset-release and the onset of the actual code upload. But once again, you seem to be one step ahead.
SiriusHardware is offline   Reply With Quote
Old 9th Apr 2019, 12:00 am   #33
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

Great idea of using it as a general purpose interface - you could even test Spectrum and other more "modern" machine motherboards as well - I think my programmer board may get a refit soon, as I am always scrabbling for a keypad when repairing machines.

That is actually the idea I referred to earlier - I have an Amstrad Grey keyboard on a dead 128 which would make a nice keyboard for the MK14 as it is a 4x10 matrix! Just need a TESLA prom programmer now for some custom SCIOS - ah well on the project queue with the half built Alpha Micro...

On the timing I have not been able to reduce below 0.024 for key press length a factor of 7 more than your 0.0035 so something is different (and not the PI0 and PI0W as you use time.sleep which is a hardware timer) - maybe my IC11 74LS365N substitute for the DM80L95N - we would need to compare data sheets but, it is certainly possible it needs longer to latch a valid value, that might really need adjustment of R7-R10 pull ups that has not been accounted for in that substitution?
Timbucus is offline   Reply With Quote
Old 9th Apr 2019, 6:42 am   #34
JohnBHanson
Hexode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 439
Default Re: MK14 programming interface - MK2

Worth a look at
https://www.americanradiohistory.com...ay-1983-10.pdf
(Page 22) And the corrections in
https://www.americanradiohistory.com...ay-1984-03.pdf

Can be adapted for other keyboards. I connected the outputs of IC4 to the address lines of the eeprom to give me more flexible encoding. In addition the panasonic typewriter has 9 output strobes so the ninth strobe is also connected to an address line of the eeprom. This arrangement also allows characters to be mapped into multiple key presses such as shift/code with other characters. In addtion IC6 can also be omitted using the 8 data lines from the eeprom directly.
I also missed out IC2/IC3 the address comparator. Works fine.

PS. I wrote a perl program to generate the eeprom.
JohnBHanson is offline   Reply With Quote
Old 9th Apr 2019, 12:56 pm   #35
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

JHB, thanks for the links: On a short lunch break just now so I will take a longer look tonight.

Tim, with regard to the possibility of the '365 causing slower keypad response, if you have a spare and you intend to send your INS8154 to me for testing anyway (as per PM) then send me a spare '365 as well and I will drop it in and see if it 'breaks' the much faster keypad response my original machine seems to have.

I also wonder whether that big display is loading the eight display common drive lines (shared with the keypad) in a way which wouldn't happen with the original calculator display - does that have any on board buffering or is it just a passive drop-in replacement for the original display?

Also the 7408s - are they actually 7408s or 74(something)08 on your JM machine?

I have to say I had no idea what a minefield I was getting into here before I stepped on it. I had hoped that these machines were so simple that no replica would be very much different from an original.
SiriusHardware is offline   Reply With Quote
Old 9th Apr 2019, 5:23 pm   #36
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Just had a quick look at JBH's (not JHB as above, sorry about that) link. It appears to use the so called 'sense and react' method in which the would-be-external typist monitors the scanning of the keypad scan drive lines and 'blips' one of the keypad read lines at the exact right moment to simulate a desired key press.

I thought of this method of connection / control right at the beginning as it is potentially the simplest method of all, in terms of hardware, of enabling a microcontroller to 'press' keys - the micro just needs as many i/o pins as there are keypad row and column lines - but it has one unforgivable disadvantage for me: It is not isolated.
SiriusHardware is offline   Reply With Quote
Old 9th Apr 2019, 10:32 pm   #37
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

Interesting articles JBH - fancy trying that if not on my MK14 then on my Alpha Micro as it would make an ideal cheap replacement for a teletype style serial terminal! The joys of ED again

The links to ETI are great as I grew up reading them and sadly only have a few saved along with some others... so that is great

Now the IO is working - see thread elsewhere - I will still send SH the 365 to try and I am sure he will report back. The display is just passive but it is being driven by genuine 7408 pair as I saw the warning elsewhere about display drive current needing them. I have a Russian original style display on the way and as the current one is purposely on a plug header I will try it with.that as well when it arrives.
Timbucus is offline   Reply With Quote
Old 9th Apr 2019, 11:57 pm   #38
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Just when it didn't seem possible to be having more fun than we already are, I had another thought about this: What if the whole machine is running slow for some reason? Incredibly unlikely I know, but...

Try entering the code below (run it from 0F12). On my machine with its 4.43MHz crystal, Flag 0 generates a rock steady square(ish) waveform whose frequency is within one Hertz of a nice round-number audio frequency according to the 'frequency meter' on my Fluke 83 DMM.

What frequency do you get out of Flag 0 if you run it on yours?

Code:
0F12 C4
0F13 11
0F14 8F
0F15 02
0F16 C4
0F17 01
0F18 07
0F19 08
0F1A C4
0F1B 11
0F1C 8F
0F1D 02
0F1E C4
0F1F 00
0F20 07
0F21 90
0F22 EF
(...Why not just measure the frequency on the CPU oscillator pins?)

It's highly likely that the crystal is running at the right frequency, but also just possible that something else - induced noise?- might be halting the CPU for x% of the mains cycle (just for example). You can rule it out by trying that simple frequency generation test to see if your machine executes code at the same speed as mine.
SiriusHardware is offline   Reply With Quote
Old 10th Apr 2019, 4:49 pm   #39
Timbucus
Tetrode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 77
Default Re: MK14 programming interface - MK2

Well not having anything as posh as a frequency counter - I can on my scope see a rock steady 5v peak to peak square wave with a cycle of 1ms which my mental arithmetic makes 1KHz... did I get it right?
Timbucus is offline   Reply With Quote
Old 10th Apr 2019, 4:58 pm   #40
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 3,051
Default Re: MK14 programming interface - MK2

Did you mean... 1ms high + 1ms low (= 2ms per cycle)

or..

1ms per total length of one cycle?

It should be the first one, therefore 500Hz (actually 499.6Hz on mine).
SiriusHardware is offline   Reply With Quote
Reply

Thread Tools



All times are GMT +1. The time now is 10:04 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 - 2019, vBulletin Solutions, Inc.
Copyright ©2002 - 2019, Paul Stenning.