Page 7 of 15
Posted: Fri Apr 15, 2011 9:41 pm
by micro_brain
Well, there's nothing wrong with the frequency counter, it measures 3.5 Khz on the Spectrum's ULA output (marked PhiCPU on your diagram). Driving the UK101 odd the Speccy's power supply and clock signal is a possibility but will require some thought as I don't want to solder wires direct to the edge connector.
In the meantime I read up on crystals. Yes, they're fragile, if you drop one it has a 50% chance of being broken. I ordered some more form an eBay seller as my local Maplin doesn't have any stock
So I think I'm at a dead halt for the time being, until I can get a working crystal.
Posted: Sat Apr 16, 2011 6:12 am
by Karatorian
Driving the UK101 odd the Speccy's power supply and clock signal is a possibility but will require some thought as I don't want to solder wires direct to the edge connector.
Well, this suggestion is definitely a hack and wouldn't be recommended for long term use, but do you have any clothespins? You might be able to pin a wire to the edge connector with one. Just an idea.
Posted: Sat Apr 16, 2011 7:25 am
by micro_brain
Driving the UK101 odd the Speccy's power supply and clock signal is a possibility but will require some thought as I don't want to solder wires direct to the edge connector.
Well, this suggestion is definitely a hack and wouldn't be recommended for long term use, but do you have any clothespins? You might be able to pin a wire to the edge connector with one. Just an idea.
Now that's a real hack!

