• Please review our updated Terms and Rules here

Sinclair MK14 starting up okay but not accepting keypresses

falter

Veteran Member
Joined
Jan 22, 2011
Messages
6,556
Location
Vancouver, BC
I dusted off my Sinclair MK14 to check on and overall it seems ok except it cannot for some reason accept any keypresses. It has the newer monitor, so when you power up it shows 0000 00. If I press keys, nothing happens, except on a couple of keys like the 3 key, it will flash a zero very faintly in the space between the first and second set of 0s. But there doesn't seem to be any actual response from the monitor, no change in display as keys are pressed.

I'm concerned I may have damaged it.. when I connected it to a +9V power source (which goes to a 7805 regulator of course), I had miscalculated the required amperage. The required amperage is 400ma, but the adapter was only kicking out 300ma, so the machine was very erratic with the display going haywire. After that, with an appropriate PSU, the display was solid but it was producing junk, like random stuff - 02AF C9 as an example.. and you'd have to hit reset a bunch of times to get to the 0000s. Now after reseating things it seems to get there reliably, but zero input accepted.
 
I don't believe you should have done any damage by using a lower current power supply. You may have killed the power supply...

If the 7-segment display is working correctly, then the 7445 BCD decoder (IC13) should be OK. This is used to select each digit of the displays and also for scanning the keyboard.

Resistors R7-R10 operate as pull-up resistors for the keyboard. The four 'input' pins of IC11 (pins 6, 10, 12 and 14) should all be HIGH with no keys pressed.

When you press keys, you should observe pulses on the four inputs (pins 6, 10, 12 and 14) of IC11 (one key press should cause pulses on one of the four input lines).

You should also observe pulses on the IC11 enable lines (pins 1 and 15).

IC11 acts as a buffer for the keyboard data - so could be faulty (80L95).

Dave
 
Aha! Thanks Dave! I probed around and eventually realized that the issue was the add on keyboard the owner installed - I think somewhere a wire had gotten pinched or something crossed. When I removed the second keypad entirely and pressed on one of the original keypad keys hard enough, I got characters.. but never anything when it was attached. I straightened out wires and separated anything that looked iffy, and now it seems to be happyish again.

I'm still trying to figure out the purpose of this little switch thing on the bottom right. I thought maybe it was introducing some issues but it seems not. I'm not sure if it's related to the tape interface board above the secondary keypad or not.

https://drive.google.com/open?id=1o...3&authuser=bradhodge75@gmail.com&usp=drive_fs
https://drive.google.com/open?id=18...M&authuser=bradhodge75@gmail.com&usp=drive_fs
 
>>> Aha! Thanks Dave.

You're welcome.

I'll have a look at your switch when I am not on my works computer. File sharing sites banned!

Dave
 
The 7493 and 7400 give it away...

This is the hardware single step logic (identified in Figure 5.1 of the later Sinclair MK14 manual).

I see some of the pins on the extension keyboard connector are a bit bent and could, therefore, short out. I assume you have straightened these out now?

Dave
 
Yes I straightened a bunch out. He had the main MK14 covered by a plexiglass shield but the secondary keyboard was not, and I think maybe something got placed on top of it and bent the pins slightly.

I am now looking into hooking the tape interface back up so I can actually do some longer programming. Did you have any experience with that? I'm wondering how reliable it was/tricky to get dialed in.
 
I own an original and a Replica MK14 and an original cassette interface PCB and like most such items it's just a question of finding the right playback level. You can use a PC, with an audio recorder / player program like Windows 'Sound Recorder' or 'Audacity' to substitute for the tape recorder. The main drawback with the cassette interface is that the supporting routines in the 'new' monitor only allow for the loading of up to 256 bytes at a time so if you want to write and save something which uses the 'extra' memory at 0B00-0BFF or the 128 bytes in the 8154 RAM / I/O you can end up having to save the code as three separate blocks which you then have to load back in in three steps later.

Now that we have such things as second machines (ie, PCs, Raspberry Pis) which we can use to write and assemble the code on, it's a lot easier to use something like this which will take the hex code and type it in for you through the keypad edge connector at very high speed.

Using a Raspberry Pi:

MK14 programming interface - MK2 - UK Vintage Radio Repair and Restoration Discussion Forum (vintage-radio.net)

Using an Arduino:

Yet another (Arduino) MK14 uploader - UK Vintage Radio Repair and Restoration Discussion Forum (vintage-radio.net)

Someone I know is currently using a similar hardware interface but a different microcontroller PCB to make a version of the above systems which presents a web-page type interface to the host rather than the terminal / command line approach used by the above projects - it's a work in progress at the moment but the progress so far can be seen near the end of this current thread:

