Need help with BBC just picked up please

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Wed Nov 07, 2018 11:07 am

Kazzie wrote:
Wed Nov 07, 2018 10:29 am
I'd thought a bit about that. (I'd be interested to hear your thoughts on the fact that D7 on the RAM side (IC67) is always low: could this be because the contents are low-order ASCII (0-127) values, or for some other valid reason?)

As for the possibility of running for a while before halting, I would expect a halted 6502/6512 to sit there with a clear output on the address bus (proper high/low levels) instead of a middly ~3.6V on each of them. (And there isn't a single component elsewhere that's connected to all of the address pins which could be responsible, is there?) Hence my blaming the CPU.
So, I think the ~3.6V levels on the address bus are actually a fixed high - it's just the NMOS processor can't drive them any higher than this.

Reformatting the data, we have:

Code: Select all

1  VSS  0.00
2  RDY  5.00
3  O1IN 2.48
4  IRQ  5.00
5  VSS  0.00
6  NMI  4.47
7  SYNC 0.01
8  VCC  4.99
9  A0   3.65 1 = FFFF
10      3.65 1
11      3.64 1
12      3.65 1
13      3.64 1
14      3.63 1
15      3.62 1
16      3.63 1
17      3.62 1
18      3.61 1
19      3.65 1
20 A11  3.64 1 
21 VSS  0.01
22 A12  3.62 1
23 A13  3.62 1
24 A14  3.61 1
25 A15  3.63 1
26 D7   4.18 1 = DB
27      4.18 1
28      0.22 0
29      4.19 1
30      4.18 1
31      0.24 0
32      4.15 1
33 D0   4.13 1
34 RNW  3.64
35 N/C  0.00
36 DBE  5.00
37 O2IN 2.50
38 S0   5.00
39 O2OT 2.14
49 RES  4.45
So, the Address Bus is stuck at &FFFF and the Data Bus is stuck at &DB.

Now, I just checked in B-Em, and &FFFF in the ROM is actually value &DB:
bplus1.png

The only way I know of to stop a 6502 is to execute one of the undocumented KIL opcodes:
kill.png

If you look what happens when a KIL opcode is executed:
http://visual6502.org/JSSim/expert.html ... gmore=sync
killsim.png
You see the address bus ends up at FFFF and sync stops pulsing, which is exactly what's happening here.

(Edit: Simulation updated to show data bus value of DB as well)

So my guess would be the 6502 is OK, and there is a RAM fault which has caused a KIL opcode to be executed.

Dave
Last edited by hoglet on Wed Nov 07, 2018 11:27 am, edited 5 times in total.

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Wed Nov 07, 2018 11:51 am

I have brought a logic probe so if you let me know which pins/chips you would like me to check

User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Wed Nov 07, 2018 11:53 am

traindriver69 wrote:
Wed Nov 07, 2018 11:51 am
I have brought a logic probe so if you let me know which pins/chips you would like me to check
Which one did you buy?

You could start by checking if pin 7 of the 6502 (sync) pulses briefly when reset is released.

Dave

Kazzie
Posts: 277
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Need help with BBC just picked up please

Post by Kazzie » Wed Nov 07, 2018 11:58 am

Thanks for that, I didn't know that KIL opcodes behaved like that every time. You've sold me on that idea: we shouldn't be swapping out the CPU yet. =D>

The only documented opcode in column 'x2' is 'A2' (LDX immediate). If any bit (other than bit 2) is stuck low, that would transform it into a KIL opcode that would leave the system in the state we've found. I can't think offhand of how the CPU would fetch an opcode from RAM, but I can easily picture how a RAM fault could make the CPU load an opcode from the wrong location in the OS ROM, and accidentally execute some data instead.

On that basis, I guess the next step would be to piggy-back a new 4164 RAM chip on top of the RAM ICs one at a time, to see if one is faulty. (I suspect IC67 will be the duff one.)

Edit: after testing with the logic probe (cross-posted!)
Last edited by Kazzie on Wed Nov 07, 2018 11:59 am, edited 1 time in total.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM (mid- restoration)
Acorn System 1 home-made replica

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Wed Nov 07, 2018 12:54 pm

