Page 1 of 1

Advice sought on implementing address change detector

PostPosted: Wed Mar 03, 2021 12:30 am
by Andrew Davie
I have a 10-bit digital address coming from a device. All pins either 0V or 5V. I'm looking for how to best implement a system that detects a change on any of these pins, and will fire off a "1" as the result. How would this normally be implemented? The context is that I want to feed the result into a microprocessor pin and have an interrupt generated by that "1" to service the address and put correct data on the data bus

Re: Advice sought on implementing address change detector

PostPosted: Wed Mar 03, 2021 1:25 am
by Andrew Davie
Actually just a flip would be better. If any of the pins change then flip the output 0/1/0/1 etc.
So I can trigger on a change of the value.

Re: Advice sought on implementing address change detector

PostPosted: Wed Mar 03, 2021 12:13 pm
by Andrew Davie
Never mind I think I have a better/different solution to my problem :P

Re: Advice sought on implementing address change detector

PostPosted: Wed Mar 03, 2021 2:53 pm
by Steve Anderson
Well, if you've found a solution this may be irrelevant...a bunch of exclusive-OR gates fed into a downstream OR-gate would be one hardware answer. There are also hardware magnitude comparators which will perform a similar function. 8-bits compared to another 8-bits, generate an output on same/difference, can be cascaded for more bits. Also A>B, A=B, A<B...

e.g. https://assets.nexperia.cn/documents/da ... 4HC688.pdf

Steve A.

Re: Advice sought on implementing address change detector

PostPosted: Wed Mar 17, 2021 10:10 pm
by Klaas Robers
Anyway, if you want to detect a change, then you should have remembered the previous situation. And then compare the current situation with the remembered previous situation. And indeed there are IC's, called magnitude comparator, that have an output that is 1 as long as both are the same, and 0 if they are no more the same. As far as I know, they are 4 bits wide, but you can cascade them.

Then after the interrupt the new situation can be stored in the "remember register".

Re: Advice sought on implementing address change detector

PostPosted: Thu Mar 18, 2021 11:52 am
by Steve Anderson
I forgot to add this to my posting above...74xx688 (e.g. 74HC688), 8-input magnitude comparator, static (no clocks etc.), inverted A=B output. You may have to shop around to find it in DIL/DIP packaging though. The internal diagram shows how you could build it from individual gates to expand/reduce it. It can be cascaded for more than eight inputs, 16, 24 etc...though be careful of the delay the more you cascade...though it could be done in a parallel fashion if time is not on your side...requires one additional multi-input OR/NOR/AND/NAND gate...as many inputs as '688s...

If you want just a short pulse when A=B changes state in either direction, the old trick of a short RC time-constant on one input of a XOR/XNOR gate, whereas the other is fed direct...but it's another (largely unused) chip.

Steve A.

74HC688.pdf
(218.4 KiB) Downloaded 261 times


...just noticed I did attach it before...or at least provide a link...