Quote Originally Posted by oneohthree View Post
This is a part of the 2 way paging system that I am doing for a project. Basically what I am trying to do is take 4 bits from the transmitter that I get at the receiver end and do some operations on it. I am assuming that the first two bits are the address and the last two bits are the mode. There are two modes tracking and finding. In each case, I am first checking the last two bits to see which mode it is. After I do that, I am checking if the first two bits of address matches. If the address matches, it will change the third bit (kind of like an acknowledgement) and output the result somewhere. If it does not match it will not change the code and output it back. In the find mode, it does the same thing except it will make a pin high in order to set off an alert like a LED. Is this making any sense?
Ok, that makes a bit more sense....
A bit (pun intended) simpler, maybe????......
Take a sent byte...invert it and send it back as some sort of acknowledge.
For instance: (using 4 bits, $5, $A, $0, $F, are already taken, so can't use those)
Send $1, return $E, acknowledged
Send $2, return $D, and so on...
Anything else returned would be 'not' acknowledged...
Leaves you with $1,2,3,4,6,7 for send codes ($E,D,C,B,9,8 for returned codes).... if 6 codes is enough for you...
That way you could set the 'address' for each pager/receiver with 3 DIP switches (with 2 unused combo's)...