Greg: Now I see what you're saying. In order to turn on a given relay you output a string of zeros and ones such that the desired relay is the only one which has different values on its two inputs. You need to keep the ends open, because otherwise there would always be two relays that saw different values. You should plan on always sending the entire byte at one time to the hardware, then you will only have the skew between bits to deal with, certainly much too short an interval to falsely trigger a relay. I guess I would use an 8-bit port as a data bus. Three additional bits could select one out of eight '373's via a '138 decoder. A final output bit could act as the enable through the '138. This would allow for 8*7 = 56 relays. So, as I understand it, the values to turn the relays on and off would be: 00000000 Idle state 11111111 Alternate idle state 00000001 Turn on relay 1 00000011 Turn on relay 2 00000111 Turn on relay 3 00001111 Turn on relay 4 00011111 Turn on relay 5 00111111 Turn on relay 6 01111111 Turn on relay 7 11111110 Turn off relay 1 11111100 Turn off relay 2 11111000 Turn off relay 3 11110000 Turn off relay 4 11100000 Turn off relay 5 11000000 Turn off relay 6 10000000 Turn off relay 7 Note that you can operate more than one relay simultaneously, although there are restrictions on the combinations you can do. For example: 01010101 Turns on relays 1, 3, 5 and 7 and turns off relays 2, 4 and 6. Message ----- From: Greg Peyton To: Sent: Sunday, June 25, 2000 9:55 PM Subject: Re: [EE]: Relay question... > In a message dated 6/25/00 5:25:52 PM Pacific Daylight Time, > RAMMERMAN@PRODIGY.NET writes: > > > > You can get 8 per chip if you just wrap the last relay around to the first > > position. > > > > IE: > > > > Relay 1 connects to Q0 and Q1 > > Relay 2 connects to Q1 and Q2 > > ... > > Relay 7 connects to Q6 and Q7 > > Relay 8 connects to Q7 and Q0 > > > > Bob, > Thank you for your reply. > I'm really glad I posted the problem, it's forced me to think through the > potential pitfalls and will undoubtedly improve the final results. > I read your post and though "Doh, boy do I feel stupid". It seemed so simple. > Then I started working this out in a spreadsheet to see if it was possible. > It almost immediately became clear that a second relay could possibly be > affected. At first I thought this might be a possible flaw in the design for > unseen future settings. Imagine if, for only a few ns a high voltage was > applied across a low resistance (or a short) linked to an adjacent relay. For > safety, I thought it best if only one relay be changed at a time. > > I may be wrong (I frequently am) but what I found was that you could not use > the wrap-around scheme without possibly effecting two relays simultaneously. > The only way that all other relays, besides the targeted relay, can remain in > the current position is if both sides of the coil are in the same state. With > the wrap around scheme you are possibly forced into affecting one other > relay. Scratch out the binary for this out on paper and see what I mean. I'm > sure I'll hear about this from MANY people if my take is wrong headed. > > Although As I think about this it would seem that I only have to worry about > T/F settings immediately adjacent to the present position. That could be > dealt with in software. I'm beginning to see the beauty in creating a stack > that allows me to define which relays (in the correct order) need to be set > and then unset as I move from one test to the next. I'm tempted to say more > but think that I'd better give this some thought. > > I'm going to take another look at this but what I see right now isn't > encouraging. Let me know if there's a fix for this that I've overlooked. > > -Greg