MK14 Programming Interface - UK Vintage Radio Repair and Restoration Discussion Forum (vintage-radio.net)
 
Yes audio levels seem to always be a challenge. I've led myself down some rabbit holes thinking I had a circuit problem when all it was was either the wrong equipment being used or insufficient/too much volume.

As far as typing things in for me though, I feel like you're not getting the legit MK14 experience if you're not cursing away punching stuff in byte by byte on a keypad. :)
 
Ok new moronic question..

I am trying out some programs on this beast but the manual... well.. I feel like it was kinda written for smarter people. This is the Microcomputer Training Manual they sent along with it.

I got some of the games like Duck Shoot working.. but it's the math ones that throw me. I'm not sure I'm understanding say, how the Multiply program works. I entered it.. but I'm not sure how you give it values to multiply? Or if you're supposed to?
 
The mathematical routines are SUBROUTINES, so not directly executable.

You need to write your own main routine.

Set pointer P2 up to point to a piece of memory somewhere. P2(-1) is used as temporary storage, so needs to exist - but you don’t need to give it a value.

You pass the two values to multiply together in P2(0) ‘A’ and P2(1) ‘B’. These are bytes.

Use P3 as the ‘link’ register to call the subroutine.

The 16-bit (2 byte) result is passed back from the subroutine in P2(2) ‘high byte’ and P2(3) ‘low byte’.

The other routines are similar, but look at the P2 pointer for a description of the parameters and return values.

You MAY be able to do all this magic with the SCIOS monitor though. You can configure the value to be loaded into pointer register P2 when executing a program by presetting memory locations 0FFB and 0FFC with the pointer value.

Preload the A and B values into the memory pointed to by P2 (in the correct format).

Then, tell the program to GO at address 0F50 (the start of Mult). In this case (when Mult completes) it will return back to the monitor and you can examine the result in the memory locations pointed to by P2 (as you set it up).

All of the mathematical routines are relocatable, so you should be able to put them all in memory (RAM permitting) and write a small ‘main’ program to ‘chain’ them together to give you a complex (integer only) expression analyser. Well, complex for a Sinclair MK14 at least!

If this is all as clear as mud (!) I should be able to give you a worked example!!!

Dave
 
Last edited:
I feel like you're not getting the legit MK14 experience if you're not cursing away punching stuff in byte by byte on a keypad.

Having lived through that time when the MK14 was my only 'computer' and that was the only way to get code into it, I feel I have suffered enough to last one lifetime. I've always kept the original machine in working order but that 'grind' aspect of it positively discouraged me from getting out out of storage and playing with it. That's why I (eventually) made the first of the keypad-injection uploaders, from which there have been several spin-offs since.

Anyway, I'm glad to see you are trying to use that machine and not just looking at it on a shelf.

