Logic Analyser and Counters

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
I'm wondering if you tech guys can help me out interpreting some LA data? I'm a first time user of an LA so am trying to get to grips with it. At the moment I've taken some data from a number of 74LS163's, and am trying to make sense of it. If I make the data available and the program to read it, would anyone be kind enough to talk me through what they see?

I roughly understand how a 74LS163 works, but cannot relate that to the data at the moment.

I think I have configured the software correctly to grab the info

Cheers
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I can try if you like later this evening. Would be interesting to see what you're using as the clock signal to gate the analyser as that's the thing that I always struggle with and often if you don't get that right then the data won't make much sense.

Would be nice if Tim could see it too as he's done loads with analysers. Give him a prod on FB as he's been too busy IRL to check in here much lately.
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
I'd like a look at this too.

Still getting to grips with my LA and think I know what you mean about the clock source Guddler. It seems very easy to configure so it shows junk data when I've used mine!
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I'm pretty sure that it's a case of if you don't clock the logic analyser to either the same frequency as the UUT (logic chip in this case), or better still if your logic analyser has an external clock input then you can end up with stuff that you think should make sense but just doesn't.

I've spent literally hours playing around trying to sample meaningful data before! I just need a slightly better understanding of what I'm up to in order to make it second nature enough for the LA to be a "go-to" bit of kit.

Doesn't help that my analyser has a filter function on it and I do keep insisting on trying to trigger on signals that I'm filtering out. Doh!
 

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
Cheers guys!

Here is the program I'm using:

Program

Now as I'm new to this I've been trying to figure out how it works. Not sure if I have been successful yet. But anyway......

I initally setup the pins like this:

Code:
pin1-ch1
	pin2-clk connection on LA
	pin3-ch2
	pin4-ch3
	pin5-ch4
	pin6-ch5
	pin7-ch6
	pin8-gnd connection on LA1
	
	pin8-ch7
	pin9-ch8
	pin10-ch9
	pin11-ch10
	pin12-ch11
	pin13-ch12
	pin14-ch13
	pin15-not connected as power

and took some samples with no triggers, and the LA software set to interal CLK
Samples were titled A12 and B12 [url="http://lois.ultrax.org/purity/Uploads/App/Mikie%20LA/"]here[/url]

I also took some samples set as CLKNEGEDGE titled "B11 CLK NEGEDGE.alg" with Extneral CLK set

I expected to see the CLK displaying data but there was nothing, and seemingly no way to add 
into onto the sample

So I disconnected the CLK connection on the LA and attached another channel to the CLK and took
these samples [url="http://lois.ultrax.org/purity/Uploads/App/Mikie%20LA%20New/"]here[/url] setting the LA at 100.00 US

Anyway have a look and see what you think.  If I've done something completely wrong please let
me know :-)
Purity2014-08-12 20:36:36
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
I've had a look best I could at that by downloading and installing the program, then each of your layout files (well some of them, got pretty tedious a file at a time! Please can you zip them up next time?)

There's some rather Chinglish menu spelling in there
smiley24.gif


It doesn't look right for a '163 counter to me, the CLK is irregular, but that may just be the circuit you're hooked on to. Or maybe the sample period is too long so it's missing lots of data?

What board is the '163 on? An actual game PCB? Which game and which IC?

Sorry I can't offer any more help from what I've seen.
 

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
Thanks for looking! Sorry I will zip them up next time

Yeah the software is not the best.

I also thought the CLK was looking a bit odd. Maybe I'm doing something wrong?

The samples I took are all from 74LS163's from a Mikie PCB. I have labelled the position of the IC in the filename. They are all from the lower board.

I wasn't sure how long to sample for, so it was a bit of a guess
Purity2014-08-12 22:56:29
 

Mitchell Gant

Active member
vacBacker
Feedback
2 (100%)
Credits
888CR
I've just had a quick look at Konami Mikie schematics and found four '163 counters at locations A11, B11, A12 and B12. They appear to form the horizontal pixel counters/sync chain and would have a nice regular clock signal to all their pin 2's.

That clock signal is fed via inverter D14 pin 3, from flip flop E13 pin 5, which is wired to divide it's clock signal by 2.

The flip flop clock seems to come from an oscillator shown at the bottom left of the drawing, but it's badly scanned so I can't make out what frequency it is. 18.432 MHz maybe?

However it's not quite that simple as the E13 flip flop also has it's clear input wired to the 2nd E13 flip flop pin 9, so that will change the simple frequency division. I stopped looking there...

