Page 2 of 3

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 10:40 am
by DutchAcorn
Could it be that the system VIA does not get reset on power-on so that some of the configuration is messed up?

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:08 am
by adrm
DutchAcorn wrote:Could it be that the system VIA does not get reset on power-on so that some of the configuration is messed up?
I'm trying to located an explanation as to the all exact differences between hard and soft reset. There's got to be a clue there.

Some differences have been explained earlier in this thread, but there must be more.

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:22 am
by dominicbeesley
How many channels does your Analyser have, if its >=24 worth hooking up to the data and address lines and trying to suss out where it gets to in the reset?

If not, the main difference is that the whole of RAM is cleared if it's a hard reset. So the machine may be hanging if the system VIA is NOT reset on a cold reset as it should, the MOS then thinks its a warm start, doesn't clear memory and does something stupid because there is something in memory that it doesn't like!

I'd get the NMI thing sorted first...

D

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:27 am
by adrm
dominicbeesley wrote:How many channels does your Analyser have, if its >=24 worth hooking up to the data and address lines and trying to suss out where it gets to in the reset?

D
Unfortunately it's just a cheap Chinese knockoff of a Saelae unit with 16 channels. It works great, but they saved a few cents by only including 6 "hooks" with the unit :lol:

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:29 am
by 1024MAK
adrm wrote:
1024MAK wrote:Check IC27 inputs and outputs, as shown in the following schematic diagram extracts:-

Of course, the add in board may alter things a bit...

Mark
Pin 10 = permanently HIGH (As it should be?)
PIN 9 = permanently LOW
resulting in:
PIN 8 = permanently HIGH
But earlier you said
adrm wrote:
1024MAK wrote:One other thing, check what the level is on the /NMI line (pin 6 on the CPU).

Mark
NMI seems stuck low, no matter what. It fluctuates between -110mV and +380mV.
(Not sure if that +380mV peak I see constitutes a HIGH?)

Additional info
I attached a "Logic Analyzer" to pin 6.
About 1ms after power on there are 10-25 HIGH pulses registered, and after that nothing, i.e. constant low
I'm guessing those pulses may be some kind of power ripples ...
This does not make sense.

IC27 pin 8 (the output) connects to IC27 pin 3, which then connects to IC1 (CPU) pin 6. IC27 (7438) outputs can only pull the /NMI line low. If nothing is pulling it low, resistor R81 (3.3k) will pull the line high.

Can you please test again.

Mark

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:31 am
by 1024MAK
adrm wrote:Not sure if it's a relevant clue or not, but I just scoped the positive speaker pin on the MB to get a look at the wave generating the buzzing sound.

According to my scope there's a 85 (-ish) KHz fluctuating signal coming from that pin.
The audio circuits pick up all kinds of interference and noise, hence the "buzz" from a speaker in a normal working Beeb that changes note depending on what the computer is doing...

Mark

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:47 am
by 1024MAK
Early on in the start up code, a check is done to see if an external device wants to take control. It does this via the /IRQ line.
At any time, a /NMI will cause a jump to the /NMI routine. /IRQ is level sensitive while /NMI is edge sensitive (triggers with a high to low pulse edge).
/IRQ is on CPU pin 4. /NMI is on pin 6. In a correctly functioning Beeb, both should be normally high.

Mark

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:59 am
by adrm
1024MAK wrote:
adrm wrote:
According to my scope there's a 85 (-ish) KHz fluctuating signal coming from that pin.
The audio circuits pick up all kinds of interference and noise, hence the "buzz" from a speaker in a normal working Beeb that changes note depending on what the computer is doing...

Mark
Yes, but this is quite a bit louder than the normal Beeb buzzing. And in the beginning it was more like a "shriek"
(Not sure why it changed at some point)

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 11:59 am
by adrm
1024MAK wrote:
adrm wrote:
1024MAK wrote:Check IC27 inputs and outputs, as shown in the following schematic diagram extracts:-

This does not make sense.

IC27 pin 8 (the output) connects to IC27 pin 3, which then connects to IC1 (CPU) pin 6. IC27 (7438) outputs can only pull the /NMI line low. If nothing is pulling it low, resistor R81 (3.3k) will pull the line high.

Can you please test again.

Mark
I'll re-test and report back

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 12:13 pm
by adrm
1024MAK wrote:Early on in the start up code, a check is done to see if an external device wants to take control. It does this via the /IRQ line.
At any time, a /NMI will cause a jump to the /NMI routine. /IRQ is level sensitive while /NMI is edge sensitive (triggers with a high to low pulse edge).
/IRQ is on CPU pin 4. /NMI is on pin 6. In a correctly functioning Beeb, both should be normally high.

Mark
/NMI is constantly HIGH. (Not sure why I read it as low earlier.) :oops:

/IRQ is showing a regular series of LOW pulses of duration 62µs. They appear at no less than 5ms intervals, but not 100%regularly, i.e sometimes with a 10ms interval.

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 2:20 pm
by 1024MAK
That's not looking like the problem then.

Mark

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 2:27 pm
by dominicbeesley
If your logic analyser has 16 channels then could you hook it up to the address lines and see if it hits the clear routine at D9E7-DA00 on cold reset and skips it on warm? Then we can stop worrying about system via/RSTA.

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 2:59 pm
by adrm
dominicbeesley wrote:If your logic analyser has 16 channels then could you hook it up to the address lines and see if it hits the clear routine at D9E7-DA00 on cold reset and skips it on warm? Then we can stop worrying about system via/RSTA.
Two problems with that:
  • 1 - I only have a total of 8 probes/hooks. I received another 2 in the mail today, but I need to order another 12 off eBay
    2 - I don't know how to do what you suggest, I'm afraid. This is a cheapo unit and an inexperienced user

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 3:11 pm
by 1024MAK
What was suggested was for the CPU address lines A0 to A15 to be connected to the logic analyser input channels 1 to 16. Then in the logic analyser software, set it to decode this as a hexadecimal number, then stop when it sees the selected address value.

However, you would also need the phase 2 clock. So even if you have 16 probe clips, you would have to ignore the lowest address line (A0).

Now, if you had 9 probe clips, you could connect to the phase 2 clock and the top half of the address bus (A8 to A15). That would at least show which area of the ROM it was getting to when it "cold boots".

Mark

Re: Troubleshooting my latest BBC B

Posted: Tue Sep 12, 2017 6:57 pm
by adrm
1024MAK wrote:What was suggested was for the CPU address lines A0 to A15 to be connected to the logic analyser input channels 1 to 16. Then in the logic analyser software, set it to decode this as a hexadecimal number, then stop when it sees the selected address value.

However, you would also need the phase 2 clock. So even if you have 16 probe clips, you would have to ignore the lowest address line (A0).

Now, if you had 9 probe clips, you could connect to the phase 2 clock and the top half of the address bus (A8 to A15). That would at least show which area of the ROM it was getting to when it "cold boots".

Mark
At the moment I have only 7 + 1 ground. I'll order more clips to get a full complement (+ a few spares).

Re: Troubleshooting my latest BBC B

Posted: Fri Sep 15, 2017 2:42 pm
by adrm
I now have the house to myself, and I have set up the RetroClinic BBC and the faulty Beeb side by side.

I have squinted at the circuit diagram and done some comparisons (e.g. non-bus pins of IC3), the 555, etc, without spotting any oddities.

If anyone has suggestions as to what I should compare, I'd be grateful.

In the mean time, I'll continue on my own. To a point, this is proving to be quite educational, but base knowledge is insufficient to get the full picture, I'm afraid.

Edit:
I have now tried swapping some of the socketed ICs: 14, 79, 80 + System ROM -> No change
(The only IC socketed on both MB I haven't swapped now, is the 6502)

Edit2:
Swapped keyboards -> No change

Re: Troubleshooting my latest BBC B - Significant?

Posted: Sat Sep 16, 2017 10:02 am
by adrm
Keeping in mind that there are 2 issues (constant speaker sound and reset problems), which may or may not be related, I have continued to look at the circuit diagram and done comparisons.

On thing that stuck out, was the behaviour of pin 7 on IC32.

As far as I can see this is connected directly to pin 4 on the keyboard connector.
The next 7 pins (to the right) in the (kbd) connector are connected to the data lines that go between the system 6522 (IC3) and sound generator (IC18). [The reason I ended up here is that I was trying to find the source of the constant speaker beep.

Anyway, back to pin 7 of IC32:

On the RetroClinic Beeb this is permanently HIGH after power on and is not affected by soft or hard break.

On the faulty Beeb, the state of this pin is very much affected by soft and hard break:

On POWER ON:
Goes HIGH, then pulses LOW/HIGH a few times, then settles permanently LOW after 230µS

On (soft) Break:
Goes HIGH permanently

On (hard) Ctrl-Break:
Goes LOW permanently

Not sure if this is at all related to John's clarification about reset states earlier in the thread, but it IS related to the keyboard.
  • So my question is, will pin 4 being in a LOW state cause the keyboard to be unresponsive?
  • If yes, any suggestions about determining why IC32 behaves like this?


Disclaimer: I have no clue if any of the extra circuitry in the RetroClinic unit affects any of this.

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 10:30 am
by 1024MAK
I'm not at home, so can't check on my Beeb. However here are some details that may help.

IC32 is a 74LS259 "high-speed" 8-Bit addressable latch used as a "port expander" to get more input/output pins.

The schematic of the keyboard is here:
Image
As always, thanks to JGH for the schematics :D

The logic on the keyboard can either automatically scan it looking for a pressed key, or the OS can look for a pressed key by telling it to look at each column one at a time.

Pin 7 of IC32 is the keyboard enable (output from IC32, to the enable pins on the chips keyboard PCB.

If you are getting strange things on IC32 pin 7, it may be worthwhile replacing it. But it may also be due to IC32 receiving faulty data on it's inputs. It's inputs are pins 1, 2, 3 and 13. It's also worthwhile checking that there are no dry joints in this area of the board.

74LS259 data sheet (PDF) here

The RetroClinic modifications don't normally affect this part of the Beeb.

More on how the keyboard works here.

Mark

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 1:26 pm
by adrm
Thanks Mark.
I'll read up on this information this weekend.

In the mean time, I checked the status of pins 1, 2, 3 and 13 when powering on.
The faulty unit has the exact same pulses/status changes and timings as the RetroClinic one.
Since the inputs are the same, but pin 7 outputs are different, I feel the culprit might be here, indeed.

(I touched up the soldering on this IC + a few nearby joint that looked vaguely suspicious to the naked eye. USB microscope is still in the mail)
No difference.

Some years back, finding a local supplier that could sell me a 74LS259 + a socket would not have been a problem. These days I have to order off eBay and wait 1+ weeks, or use a commercial supplier who charges an arm and a leg in shipping and handling :roll:

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 2:14 pm
by danielj
RS components don't have a minimum order size for free shipping, and CPC is only a fiver iirc?

d.

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 2:18 pm
by 1024MAK
RS also have trade counters, which come in very handy if you have one in your area.
Some other suppliers also have trade counters, but only a small number.

Mark

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 2:34 pm
by adrm
I'm located in Norway, so trade counters are hard to come by.

RS has a Norwegian site that I'll check out (I recently registered), but I suspect they don't give free shipping to here.

No matter what, I'll order a few spares this weekend :D

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 4:09 pm
by paulb
adrm wrote:I'm located in Norway, so trade counters are hard to come by.

RS has a Norwegian site that I'll check out (I recently registered), but I suspect they don't give free shipping to here.

No matter what, I'll order a few spares this weekend :D
Mouser does free shipping to Norway, and Digikey also apparently does. Be careful when getting free shipping, though. When I ordered something from Mouser recently, they didn't put any shipping costs on the invoice and FedEx then wrote in a number on the customs form that may or may not have been the shipping cost, but they were too inept (or maybe dishonest) to actually say where they got this number from.

(The number was suspiciously close to one third of the goods price, meaning that once added together with the goods price, and with the tax being 25%, I ended up paying almost exactly the same as this mythical amount in tax. Quite a coincidence, really. All FedEx could tell me was "you have to pay tax on the shipping costs" while failing to tell me what those costs were, apart from the admin costs they make you pay, of course. I asked them directly where they "found" this number and they just wouldn't respond to that question. I actually told Mouser that if free shipping means the shipper writing in magic numbers that boost the taxable amount by one third, maybe it might be bad for customers and ultimately their business, to which they replied that UPS provides better service for Norway. They wouldn't need to try very hard to manage that.)

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 4:40 pm
by adrm
UPS can be quite "slow".
DHL is quite fast, but they also charge a lot to handle VAT/customs declaration. (Close to GBP 25 in handling fees for the last item they shipped here)

As far as I can tell, Elfa Distrelec seems one of the more reasonable suppliers to here. Cheaper than RS, for example.


Newbie question:
Is a SN74LS259BN a direct replacement for a SN74LS259N? (Texas Instruments)
I have hard time finding concrete information on this

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 5:01 pm
by 1024MAK
Simple answer: "yes".

Long answer, the part number 74LSXXX defines only the logic function and normally the pin-out. But not the actual circuitry used. In most applications, parts from different manufacturers (and sometimes from the same manufacturer) are equivalents and work okay. But in rare cases (typically, but not exclusively with circuits like oscillators or other applications where the input levels do not fully comply with the TTL specs) they may not be interchangeable. Having said that, I would not expect any problems in this circuit.

The B in the part number near the end normally indicates that it is an improved version that is backwards compatible.

SN74LS259BN datasheet

Mark

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 5:36 pm
by adrm
Argh, it was listed, but out of stock.

What about the SN74HC259N vs the SN74LS259N?

As I understand it, the HC is a direct replacement for LS, based on CMOS.

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 5:41 pm
by 1024MAK
adrm wrote:Argh, it was listed, but out of stock.

What about the SN74HC259N vs the SN74LS259N?

As I understand it, the HC is a direct replacement for LS, based on CMOS.
No.

74HCxxx types are high speed CMOS versions and are not officially TTL compatible as they have different input switching thresholds (levels). However, 74HCTxxx types are TTL compatible.

Having said that, in a lot of circuits, a 74HCxxx type will often work. In this case, as most of the inputs come from an NMOS part (the 6522 VIA), I think it's worth a try if you can't get a 74LS259 or a 74HCT259.

BTW with most (but not all) manufacturers, the N at the end of the part number means throughhole DIL.

Mark

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 5:46 pm
by adrm
The HCT was also out of stock, so HC it is :D

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 5:57 pm
by paulb
adrm wrote:UPS can be quite "slow".
DHL is quite fast, but they also charge a lot to handle VAT/customs declaration. (Close to GBP 25 in handling fees for the last item they shipped here)
Last time Posten did the customs for something I ordered, that may have been going on for GBP 15, if I remember correctly. Money for virtually no effort on their part!

Admittedly, FedEx was quite quick. The week of back and forth about that damned mystery number was not so quick, however. And then I got a mail one whole month later - the shipping happened in July, so you probably know what that means - where they followed up to say that I would have to provide customs with the "documentation" that no-one but they would be able to provide. I suppose I ended up paying for that fast shipping, albeit in taxes. It would be interesting to know how the money changes hands with these shipping arrangements.
adrm wrote:As far as I can tell, Elfa Distrelec seems one of the more reasonable suppliers to here. Cheaper than RS, for example.
Elfa used to be very convenient in that they had an office in Oslo you could collect from, but that closed quite some time ago.

Re: Troubleshooting my latest BBC B

Posted: Sat Sep 16, 2017 6:06 pm
by adrm
You can get quite a number of items shipped from Elfa for NOK 60,- (GBP 5,60) shipping, and 0,- handling fee.

Deliveries are quite fast too. So I'll go with them.