As far as writing code is concerned possibly one of the most hostile things about the SC/MP is the way it handles (or rather doesn't handle) subroutines, in so far as it does not have the usual CALL / RET mechanism + stack, so calling a subroutine involves loading the subroutine start address into a pointer and then doing XPPC pointer. At the end of the subroutine you do another XPPC pointer to return to where the subroutine was called from. By convention, Pointer 3 is most commonly used for this operation.
 
I found the MK14 better than (for example) the ZX80 (once the keyboard on the MK14 was replaced with British Telecom micro switches at any rate). Remember the 'RAMPACK wobble' that would obliterate your program in the blink of an eye?

Rather bizarrely, some of the computer systems we use at work do not have a stack etc. and have a similar 'pointer structure' to the SC/MP (although a much more capable instruction set and a 24-bit instruction word). So I was at home with the SC/MP architecture...

If I also remember correctly, the CRAY-1 didn't have a 'stack' - but any of the general purpose address registers could be used as a stack, or the user could have multiple stacks by using multiple address registers for such purposes.

The SC/MP was the little 8-bit baby...

Dave
 
Thanks Dave. I am not good with programming at all - I am trying to learn a bit since machines like this demand it. I kind of mistook the manual for being aimed at first time computer owners who would have no idea about any of this stuff and assumed the multiply program was a standalone program to demonstrate what it could do.

I was trying to read and understand where the values went - the business at the beginning of the program with what looked like memory address 0000 through 0002 I think it was.. I couldn't understand what they were doing there since you can't write to those locations. Or at least, mine can't.
 
Memory at 0 is the SCIOS ROM (not RAM), so you are correct in that you can’t write to these memory locations.

However, these are symbolic names for byte offsets relative to a pointer (in this case P2).

So you could do (for example - using a form of English rather than the exact instruction):

LDA ADD1(P2)

This would load the accumulator from the byte located at symbolic offset ADD1 relative to the current value if pointer P2. You have similar addressing modes in other microprocessors. The beauty of ‘based’ addressing modes is that you can write relocatable code and it doesn't depend on ‘fixed’ memory locations. By modifying pointer P2, the subroutine can use any memory within the machine, and this can change from subroutine call to subroutine call.

Dave
 
I kind of mistook the manual for being aimed at first time computer owners who would have no idea about any of this stuff and assumed the multiply program was a standalone program to demonstrate what it could do.

The MK14 manual actually WAS intended to be for people with no previous microprocessor experience - look on the cover, it actually says 'Training Manual' but most people seem to take the view that it was not really very good for that purpose. I only managed to get on with it because, during the agonisingly long delay between ordering my MK14 and actually receiving it I had access to an even more primitive SC/MP system - binary output and input via individual LEDs and switches - so by the time the MK14 did arrive I had some understanding of what was going on and the MK14 felt like a major leap forward with its hex display and keypad.

I never had a ZX80 so I can't comment on the manual for that but the manuals for the ZX81 and Spectrum were orders of magnitude better, they were actually a joy to read and work through. Of course it helped that by then, they were teaching the reader BASIC rather than machine language.

With the new rise in popularity of the MK14 due to the availability of replicas, emulators and the occasional lucky find like yours, there could be a case for a group of MK14 veterans to get together and compile / edit the manual which the MK14 should have had. It wouldn't make any money, so it would probably have to be a labour of love.

There are a limited number of writable addresses on the MK14, the standard memory lies between 0F00 and 0FFF, however 0F00 to 0F11 are used by the monitor for its 'system variables' so the first guaranteed user usable address in standard memory is 0F12, which is why so many programs start at that address,

If you have the 'optional RAM' (two more 2111s) fitted, you also have RAM at 0B00-0BFF and all 256 bytes of that RAM are available for user use.

If you have the 8154 I/O RAM chip fitted, you have 128 bytes of RAM at 0880 to 08FF as well.

Attempting to write to any other address outside these limited ranges will usually give unexpected results.
 
Yeah I'm finding the manual to be a bit of a struggle. It's not the worst I've read, but not the best either. Like for example, I went looking for an explanation of what each function key did - but there isn't one. They sort of explain the function on the fly as they plunge you into your first program.

It's hard to explain but if you read and compare the OSI 300 training manual compared to this one, it's very obvious one was written with the newbie in mind while the other sort of missed the mark.
 
To compound matters, the exact way the 'command' keys are used depends on whether you have the original version of the OS (with the ---- -- startup prompt) or the 'new' version of the OS with the '0000 00' prompt. To be honest, I wouldn't waste any time trying to use the original / old OS - I did some testing of the uploaders recently and as part of that process I checked that they worked with an MK14 fitted with the 'old' OS. My own MK14 hasn't had that version fitted since about 1979 and I couldn't believe how slow and clunky it was - for example, the 'new' OS requires three keypresses (data high nibble, data low nibble, MEM) to enter each data byte. The old OS requires five keypresses per data byte entry.

Broadly, In the 'new' OS, 'Term' changes from address entry mode to data entry mode and 'Abort' changes from data entry mode to address entry mode. Pressing 'Go' will run from the currently displayed address. 'Mem' advances one step through the memory, If you press 'MEM' while in data entry mode, it writes whatever is in the data field to the current memory location, then advances to the next address.

The actual names / legends on the command key are a spillover from where the 'old' version of the 'SCMPKB' OS was first used, on the American 'National Introkit' (with keypad and display added), so we may never know exactly how and why the command key names were chosen.
 
As far as writing code is concerned possibly one of the most hostile things about the SC/MP is the way it handles (or rather doesn't handle) subroutines, in so far as it does not have the usual CALL / RET mechanism + stack, so calling a subroutine involves loading the subroutine start address into a pointer and then doing XPPC pointer. At the end of the subroutine you do another XPPC pointer to return to where the subroutine was called from. By convention, Pointer 3 is most commonly used for this operation.
Has anyone established a sensible convention for a calling standard with a stack? Or does everyone just roll their own?
 
Hi Brian, do you mean specifically for the SC/MP (INS8060) or just generally?

On SC/MP based micro trainer systems were usually so critically short of memory - often not much more than 256 or 512 bytes - that any code tended just to be written however it would fit.

I've seen, somewhere, a set of routines which allowed subroutine handling in a CALL and RET kind of way but, unhelpfully, I can not remember where that was just now. Let me ruminate on that for a couple of days.

If you are interested in the MK14 or just the SC/MP there is a small group of SC/MP enthusiasts in the 'vintage computers' subsection of the uk vintage wireless forums here:-


A search on 'MK14' in that forum subsection will find you more SC/MP related discussions than you can probably read in your lifetime.
 
Back
Top