Using a logic analyser to help fix games

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
One of the most frequent questions I get asked is "what are you doing in here and how did you get in?" That wouldn't make a very interesting post so instead I thought I'd write a post answering the question "why do you collect logic analysers, weirdo?"

I powered up a Bubble Bobble the other day and found it had lost all the motion objects. I could see the platforms as well as the P1/P2 scores but Bub, Bob and the various baddies weren't displaying.

I fired up the schematic, had a browse and for reasons that will become apparent in a later post started looking at a 74LS273 that fed into a 373. The 273 is an 8-way triggered latch. On a rising clock pulse the 8 input bits (D1-D8) are carried to the outputs (Q1-Q8). An active low master reset will set the output bits low if triggered. Datasheet

The 273 feeds into a 373 which carries the data out and off to make the display.

This is the relevant part of the schematic (scan page 4-3, grid B2. download) which mislabels IC62 as a 373 when it's actually the 272 in question.

circuit.JPG


I put my logic probe on the output side of IC63 LS373 and found that all 8 Q outputs were constant low. Aha! That's obviously going to limit the amount of video
smiley36.gif
. I worked backwards to see what was being fed in and found the input side was all low too. I worked back to IC62 LS273 and found the outputs were dead, but the inputs were showing lot of activity as was the clock (signal CK1) on pin 11 and the output control/master reset on pin1 was showing slow activity (it's a master reset 'cos it's a 273 but the schem labels it output control).

Despite being rather tempted to hack this off and replace it I decided to investigate a bit more and prove beyond doubt whether it was faulty.

The truth table for the 273:

truth.JPG


Given that I had input activity, CP activity good enough to trigger my probe and /MR activity I certainly had the right conditions for output. But the CP column shows that data is clocked from D inputs to Q outputs on the rising edge of CP. What if the activity on CP wasn't ever in sync with the D inputs? If the D inputs were all low at the exact moment of CP rising then the chip would be working perfectly and I'd see no output. Can't chip-chop on an original BB based on flimsy evidence!

The problem now was to monitor all 8 D inputs whilst comparing them to the clock waveform. I could try looking at CP on channel 1 of my scope and then cycling through the inputs on the other channel but I've never had much success with that when the data is going faster than carrier pigeon speeds.

So out came one of my favourite toys, the logic analyser
smiley17.gif
. The particular model I chose for this is an Intronix LA1034 - a 34 channel USB analyser that uses a PC as the control system. Website and handily the software download. I'm providing the LA captures later on in this post so you can load them up and flick through the software to really see what data this tool grabs.

I fit a test clip to the PCB, wired up the analyser and fired up the software.

LA_on_pcb_sml.jpg


First I needed to add the signal lines into the control software and assign them labels. I used the nomenclature from the schematic and ended up with this:

la_signal_wires.JPG


I wanted to see whatever was going over the chip so I didn't bother setting a capture trigger - a set of signal states that causes the LA to start recording - I just wanted data! I set the LA to use its own clock to set the sample rate as I didn't know whether I could trust the CK1 signal on pin 11. The LA samples every clock tick and you can either use an external clock - from the board, so you only sample when the PCB is meant to be doing something - or an internal clock from the LA itself. 10MHz seemed like a reasonable enough speed for a first bash.

Click sample and a couple of seconds later I get this on my screen:

LA_signals_-_duff.JPG


(big version)

The capture file is here, and the download link for the software is here too. When you start the LogicPort application, select Demo mode and then File -> Load and browse to the expanded ZIP archive.

In the next post I look at the captured data and try a different method of sampling by using clock CK1 to trigger each capture.

cheers

tim

trm2013-05-01 21:36:39
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I'm watching this with avid intent. As you know I bought the ZeroPlus 16 channel USB analyser last year. It was a trade off between channels and cost: yours = 32 channels but $350 - $400, mine only 16 channels but £120 or so (I think a bit more with VAT and delivery etc.), but I figured I'd get away with the 16 channels for the most part and if I didn't then I could flog on and upgrade.

SO, anyway, I've done a similar thing but struggled with sampling on an external clock. I found that because the gate of the IC wasn't necessarily at a regular interval it upset things a bit. Or at least it I think it did. It could have been other reasons at play or simply me not quite getting the jist of what I was doing.

I'll have to download the capture when I'm in my partition that has my VMs in it and have a nose at your initial capture to see how it compares to when I've done it. I've got an electron sat next to me (and the analyser) so I can follow along. Give or take
smiley4.gif
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Actually, looking at the truth table for that, I'm not sure why in your picture you've not got your cursor on the rising edge of CP since anything else will not be valid data. But then maybe I'm jumping the gun!
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
The cursors in the screenshot are just randomly placed from when I last loaded. As for the actual fault I was using it for, I need to power up the board and capture again as I made one snapshot whilst I was stimulating one of the inputs. And I'm not sure if I overwrote the 'real' capture with the tweaked one
smiley36.gif
so that screenshot might be replaced later.

As for clock rates, CK1 on here was assumed suspect so I decided to go with the LA's internal clock and simply picked a rate that seemed 'fast enough'. I did run a cap at about 150MHz to check I wasn't missing anything and then dropped down a bit. I realised afterwards I didn't need to slow it down as the FPGA code only logs state changes but meh
smiley4.gif
.

I'll be trying sampling against CK1 external clock next time I get to my workbench.

Cheers
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Sheesh? WTF man
smiley36.gif
.

Glad you like the post. I'm sure I have a Chinese clone of the Salae LA somewhere that I bought and never used. If I can find it you're welcome to it dude. I really do find an LA to be a useful tool and everybody needs one (or three!)
 

cliff_poole

Active member
vacBacker
Feedback
6 (100%)
Credits
1,069CR
Great post !, I have been thinking of getting one for ages and this is exactly the sort of thing I envisaged using it for, but, having never used one, wasn't sure it would do what I would expect. Most information out there is irrelevent to the sort of things we'd find them useful for.

With this sort of job, I'd normally take a new chip, slightly bend the output legs up, then piggyback so that the output legs stick out and don't touch anything. I'd then compare the outputs of the two. A bit like using one of those logic comparators but for 20 pin devices. A LA would be a much more professional approach.
 

rigel

Newbie
Credits
73CR
man, I've got a long way to go here, but it is my intention to be able to understand this thread fully and possibly make a valued input to it in the future.

thanks Tim for showing the way forward with PCB repairs.
 

Jodo

Boy is this a machine!
Staff member
vacBacker
Feedback
15 (100%)
Credits
607CR
Unfortunately my eyes glazed over at "The 273 is an 8-way triggered latch. "
smiley5.gif


Anyway, why do you collect logic analysers, weirdo
smiley2.gif
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
rigel said:
man, I've got a long way to go here, but it is my intention to be able to understand this thread fully and possibly make a valued input to it in the future.

thanks Tim for showing the way forward with PCB repairs.

At this point I feel it pertinent to point out where in the repair process you might use one tool over another since a logic analyser is only one tool in the arsenal and in all fairness, not one that's used very often. This is a great thread to have though - don't get me wrong, and it's a thread I'm personally very interested in having invested heavily last year in modernising my tool set.

I shall start a new thread though so as not to distract from this one and attempt to explain some of the whys and wherefore's as to when you would want to consider using what.
 

cliff_poole

Active member
vacBacker
Feedback
6 (100%)
Credits
1,069CR
rigel said:
man, I've got a long way to go here, but it is my intention to be able to understand this thread fully and possibly make a valued input to it in the future.

thanks Tim for showing the way forward with PCB repairs.

Atari's "The Book", has excellent descriptions of all the commonly used logic devices and how they are used http://pdf.textfiles.com/technical/atari_thebook.pdf
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
It's great to see so much interest so far :)

Porchy - that is very generous thank you (and tempting) but I don't think I have room unfortunately :( I looked at the HP mainframes when I was after my first LA but Macro had a huge Rohde & Schwarz LAC64 that I acquired. Are there any killer features on the 500A that I'd be upset at not having tried? The LAC64 can do live disassembly with some external modules which don't appear to exist - I was really looking forward to trying that but am still slightly confident I can code up a plugin for my LA1034 which will do something similar.

Mesmeric_G - I like your improved comparator! Hopefully some of the future posts in this thread will confirm your ideas on what a good LA can help achieve, and if there is anything you want me to test just shout out and I'll set it up.

rigel - I may have overemphasised how much use an LA gets so it's important to view it in perspective with the other tools and Gudd is going to cover this. As the post shows I used my trusty logic probe to locate the area of interest and highlight the suspect bus in about five minutes. If I slapped the LA on every chip that led to the 273/373 pair I'd still be searching and probably be insane
smiley36.gif
. The concepts in the post about digital logic and reading a schematic are crucial, as is knowing how to use a logic probe and practicing those three areas will set you up for fixing most faults. But the LA will give pretty state charts ;)