Posted: Sat Apr 16, 2011 8:39 am
by BigEd
Rather than using the Speccy's power supply, what you'd "normally" do is connect the grounds of the two systems and then take across the signals you need - in your case, one signal. (You would not connect the two power supplies!) You would of course aim for short wires, and hope for the best. You would not do this for avionics or life support... but we know this... it's just an experiment.
As you say, making a connection is maybe a problem. If you open up the speccy, according the circuit diagram there's a LINK1 which has the true and inverse clock on either side, so perhaps you can solder a wire to one side or the other. Or perhaps that's too invasive for your taste.
You can get
mini-probes with a sort of retractable hook which can hook onto the leg of an IC - in this case perhaps the leg of the Z80. We
used one to get an 8MHz clock from the Beeb to our 65816 board (see picture at bottom of page)
Cheers
Ed
Posted: Mon Apr 18, 2011 11:33 am
by micro_brain
Really do not understand what is going on here at all. I have replaced the crystal, checked the circuit several times and it still does not work. There's no clock pulse coming out of it at all. Could the 74LS04 be broken? Surely this is unlikely - they're supposed to be pretty robust, aren't they?
How can I test it?
Posted: Mon Apr 18, 2011 11:52 am
by BigEd
Here's the circuit (copyright, fair use, etc)
in case anyone can help. The 6502 clock input is top left, the '93 is used as a divide by 8.
Just a thought: if you remove the '93 do you get a 8MHz oscillation?
Posted: Mon Apr 18, 2011 12:20 pm
by micro_brain
Hi Ed
I put the LS04 in a test circuit to check it is working correctly.
When the inverter input is pulled low (GND), the output goes high, and vice-versa. With nothing connected (ie, floating) to the input, the output is low. When it is pulled high (+5v) the output is low.
So I think that IC is working OK.
Incidentally, my capacitor is marked "27J" and it's a ceramic one. Resistors are Yellow-Violet-Brown (470 ohms). I've used the multimeter to measure the resistors and they are correct. Cannot measure the capacitor as the meter doesn't go that low (I think its minimum range is 40nF). The other connections are fine - the circuit is correctly assembled, or at least, it matches the schematic.
I cannot believe I have another faulty crystal - can I test it independently in some way?
Posted: Mon Apr 18, 2011 1:06 pm
by BigEd
I notice there's an unused inverter - the input should be tied off. Also, there's no decoupling anywhere, whereas I'm used to seeing decoupling near some or all ICs. So, just possibly, you'll have noisy power/ground lines and just possibly that would cause the oscillator not to work. But it's not very convincing.
It's not impossible that both crystals come from a bad batch. I have no idea how you'd check, because this is outside my area.
No luck extracting a clock from the speccy?
Posted: Mon Apr 18, 2011 1:33 pm
by micro_brain
Well, there is a fairly simple test circuit out there to test a crystal is working. But I don't have the parts yet.
The second crystal came from a different supplier than the first, so I would say they are not likely to have been part of the same batch.
I have not tried the circuit with the Speccy clock. The reason for this is that, ultimately, I need to get the onboard clock working. However, the Speccy clock has proved that my multimeter is frequency counting correctly, which means I can trust it when it says there is nothing coming out of the clock.
Your point about noise is a good one. When I connect the meter to the -ve power line, I get 50hz on the frequency counter (with +ve unconnected). If I then connect up the +ve side, it drops to zero. What if I string a small capacitor (say 1uF) across the 74LS04's power lines? Would that do it?
[Edit : Nope, the small decoupling capacitor makes zero difference - it's electrolytic - and tying the spare invertor's input down doesn't fix it either.]
Posted: Mon Apr 18, 2011 1:44 pm
by micro_brain
In order to preclude the power supply, I could wire it up to some batteries. This would give 4.5v, would this be enough to get it going?
[Edit : Anyway, it isn't working with batteries either, although I am getting good logic high / low from the NOP generator board, so the voltage is good..]
Posted: Mon Apr 18, 2011 2:04 pm
by BigEd
I would say that any and all capacitance is good! Garth and BDD would have a more nuanced view as to which capacitors are appropriate for which purposes.
Our 816 board (816+RAM+CPLD) has a single 22uF near the power supply connection, plus a handful of 0.1 uF ceramics, one near each chip power pin.
I have an Acorn Electron board here which has ceramic disc capacitors next to each chip, marked 333 - appears to mean 33nF, perhaps that's plausible.
Another board made by my collaborator uses tantalum bead caps for decoupling but I don't know the value.
If the batteries are on the low side it won't do any harm, but a negative result won't prove anything either.
I suppose we know the circuit isn't wrong, so it's either the components or your board (which is to say, your execution of the circuit.) Although the circuit could be marginal in some way, such that you are unlucky.
So, removing the divider, you have only the hex-inverter, a few discretes and the crystal. You can check that everything is connected to what it should be, and can also check that everything is only connected to what it should be - which is a lot more checks! This is where it helps to have a multimeter with an audible signal.
Posted: Mon Apr 18, 2011 2:27 pm
by micro_brain
I've checked the clock circuit with the multimeter's beeping continuity tester several times and I cannot find any error with my execution of the it. At the moment all other components are off the board so there should be no interference coming from anywhere else. I'm looking for 8Mhz on pin 4 of the 74LS04, right? Or any frequency on any part of the circuit...
I suppose I could redo the clock on a separate board. Applying voltage to a separate circuit would allow me to check that the circuit actually works. But it is a pain, though. I do not know how long I have spent on this project, but it is beginning to feel like too long. Costs are beginning to add up too...

Posted: Mon Apr 18, 2011 2:32 pm
by BigEd
It's certainly a shame that it didn't just spring into life. Building just the clock elsewhere - on a breadboard perhaps - might be a good plan.
My collaborator tends to design with the 4-pin clock cans- perhaps that's experience. Or perhaps it's because he's got a collection of different speeds. It's an easy substitution. I don't know if you'd feel that it invalidates the uk101-ness of the design.
Posted: Mon Apr 18, 2011 3:00 pm
by micro_brain
No, I'll do anything to get it working!
I have redone the clock circuit on a separate piece of veroboard using another crystal, resistor pair and capacitor. It doesn't oscillate, according to my multimeter's freq counter. I can't see what is wrong. Must be the IC. that is the only common denominator.
How would I use one of these 4 legged cans then? Is it just a matter of +5v, -5V and clock out? What do you do with pin 4?
Posted: Mon Apr 18, 2011 3:12 pm
by BigEd
Well, first off they number the pins as if it sits in an 8-pin socket. Second, that's 0v and 5v for the supplies, of course - no negative supply. Then, it seems that the unnecessary fourth pin can be left unconnected or can be used as a disable input.
As ever, check the datasheet!