But, as those '163's are a horizontal counters, the clock must be pretty regular, certainly more than your logic samples show. It will also be quite a high frequency clock, 5 or 6MHz possibly.

That will need at least 12MHz or more LA sampling frequency to capture each state properly. I suspect your problem is that you're not sampling that fast, which could explain the 'missing' clock pulses on your samples. Try finding how to increase sampling frequency beyond 12MHz.

Hope that helps a bit.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I've not loaded up the software or anything (or even downloaded it) as I'm on Mac and, ok, i've been up the shed all night too, but looking at those Mikie schematics, I'm pretty sure you can't use the CLK input of the 163 as the sample CLK of the analyser (but I'm not sure you are anyway).

The folder for your software includes a manual for GTKWave. Does that mean it can export in gtkwave format or something? If so, can you as I have that.

What I would basically do is measure the typical frequency of the CLK input to the 163 (OK, we know it varies) and set your sample rate to about 4x that provided you can. Then sample for as long as possible initially.

Then I'd be tempted to see what happens if you set a trigger on pin 1 (CLR) falling edge.

See what that gives you...
 

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
The LA software has a frequency counter so I put that on the CLK and the highest value seemed to be 054500000. I assume this equals 5.45mhz, so times that by 4 and you get 22mhz ish

So I focused just taking a sample of the 163 @ A11. I set the LA software to 20.00ns = 50mhz.

The sample finished almost immediately, and I've found now way to contiunally sample at that rate.

The results are below - set as immediate trigger, and internal sampling clock in software (default). I've dumped the last lot of samples as they look to be incorrectly done.

Zip format
GTKWave format

I've then set pin 1 to trigger on falling edge...it never triggers

Same pinout as before:

pin1-ch1
pin2-ch14
pin3-ch2
pin4-ch3
pin5-ch4
pin6-ch5
pin7-ch6
pin8-gnd connection on LA1

pin8-ch7
pin9-ch8
pin10-ch9
pin11-ch10
pin12-ch11
pin13-ch12
pin14-ch13
pin15-not connected as power
Purity2014-08-13 13:59:42
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Yay! I can see them
smiley36.gif


OK, I can only see activity on CLK, Q0 & Q1. Does that tie up with what you see on the chip using a logic probe? If it does then pull it and test it out of circuit with something, or just replace it as that's not what I would expect from a 163 counter.
 

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
guddler said:
Yay! I can see them
smiley36.gif


OK, I can only see activity on CLK, Q0 & Q1. Does that tie up with what you see on the chip using a logic probe? If it does then pull it and test it out of circuit with something, or just replace it as that's not what I would expect from a 163 counter.

What I'm seeing on the Logic Probe is:

1-H 16-H
2-P 15-L
3-L 14-P
4-L 13-P
5-L 12-L
6-L 11-L
7-P 10-P
8-L 9-H

So, my understanding is pin 1 high, so nothing cleared/reset
Clock is pulsing
pin 3-6 is starting number, so 0
pin 7,9, 10 is high so it is counting
pin 11-14 is end number, so 3
pin 15 is reached the end of count if asserted
Purity2014-08-13 17:31:34
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
That is not my understanding of how this works.

My understanding is that pins 11 to 14 are outputs. They are not an input, therefore pins 3 to 6 are the preload number (0 here), CLR is used to clear all outputs to zero then /LOAD is used to set any preload number (again, 0). Both enables must be high in order for it to count and it then counts on each clock cycle seen at the CLK pin. It continues to count until it is disabled but each time it reaches binary 15 the RCO pin goes high for the duration of that count and in your circuit, that goes on to feed the next counter. I would guess it feeds into the next CLK but I've not got the schems open at the moment.

Just my understanding though remember.
 

Purity

The Oracle
vacBacker
Feedback
17 (100%)
Credits
2,999CR
You still think it is worth desoldering A11?

The idea with getting the LA was trying to work out whether the 163's are bad or not, so I don't have to wrongly remove them
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Umm, i can't really offer much advice on the logic analyser front really. I do agree that you should be able to use it to see if the 163 looks like it's behaving OK or not but it's difficult without know or having access to your particular analyser and PCB. The fact you're not seeing the same on your analyser as you are with a probe does suggest to me that you ought to be able to get better results from the analyser yet.

I could for instance find a board of mine with a 163 and see if I can get any sense out of my LA (though probably not tonight as I have to pop out) but I don't know if that would really get us anywhere.

[EDIT] What analyser is it? Can you provide a link to any website or anything?

guddler2014-08-13 19:03:10
 
Top