It's a laser logic probe it has settings Ttl and cmos then mem and pulse

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Wed Nov 07, 2018 1:06 pm

You could start by checking if pin 7 of the 6502 (sync) pulses briefly when reset is released.

Hi pardon me I am learning but what do I have to do to do the reset

User avatar
danielj
Posts: 6646
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Need help with BBC just picked up please

Post by danielj » Wed Nov 07, 2018 1:10 pm

Press break :)

d.

User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Wed Nov 07, 2018 1:12 pm

danielj wrote:
Wed Nov 07, 2018 1:10 pm
Press break :)
And then release it again. ;)

Look for a pulse on Sync (pin 7) when break is released.

Dave

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Wed Nov 07, 2018 1:18 pm

traindriver69 wrote:
Wed Nov 07, 2018 12:54 pm
It's a laser logic probe it has settings Ttl and cmos then mem and pulse
Set it to TTL mode.

For checking signals that are likely to be pulsing (changing) use PULSE mode.

Mark

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Wed Nov 07, 2018 3:27 pm

Hi all
Put the probe on pin7 of the 6512 and it shows low but when I press and release break key the high flashes once while low still lit

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Thu Nov 08, 2018 8:24 am

Hi all
With the logic probe flashing with me pressing the break key mean the cpu is working fine.
Many Thanks

User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Thu Nov 08, 2018 9:27 am

traindriver69 wrote:
Thu Nov 08, 2018 8:24 am
With the logic probe flashing with me pressing the break key mean the cpu is working fine.
It certainly suggests that.

It might be worth doing the same kind of test on the DRAM.

You should check the following pins of any one DRAM ( as they are the same on all 8 ).
- the A inputs (5, 6, 7, 9, 10, 11, 12, 13)
- the RAS input (4)
- the CAS input (15)
- the R/W input (3)

You should also check the data pins (2) on each DRAM separately.

Put the logic probe on each pin in turn, press then release break and look for whether the pin is:
- fixed low
- fixed high
- pulses low once after break is released
- pulses high once after break is released
- is continuously changing after break is released

This might help isolate whether it is a single DRAM that has failed or whether it's a problem with the control circuitry.

Dave
Last edited by hoglet on Thu Nov 08, 2018 11:00 am, edited 2 times in total.

Kazzie
Posts: 277
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Need help with BBC just picked up please

Post by Kazzie » Thu Nov 08, 2018 9:31 am

traindriver69 wrote:
Thu Nov 08, 2018 8:24 am
Hi all
With the logic probe flashing with me pressing the break key mean the cpu is working fine.
Many Thanks
Yes. Pin 7 will flash when the CPU fetches an instruction. The CPU is working fine just after it resets, and then it stops running. It probably stops because it received erroneous data, and ended up trying to execute an instruction that doesn't exist, which happens to hang the CPU until it's reset.

There should be no need to replace the CPU after all. But there's still a fault somewhere else. A faulty RAM chip is common on dead Beebs.

(Because the Model B (32K) uses the same board as the Model A (16K), it has two sets of eight RAM chips, and it's quite easy to disable one set to check if there's a fault. But your B+ only uses one set of eight RAM chips, so it's not quite as simple to check.)


When you checked the voltages on IC49 (74ls245), which is connected to the eight RAM chips on pins 2-9, you found that pin 9 (D7) was 0.1V, whereas all the others were around 2.1V. Could you check what readings you get with your logic probe on pins 2-9? It doesn't have to be immediately after a reset. (You could check pin 14 on each of the RAM chips, IC55, IC56, IC60, IC61, IC64, IC65, IC66, and IC67 if you want, you should get the same result as the eight pins on IC49.)

If you see pulses on seven pins, but not on the eighth, that suggests that the latter is faulty. If none are pulsing (i.e. the voltage is constant) then that could just be because it's showing the contents of the memory address over and over (because the video circuitry's been stopped by the halted CPU).


