Old Meets New


24 posts
by SiriusHardware » Tue Jan 29, 2013 4:28 pm
Something slightly different on the interfacing front-

A little clip of the Raspberry Pi being used to write, assemble and send code to the first computer I ever bought, using an open source cross assembler program to create the code and a custom hardware interface to shunt the code from the Pi into into the target system.

http://www.youtube.com/watch?v=j1WSy_ueX34

This is a lot easier than the way I used to have to programme this machine back in the seventies. (By hand, in Hex).

As soon as I got my hands on a Pi I knew I wanted to use it do this - the notion of using the Pi to programme the original strange little uncased, cheap British computer was just too good to resist.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by gordon@drogon.net » Tue Jan 29, 2013 5:37 pm
Fantastic!

I did something similar with my MK14 way back with a BBC Micro - used the printer and user port to drive the keyboard more or less directly - all from BBC Basic. Sadly the Beeb, disks, etc. got stolen, but I still have the MK14...

Image

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by SiriusHardware » Tue Jan 29, 2013 7:00 pm
That is a beautiful example - is that a contemporary picture? If so, you're very fortunate to have one in such good original condition.

It's very rare for the original keypad to have survived, because they were so bad. I removed mine and replaced it with the one you see in the clip some time in the first year I had it (1977/1978?) , and over the years I lost most of the original keypad parts - the only bit I still have now is the conductive rubber sheet.

Although it isn't obvious from the video clip, the serial downloader / keypad interface module is a 'dual layer' board - two identical bits of stripboard piled one on top of the other. On the upper layer is the processor, RS232 level shifter and 32K SRAM (for buffering serial reception). On the lower slice of stripboard is a complex matrix of optocouplers with their outputs wired in the same (weird) matrix as the MK14's keypad. If the interface wants to press a particular key on the MK14, it momentarily activates the relevant optocoupler. This approach was taken so that there would be no direct connection between the interface and the MK14's circuitry, specifically so that the interface could be 'hot plugged' into / unplugged from the MK14 while it was running without the risk of damaging it.

I do also have the MK14 cassette tape interface (which worked well, but was considerably slower than the loader method in the video clip, at only 4 characters a second!).

I've also got the MK14 VDU card, no longer connected to the MK14. It wasn't a great success because it consumed the greater part of the MK14's fully expanded 640 bytes (!) of memory, leaving very little memory left over to run a program. Plus, on my issue II MK14 the address and data buses were not available on the top edge connector (they were only available there on issue IV onwards as far as I know) and so connection to the MK14 was via a mass of flying leads plastered directly onto the address and data lines. I used it for a while, then uninstalled it. I am however intending to make a custom controller / driver board for the MK14 VDU so that it can be demonstrated working, but that will be some way into the future.

I argue that the MK14 is actually the prime ancestor of the Raspberry Pi, since it was the modest success of the MK14 which led to the development of the ZX80, ZX81 and Spectrum by Sinclair, and (via Chris Curry, who left the company after the MK14) the founding of Acorn, which ultimately produced the BBC model B and the subsequent mass introduction of computers into British schools.

Have you seen how much MK14s sell for now? You'd be amazed. A non-worker went for over 1000 GBP last year.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by gordon@drogon.net » Tue Jan 29, 2013 8:01 pm
Hm. I took that photo 2 years ago - I've just powered it up again and it's not that happy. Something on the display, but not what I'd expect...

So... Do I make the effort now to repair it or just give it up...

It's an Issue II board. I have had to re-solder the display in the past and fix the keypad several times too. And note that it's had a bash at some point as the xtal case is somewhat dented )-:

But yes, I saw that non-working one sold on ebay last year and I was completely astonished. I think the highest I've seen is some £1700 too. Maybe I can sell it and treat myself to that Curta calculator I've always wanted...

There is a absolutely pristine one in The National museum of computing on Bletchly park too...

Maybe I'll give it some TLC next weekend and see what I can come up with. I still have the manual and circuit diagram, etc.

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by SiriusHardware » Tue Jan 29, 2013 8:48 pm
gordon@drogon.net wrote:Hm. I took that photo 2 years ago - I've just powered it up again and it's not that happy. Something on the display, but not what I'd expect...


