Advice sought on implementing address change detector

Anything not specifically related to NBTV, but at least of some technical nature that might be of interest to NBTV members. Items for sale and links to retailers do not belong here.

Moderators: Dave Moll, Steve Anderson

Advice sought on implementing address change detector

Postby Andrew Davie » Wed Mar 03, 2021 12:30 am

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
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Advice sought on implementing address change detector

Postby Andrew Davie » Wed Mar 03, 2021 1:25 am

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.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Advice sought on implementing address change detector

Postby Andrew Davie » Wed Mar 03, 2021 12:13 pm

Never mind I think I have a better/different solution to my problem :P
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Advice sought on implementing address change detector

Postby Steve Anderson » Wed Mar 03, 2021 2:53 pm

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.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Advice sought on implementing address change detector

Postby Klaas Robers » Wed Mar 17, 2021 10:10 pm

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".
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1655
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: Advice sought on implementing address change detector

Postby Steve Anderson » Thu Mar 18, 2021 11:52 am

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 249 times


...just noticed I did attach it before...or at least provide a link...
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand


Return to Off Topic

Who is online

Users browsing this forum: No registered users and 3 guests