Edit: Hoglet's test above is also a good one, and more comprehensive than mine.
Last edited by Kazzie on Thu Nov 08, 2018 9:34 am, edited 2 times in total.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM (mid- restoration)
Acorn System 1 home-made replica

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Thu Nov 08, 2018 9:35 am

Image
Using your logic probe, can you also test the following pins on the CPU:

Code: Select all

3  O1 (IN)
37 O2 (IN)
39 O2 (OUT)
These are the various clock signals to/from the CPU. These will be either a 1 MHz or a 2 MHz square wave signal (depending on what address is on the address bus). On your logic probe this should show up as both the green (low) and red (high) LEDs both lighting with equal brightness. If your logic probe has a buzzer, this should sound continuously while connected.

The CPU requires a square wave clock signal so that it can time all it’s internal operations, and so that communications between the CPU and the memory and input/output devices can be properly synchronised.

Next, it would be a good idea to confirm that the reset signals are working correctly. Monitor CPU pin 40 (/RES) with your logic probe. It should show red (high). Press and release the BREAK key and the logic probe should very briefly show green (low) before going back to showing red (high).

If everything is okay so far, next it is worthwhile monitoring the various address and data lines:

Code: Select all

9  A0
10 A1
11 A2
12 A3
13 A4
14 A5
15 A6
16 A7
17 A8
18 A9
19 A10
20 A11
22 A12
23 A13
24 A14
25 A15
26 D7
27 D6
28 D5
29 D4
30 D3
31 D2
32 D1
33 D0
We are looking to see if they can go to both a logic low (green) and also can go to a logic high (red). So if they are not changing between these two states on their own, press and release the BREAK key to reset the system, so that you force the CPU to “exercise” these pins. Hopefully as the CPU executes the code from the ROM, most of these lines will change state several times at least (some will change very fast).

If all these pins work as expected, then it is likely that the CPU is fine. And that something else in the system is faulty. But keep in mind that until the faulty item has been located and fixed/replaced, it is not possible to definitively say that a chip in a complex system like a Beeb is perfectly okay. As one fault can mask another problem.

Mark
Last edited by 1024MAK on Thu Nov 08, 2018 9:44 am, edited 1 time in total.

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Thu Nov 08, 2018 9:39 am

hoglet wrote:
Thu Nov 08, 2018 9:27 am
(as they are the same on all 8).
Dave, you’ve been nobbled by the forum’s “cool” smiley :lol:

Translating... “(as they are the same on all eight)”.

Mark

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Thu Nov 08, 2018 10:54 am

hi all
ic49 pins 2-9 all show on the probe high and low but if i press break just get low lit both with a high pitch noise from the probe

Kazzie
Posts: 277
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Need help with BBC just picked up please

Post by Kazzie » Thu Nov 08, 2018 11:11 am

Odd. Is that with your probe in TTL or Strobe mode?

Also, when you say "if i press break just get low lit", is that while you're holding break down, or after you release it? The Break key operates the reset line on the system, so while you hold it down everything is still being reset, and the probe won't show us if the RAM's operating properly or not.

If those pins are all showing activity (strobing) after reset is released, then it may not be a simple "chip output stuck high/low" error.

It may be worth checking the RAM pins that Hoglet suggested, to get a better picture of what the RAM chips are being asked to do.
Last edited by Kazzie on Thu Nov 08, 2018 11:12 am, edited 1 time in total.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM (mid- restoration)
Acorn System 1 home-made replica

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Thu Nov 08, 2018 11:37 am

hi
its in ttl mode and just low lit when i press break hi comes back when i let go

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Thu Nov 08, 2018 11:40 am

When using a multimeter or a logic probe on a microcomputer system, it is worthwhile learning a bit about the voltages used in the system. In particular the voltage levels that represent a logic high and a logic low for the CPU and other logic chips. See the post in this link: Logic Levels for 5V TTL Systems.

Mark

Kazzie
Posts: 277
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Need help with BBC just picked up please

Post by Kazzie » Thu Nov 08, 2018 11:50 am