A single bright zero by any chance? Like when the reset button is held down?

gordon@drogon.net wrote:So... Do I make the effort now to repair it or just give it up...


You repair it, obviously. You know you want to. ;)

I was amused to note that most of your ICs are in sockets, except for the 18 pin ICs. My local component emporium didn't have any 18 pin sockets either when I went to buy all the sockets, and I was too impatient to wait for them. I wanted to play with it. :-)

gordon@drogon.net wrote:It's an Issue II board. I have had to re-solder the display in the past and fix the keypad several times too. And note that it's had a bash at some point as the xtal case is somewhat dented )-:


I did see the bash in the crystal - I suppose it's not impossible that the crystal has finally objected to being brutalised in that way. One of the changes for fitting of the VDU involved changing the original 4.433Mhz crystal to 4.00Mhz, and so the original crystal that came with mine was lost a long time ago and a smaller, more modern one fitted for many years - fortunately, I managed to obtain an authentically chunky 4.43Mhz replacement from someone in a vintage TV forum quite recently. They were produced in very large numbers for use as the colour subcarrier crystals in first generation PAL colour TVs, and were consequently very cheap - that's no doubt why Clive chose to use them.

gordon@drogon.net wrote:There is a absolutely pristine one in The National museum of computing on Bletchly park too...


I absolutely have to get there some day - it's a little bit beyond my normal range. I know they were originally confined to premises they weren't very happy with and could only seem to accommodate visitors on a by-appointment basis - is it now a conventional museum which can be visited at any reasonable time?

For MK14 history, circuit diagrams, details about a recent modern recreation of the MK14, the original manuals and other things besides, the site

http://www.mymk14.co.uk

-Is a very useful resource. I still have all my manuals and diagrams as well, but they are now quite fragile so I use copies printed from the PDF manual scans on that site.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by PeterO » Tue Jan 29, 2013 9:07 pm
SiriusHardware wrote:
I absolutely have to get there some day - it's a little bit beyond my normal range. I know they were originally confined to premises they weren't very happy with and could only seem to accommodate visitors on a by-appointment basis - is it now a conventional museum which can be visited at any reasonable time?


Well you could always kill two birds with one stone by coming to one of our Raspberry Jams in the morning of the last Sunday of each month, and then staying on to visit the museum in the afternoon :-)

Opening times for the next few week are here: http://www.tnmoc.org/visit/opening-times Best to check regularly as extra opening days get added when we know enough volunteers are available on a particular day to open. We are always open on Thursday & Saturday afternoons.

PeterO
User avatar
Posts: 521
Joined: Sun Jul 22, 2012 4:14 pm
by gordon@drogon.net » Tue Jan 29, 2013 9:15 pm
SiriusHardware wrote:
gordon@drogon.net wrote:There is a absolutely pristine one in The National museum of computing on Bletchly park too...


I absolutely have to get there some day - it's a little bit beyond my normal range. I know they were originally confined to premises they weren't very happy with and could only seem to accommodate visitors on a by-appointment basis - is it now a conventional museum which can be visited at any reasonable time?


Yes, it's well worth a visit if you can. They're on Bletchley Park, but you don't need to see the BP exhibits to see the TNMoC exhibits:

See here: https://projects.drogon.net/a-visit-to- ... computing/

and their own website here: http://www.tnmoc.org/

Personally I won't be seeing the BP stuff again, but if you want to see an Enigma or 2 and the Bombe, then they're there, but you don't have to pay their £12 to get into TNMoC (£5)

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by SiriusHardware » Tue Jan 29, 2013 9:26 pm
Thanks both - I'm actually very interested in war history (especially the technological side) and would love to visit Bletchley Park at the same time, as I've never been there either.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by gordon@drogon.net » Tue Jan 29, 2013 10:22 pm
Signs of Life!

Image

So there seems to be some dry joints and possibly a bit (segment) missing from the display too.

So, that makes it worthwhile then :-)

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by SiriusHardware » Tue Jan 29, 2013 10:51 pm
gordon@drogon.net wrote:Signs of Life!

Image

So there seems to be some dry joints and possibly a bit (segment) missing from the display too.