Jodo - I'm glad somebody asked that question. I collect them because chicks dig 'em totes! I'm over 9000 times sexier to women when I'm waggling my rainbow capture cables.

DABOSS - cheers :)
 

porchy

Active member
Feedback
5 (100%)
Credits
994CR
trm said:
Porchy - that is very generous thank you (and tempting) but I don't think I have room unfortunately :( I looked at the HP mainframes when I was after my first LA but Macro had a huge Rohde & Schwarz LAC64 that I acquired. Are there any killer features on the 500A that I'd be upset at not having tried? The LAC64 can do live disassembly with some external modules which don't appear to exist - I was really looking forward to trying that but am still slightly confident I can code up a plugin for my LA1034 which will do something similar.

TBH I dont know the extent of what it can or cant do. Its so big and heavy ive not really used it other than to fire it up and have a quick play about. I found it for really cheap but never actually realised how big it was.

If anyone else wants it and you can collect or are going to Revival then its all yours
 

Equites

Chief Sheesher®
vacBacker
Feedback
35 (100%)
Credits
3,332CR
trm said:
Sheesh? WTF man
smiley36.gif
.

Glad you like the post. I'm sure I have a Chinese clone of the Salae LA somewhere that I bought and never used. If I can find it you're welcome to it dude. I really do find an LA to be a useful tool and everybody needs one (or three!)

That would be kool & the gang, me want!
 

rigel

Newbie
Credits
73CR
trm said:
It's great to see so much interest so far :)

rigel - I may have overemphasised how much use an LA gets so it's important to view it in perspective with the other tools and Gudd is going to cover this. As the post shows I used my trusty logic probe to locate the area of interest and highlight the suspect bus in about five minutes. The concepts in the post about digital logic and reading a schematic are crucial, as is knowing how to use a logic probe and practicing those three areas will set you up for fixing most faults.

"I used my trusty logic probe to locate the area of interest and highlight the suspect bus in about five minutes".

Knowing how to use the logic probe effectively is the area i think i need to concentrate on right now.

is there a list of the various 74 TTL chips showing when the legs should be reading high or low? (hope this isn't a stupid question)
smiley9.gif
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Equites - I'll search for you!

rigel - if you find the 2 or 3 digit code from the chip, the parts after the LS bit then google "74LSnnn data sheet" you'll find what you're after. E.g. "74LS245 datasheet"
 
Top