traindriver69 wrote:
Thu Nov 08, 2018 11:37 am
hi
its in ttl mode and just low lit when i press break hi comes back when i let go
So when you let break go, both Hi and Low are lit (for all eight pins on IC49)? In that case that test is inconclusive. After you've had a look at the thread Mark linked (good background reading), you'll need to try the test that Hoglet (Dave) posted earlier.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM (mid- restoration)
Acorn System 1 home-made replica

User avatar
tricky
Posts: 2846
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Need help with BBC just picked up please

Post by tricky » Thu Nov 08, 2018 1:06 pm

Can you burn an EPROM/have an eeprom that you can replace the os with my test ROM?

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Thu Nov 08, 2018 5:25 pm

I have no eprom burner but if anyone could supply me with a test rom I do not mind paying all costs for one

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Fri Nov 09, 2018 10:27 am

Hi all
trying to test the dram chips with my logic probe and hit a snag when I switch the bbc on both caps lock and shift lock are lit I start testing the dram getting one reading then all of a sudden the probe shows hi which is bright low showing but a lot dimmer and the lights are pulsing and the tone on the probe sounds like a warning alarm going off if I then press break the lights are reversed so low bright and high dim pulsing with an alarm tone I also notice that the shift lock light as gone off so only caps lock lit.

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Fri Nov 09, 2018 12:40 pm

If at any point, i’m telling you stuff you already know, just tell me!

Most logic probes have one tone for logic high, and a different tone for logic low. In a microcomputer that is working (or partly working), most lines should be constantly changing state.

Depending on which line you are monitoring and what the computer (or parts of it) is doing, will partly determine the rate of change, known as the frequency and pulse width.

If you monitor one of these lines with a logic probe that has the two different tones, it will sound like an alarm or siren!

If a line is changing state, then that line and the device (chip output pin) that feeds it, is most likely okay.

Some things to keep in mind (note that this is a very simplified description):

The CPU is very fast (compared to a human), but very dumb. It puts an address number on the address bus (lines A0 to A15) and then expects an instruction or data byte to appear on the data bus (lines D0 to D7).

When switched on, or after the BREAK key is released, the CPU tries to get data from the OS ROM chip. This tells it where the OS program starts. It will then fetch the instruction at this new memory address. This again will be in the OS ROM. After it has executed this instruction, the internal register (in the CPU) called the Program Counter (PC) will increase to point to the next instruction. The CPU will then fetch the next instruction. And so the process continues.

Not very far along the code in the OS ROM, the CPU is called on to access RAM. This is often where it all goes wrong. Because one of the most common faults, is a failed (or partly failed) RAM chip. A fault with the RAM can result in the wrong data or instruction being fed to the CPU. It will then no longer be executing the intended program code, with the result that the machine then appears to “lock up” or appear “dead”.

Note that in a complex machine like any computer system, a single failed connection or a single failed chip can cause the whole system to fail. This is why fault finding is time consuming and not straightforward :(

I should also say that although RAM faults are one of the common faults, they are by no means the only thing that can go wrong.

If you can go back through the thread and carry out the suggested tests and checks, and then post the results, that hopefully will give us a bit more information. We can then point out to you the next steps.

When posting results when using a logic pulse, use H For High, L for Low, PS for Slow Pulsing, PF for Fast Pulsing. Where Slow Pulsing is when the pulses are slow enough that you can count them (but no need to actually count them). Anything faster, describe as Fast Pulsing.

Mark

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Sat Nov 10, 2018 5:33 pm

Hi all
Just tested the drams and this is what I got pins5,6,7,9,10,11,12 h+tone l+tone when break pressed
Pin 13 h+tone h+l+tone when break pressed
Pin 3 h+tone
Pin 4 l+tone
Pin 15 l no tone

Hope this helps

User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Sat Nov 10, 2018 5:49 pm

traindriver69 wrote:
Sat Nov 10, 2018 5:33 pm
Hope this helps
I'm sure it will help, but you need to be clearer reporting your measurements.

For example, I don't understand what "Pin 13 h+tone h+l+tone when break pressed" means (I could guess, but I might be wrong).

Please do read what Mark wrote above about reporting measurements from a logic probe. If you don't understand what he's telly you then ask.

Dave

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Sat Nov 10, 2018 6:09 pm

Hi sorry if I did not write it down write
Pins 5,6,7,8,9,10,11 and 12 I got h reading with tone from the probe when I pressed the break key h reading went and got a l reading with tone from the probe.
Pin 13 I got h reading with tone from the probe when I pressed break I got both h+l reading with tone from the probe.
Pin 3 h reading plus tone from the probe and did not change when I pressed break.
Pin 4 l reading with tone from the probe did not change when I pressed break.
Pin 15 l reading and no tone from the probe did not change when I pressed break.
It is my first time using a probe so please excuse my lack of knowledge.
Many thanks

traindriver69
Posts: 26
Joined: Thu Nov 01, 2018 12:44 pm
Location: Derby
Contact:

Re: Need help with BBC just picked up please

Post by traindriver69 » Mon Nov 12, 2018 7:40 pm

Hi all
Had no replies from my latest readings so maybe its my fault as I said I am new to using a probe but I am learning and enjoy learning new things.
Now high and low readings I understand that's straight forward after watching some YouTube videos of faulty BBC computers I am guessing that if both high and low are lit that is pulse but I had a reading on a couple of pins where pressing break I got a pulse but letting go of break I got a brief flash of both high and low so is that called a pulsing pulse I do appreciated people helping me with my ultimate aim of a working BBC.
Many thanks

User avatar
1024MAK
Posts: 7988
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Need help with BBC just picked up please

Post by 1024MAK » Tue Nov 13, 2018 1:12 am

Sorry, I was away at the weekend, and now I’m working late turn shifts. I will have a look at your posts when I can find more time.

Mark

User avatar
hoglet
Posts: 7596
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Need help with BBC just picked up please

Post by hoglet » Tue Nov 13, 2018 7:49 am

Hi TrainDriver,

Sorry, I was distracted by other things over the weekend.

It would help if you clearly distinguish the following three cases in your testing:
1 - what happens to a pin when when break key is held down continuously
2 - what happens to a pin immediately as the break key is released
3 - what happens to a pin several seconds after the break key is released

Try to avoid mixing the reporting of these three cases in a single sentence, as it's not always easy to follow what's happening.

The states that the logic probe is reporting are technically called:
- "open circuit" (no LEDs on)
- "low" (just the low LED on)
- "high" (just the high LED on)
- "continuously changing" (both LEDs on)
- "low then a high pulse" (initially as per low, but then a brief single flash of the high LED)
- "high then a low pulse" (initially as per high, but then a brief single flash of the low LED)

The last two will typically be associated with an action, like the act of releasing the BREAK key.

If you stick to these terms, and ignore the tone for now, it will be much clearer.

So I'd go back to the RAM, and make three sets of measurements:
1 - what happens to a pin when when break key is held down continuously
2 - what happens to a pin immediately as the break key is released
3 - what happens to a pin several seconds after the break key is released

i.e. measure the RAM pins three times (as per 1, 2, 3 above), and report the three sets of measurements separately, not mixed together.

This may seem inefficient, but it adds a certain amount of redundancy that allows us to spot possible measurement errors that might lead us on a wild goose chase.

I should also point out, it's very likely that we'll reach a point where it's hard to pin down what chip is causing the problem. Even with better test equipment, like oscilloscopes and logic analyzers, RAM faults can be a pig to pin down.

But you may be lucky here, and the problem is not the RAM but is the control circuitry driving the RAM, which would be easier to debug. That's really what this RAM test is trying to achieve.

Also, do try to get hold of a copy of Tricky's test ROM. It's very good, and might short-cut the whole process. After you have sent 25 posts you'll be able to use the PM system. Send me a PM with your address, and I'll burn you a ROM and put it in the post.

Dave
Last edited by hoglet on Tue Nov 13, 2018 8:01 am, edited 6 times in total.

Post Reply