So, that makes it worthwhile then :-)

-Gordon


I'm glad you decided to revive it. It would be pretty tragic if the machine had survived this long in largely intact condition, only to be allowed to die now.

Re: One display Segment? Cell? missing - you'll have a hard time fixing the missing cell as the ninth display cell never did work. No, really, it didn't!

The MK14's hardware design only uses 8 of the 9 display cells. I think there was a 'mod' in a contemporary magazine which showed how to hardware-enable the 9th cell if you really needed it.

(Or maybe I misunderstood - did you mean there's a single bit (the same segment) missing on every display cell?).

As far as the 'Error' message is concerned I'm truly fascinated by that as I have never been unlucky enough to see it - the thing is, to be able to generate that 'Error' display the machine has to be 99 percent working as it would have to be executing prom code successfully and accessing the display hardware correctly in order to be able to display that message, so - if you are really not pulling my leg - then you need to look through the monitor code listing to see under what circumstances it would display that error. I find it hard to believe there was ever enough PROM memory available for any of it to be wasted on the luxurious generation of error messages. ;)
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by gordon@drogon.net » Wed Jan 30, 2013 8:15 am
SiriusHardware wrote:I'm glad you decided to revive it. It would be pretty tragic if the machine had survived this long in largely intact condition, only to be allowed to die now.

Re: One display Segment? Cell? missing - you'll have a hard time fixing the missing cell as the ninth display cell never did work. No, really, it didn't!

The MK14's hardware design only uses 8 of the 9 display cells. I think there was a 'mod' in a contemporary magazine which showed how to hardware-enable the 9th cell if you really needed it.

(Or maybe I misunderstood - did you mean there's a single bit (the same segment) missing on every display cell?).

As far as the 'Error' message is concerned I'm truly fascinated by that as I have never been unlucky enough to see it - the thing is, to be able to generate that 'Error' display the machine has to be 99 percent working as it would have to be executing prom code successfully and accessing the display hardware correctly in order to be able to display that message, so - if you are really not pulling my leg - then you need to look through the monitor code listing to see under what circumstances it would display that error. I find it hard to believe there was ever enough PROM memory available for any of it to be wasted on the luxurious generation of error messages. ;)


Well maybe I said the wrong thing - one segment is stuck on, not off - the middle horizontal bar, and if I flex the board slightly some digits go off. At reset, I get 8 - symbols on the display and not the 4 + 2.

However - yes - the CPU is running otherwise it would not display that message at all!

Press Go twice to get the Error message...

They keyboard - well - that's as good as it ever was ;-) I can type most digits into it. Maybe a strip down and cleanup would be a start... Then get some edge connectors and make a new external keyboard for it ...

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by SiriusHardware » Tue Feb 12, 2013 1:12 am
gordon@drogon.net wrote:
They keyboard - well - that's as good as it ever was ;-) I can type most digits into it. Maybe a strip down and cleanup would be a start... Then get some edge connectors and make a new external keyboard for it ...

-Gordon


Did you make any headway with the minor faults?

I have the circuit for an 'external' keypad showing not only the key matrix rows and columns and the positions (therein) of the 20 switches, but also which fingers on the edge connector each row and column goes to. It's a bit crude - I drew it in Windows Paint - but I'll dig it out if it will save you some time.

RS do (or did, in 2012) sell a couple of single sided edge connectors which are miraculously exactly the right size / number of ways for the keypad connector and top edge connector respectively and that's where I got the (green) ones visible in the clip. However, they were eye-wateringly expensive.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by gordon@drogon.net » Tue Feb 12, 2013 8:31 am
SiriusHardware wrote:
gordon@drogon.net wrote:
They keyboard - well - that's as good as it ever was ;-) I can type most digits into it. Maybe a strip down and cleanup would be a start... Then get some edge connectors and make a new external keyboard for it ...

-Gordon


Did you make any headway with the minor faults?

I have the circuit for an 'external' keypad showing not only the key matrix rows and columns and the positions (therein) of the 20 switches, but also which fingers on the edge connector each row and column goes to. It's a bit crude - I drew it in Windows Paint - but I'll dig it out if it will save you some time.

RS do (or did, in 2012) sell a couple of single sided edge connectors which are miraculously exactly the right size / number of ways for the keypad connector and top edge connector respectively and that's where I got the (green) ones visible in the clip. However, they were eye-wateringly expensive.


I have found some cracks in the PCB tracks, however I have not had time yet to investigate further. What I need to do is essentially strip the board back and re-solder everything. I actually bought this 2nd hand and I don't think the chap I bought it from was the worlds best solderer...

The keypad itself, while usable is very flakey too - so I think cleaning it, then leaving it as it and using an external keypad (or some other computer to drive it!) is the way forward here.

Cheers,

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by scrishton » Tue Feb 12, 2013 2:18 pm
I was given a Mk14 back in the early eighties in payment for repairing a UK101. The Mk14 was also faulty - the crystal wasn't rattling. But as you pointed out, Sir Clive had used the very common - and cheap - colour subcarrier crystal and I had one of those on my shelf, even the right vintage. It's not been powered up for many years, and the voltage regulator seems to have fallen off somewhere along the years, but I will have to try to get it up and running again now.

I also have a UK101 with no CPU which I bought for a fiver at a junk sale, and a Jupiter Ace among others in my collection.

Nostalgia isn't what it used to be...
User avatar
Posts: 46
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
by Ravenous » Tue Feb 12, 2013 5:54 pm
gordon@drogon.net wrote:Maybe I can sell it and treat myself to that Curta calculator I've always wanted...

I've just noticed this. Those contraptions look very interesting!

In this day of 3D printing there must be someone out there who can rip off a plastic copy, obviously not up to the quality of the original but nevertheless...
Posts: 1228
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by gordon@drogon.net » Tue Feb 12, 2013 6:07 pm
Ravenous wrote:
gordon@drogon.net wrote:Maybe I can sell it and treat myself to that Curta calculator I've always wanted...

I've just noticed this. Those contraptions look very interesting!

In this day of 3D printing there must be someone out there who can rip off a plastic copy, obviously not up to the quality of the original but nevertheless...


I very much doubt that even the best 3D printer could print anything with nearly enough accuracy in plastic. Have you had a detailled look inside?

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by scrishton » Tue Feb 12, 2013 6:42 pm
You could 3d print one of these though...
Image
Digi Comp 1, made around late sixties and sold as a plastic kit. Three bit mechanical computer, programmed by adding short plastic straws on the front and back pegs.
User avatar
Posts: 46
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
by SiriusHardware » Tue Feb 12, 2013 7:01 pm
scrishton wrote:I was given a Mk14 back in the early eighties in payment for repairing a UK101. The Mk14 was also faulty - the crystal wasn't rattling. But as you pointed out, Sir Clive had used the very common - and cheap - colour subcarrier crystal and I had one of those on my shelf, even the right vintage. It's not been powered up for many years, and the voltage regulator seems to have fallen off somewhere along the years, but I will have to try to get it up and running again now.

I also have a UK101 with no CPU which I bought for a fiver at a junk sale, and a Jupiter Ace among others in my collection.


I moved the regulator off-board to a decent heatsink on the back of the plywood(!) enclosure that the MK14 has lived in for most of its life - when fully loaded (all options fitted) it made the PCB-mounted regulator run far too hot, even with a modest heatsink.

Do you know what the CPU is that's missing from your UK101? I have a modest collection of 70's/80's microprocessor (and support) ICs.

The Ace is not a bad one to keep hold of - a great deal rarer than the ZX81, which sold in large numbers. Although someone elsewhere on these forums described FORTH as a 'write-only' language...
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by scrishton » Tue Feb 12, 2013 7:20 pm
It's a 6502 in the UK101. I probably have one somewhere in the loft. I suspect the machine has more wrong with it than lack of CPU, but one day when I have spare time again I'll sort it out.

Forth on the Jupiter Ace was a truly elegant language. In my mis-spent youth I spent some time disassembling the ROM. The kernel was very small and clean, and most of the rest was written in Forth itself. I seem to remember helping a colleague build and program a studio countdown clock on an Ace, but I don't think it ever got used. One of my all time favourite computers though.

My first computer was a ZX81, built from a kit because I couldn't afford the ready built version. I wish I'd been able to keep it but I had to sell it to order a Spectrum the following year - so I was stuck without a computer for the "up to 28 days for delivery" months when I really needed it for my OND project. That project got me my first job, and the first step to all the paid work I've ever had, so a good return on the £49.95. Hopefully the RasPi will do the same for the young generation of today - and not just in the "28 days" bit.
User avatar
Posts: 46
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
by SiriusHardware » Tue Feb 12, 2013 7:32 pm
gordon@drogon.net wrote:
I have found some cracks in the PCB tracks, however I have not had time yet to investigate further. What I need to do is essentially strip the board back and re-solder everything. I actually bought this 2nd hand and I don't think the chap I bought it from was the worlds best solderer...

The keypad itself, while usable is very flakey too - so I think cleaning it, then leaving it as it and using an external keypad (or some other computer to drive it!) is the way forward here.

Cheers,

-Gordon


The use of a membrane keypad was an extremely new and innovative cost-saving measure at the time, but they didn't seem to know then (as they do now) that the contact fingers on the PCB needed to be gold-plated to stop them from going dull.

And even if they had, it's doubtful that Clive would have spent the money.

One (stand alone) option would be to use a mid-sized PIC or similar microcontroller to read the keycodes from a standard PS/2 PC keyboard and directly read / manipulate the MK14's keyboard row/column lines to input characters to it that way as your original BBC model B method did, mapping the keyboard's 0-9, A-F and G, M, T (and whatever you choose to use for 'Abort', with 'A' already taken), to the appropriate MK14 keys. That way, you don't even have to build the keyboard (which, believe me, is a chore). The MK14's weird, patchy 4 x 8 matrix makes it more or less impossible to use a ready made 20 key keypad (which would usually have a 4 x 5 matrix) without some serious rewiring.

Or, of course, you could write a program to make a Pi do the same job, assuming twelve GPIO lines could be made available as eight inputs and four outputs - unfortunately level shifting/buffering would be required, with the MK14 being a 5V device. Once you had that basic version working, the next logical step would be to add the ability to read hex files and 'type' them into the MK14 at superhuman speed...

I've found my handy MK14 keypad diagram, but don't know how to embed it into a post - do I have to upload it to an image hosting site somewhere and link to it, or can I incorporate it directly into the body of a post somehow?
Last edited by SiriusHardware on Tue Feb 12, 2013 8:00 pm, edited 1 time in total.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by SiriusHardware » Tue Feb 12, 2013 7:48 pm
scrishton wrote:It's a 6502 in the UK101. I probably have one somewhere in the loft. I suspect the machine has more wrong with it than lack of CPU, but one day when I have spare time again I'll sort it out.


Ok, well, if you find you need anything for it, PM me.

scrishton wrote:My first computer was a ZX81, built from a kit because I couldn't afford the ready built version.


Same here! I've still got mine, in working although in very used condition, with all the red paint on the 'ZX81' rubbed off. The cardboard box, sadly, fell apart years ago. Just recently, I acquired another ZX81 in a near-perfect dKtronics full sized keyboard/case.

scrishton wrote:I wish I'd been able to keep it but I had to sell it to order a Spectrum the following year - so I was stuck without a computer for the "up to 28 days for delivery" months when I really needed it for my OND project. That project got me my first job, and the first step to all the paid work I've ever had, so a good return on the £49.95. Hopefully the RasPi will do the same for the young generation of today - and not just in the "28 days" bit.


As you weren't the original purchaser of your MK14, you had a narrow escape. Three times (MK14, ZX81, Spectrum) I had to endure that nonsense from Sinclair, advertising and taking payment for goods half a year before they actually arrived. It's amazing that I was so loyal for so long. But by the time the QL started to be advertised, I had defected to Atari and the ST. I have to admit I found myself not knowing whether to laugh or cry when I found myself in a similar long-wait situation for a Raspberry Pi (I was one of the unfortunates who originally ordered from RS).
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by scrishton » Tue Feb 12, 2013 10:23 pm
As you weren't the original purchaser of your MK14, you had a narrow escape. Three times (MK14, ZX81, Spectrum) I had to endure that nonsense from Sinclair, advertising and taking payment for goods half a year before they actually arrived. It's amazing that I was so loyal for so long. But by the time the QL started to be advertised, I had defected to Atari and the ST. I have to admit I found myself not knowing whether to laugh or cry when I found myself in a similar long-wait situation for a Raspberry Pi (I was one of the unfortunates who originally ordered from RS).


Ah yes, but I made up for that with the flat screen TV - the one with the CRT that fired electrons from the side. The QL was actually quite good, but the most interesting features weren't documented. There were some odd multithreading commands such as WHEN / ENDWHEN. I had an Atari ST, but never really did much with it apart from playing games. Never actually wrote any program's on it.

The RasPi is turning out to be the best computer for many things. It has achieved what it was designed for - it has been educational. Often far too educational. And I have successfully used mine as a controller for video recorders, at one time controlling £280000 worth of video recorders with a £28 computer.
User avatar
Posts: 46
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
by SiriusHardware » Tue Feb 12, 2013 10:43 pm
scrishton wrote:Ah yes, but I made up for that with the flat screen TV - the one with the CRT that fired electrons from the side.


Those sideways CRT screens are still in use today, in door-entry phones with video screens (so you can see who's at the door).

scrishton wrote:The QL was actually quite good, but the most interesting features weren't documented. There were some odd multithreading commands such as WHEN / ENDWHEN.


I think the thing which really scared me off them was their determination to re-use the Microdrive. I had already suffered from years of their being decidedly unreliable on the Spectrum.

scrishton wrote:I had an Atari ST, but never really did much with it apart from playing games. Never actually wrote any program's on it.


They were basically just a grown-up Spectrum, in the sense that they had better graphics and usable sound in the form of the AY chip (which the Spectrum 128 admittedly had first) - but apart from that, nearly everything had to be done in software just like on the Spectrum, there were no hardware sprites (there was hardware scrolling of a sort). You could take total control of it from within assembly language, so it was a very nice programmer's machine.

scrishton wrote: I have successfully used mine as a controller for video recorders, at one time controlling £280000 worth of video recorders with a £28 computer.


I had to re-read the number of zeros. Twice. Sounds like a good subject for the front page blog?
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by SiriusHardware » Wed Sep 25, 2013 11:11 pm
Just a little follow up on this - if you've looked through the thread above you'll have seen that I used a relatively complicated homemade interface between the Pi and the MK14 as a means of transferring the code from the Pi to the MK14 - following some discussions on the Arduino forums, a couple of the users there - 'Paul__B' and 'Caltao' - came up with a suggestion:

Make a keypad matrix interface using a couple of 4051 1-to-8 channel logic ICs wired back to back with the keypad row lines (up to eight) connected to the 0-7 terminals of one IC and the keypad column lines (again up to eight of them) connected to the 0-7 terminal pins of the other IC, and the two 'common' terminals of the ICs connected together.

With 6 I/O pins of an Arduino or Pi connected to the two sets of three ABC channel select pins and a seventh pin connected to the _INH/_EN pins on both chips, pressing any key on the target system is a matter of sending the row number to ABC on the row select chip, the column number to ABC on the column select chip, and then momentarily taking the _INH/_EN pins low to generate a keypress.

This not only represents a simpler way to do it than the way I did it, but would also be applicable to any application where you want to be able to carry out automated programming of any system which can normally only be programmed slowly and laboriously via the keypad. Although the Pi is a 3V device, the fact that this method only requires inputs from the Pi to the 4051s should mean it can be done with the 4051s running on 5V - the 3V levels from the Pi should be high enough to be interpreted as logic ones.

Specifically for programming an old style microprocessor system like the MK14 or perhaps the EMMA 2 or a Microprofessor, you could write something in Python which will read in an Intel Hex code file and work through it, generating the actual keypresses needed to type the code into the system. For more general kinds of keypad programmable systems a text file containing a simple list of keypresses could be read in and relayed straight out to the 4051 interface. You'd need to be able to specify a minimum inter character delay (the keypad debounce on the target system limits the absolute maximum speed that characters can be typed into it) and also to be able to specify longer delays after certain actions / inputs / commands which you know will invoke a significant delay before the system is ready to receive more keypresses.
Posts: 439
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK