> >im planning to use a continuos loop in the transmitter, so it would send >the byte over and over again, and the transmitter would catch the byte and >do whatever it has activated. > >but how do i make the receiver recognize the start bit and stop bit???? > Basically, the receiver sits waiting for a (say) falling edge. That indicates the start bit, and thereafter the receiver samples the input port periodically for the length of time to grab one byte. If the last bit (where the stop bit should be) is received as high, then you (may) have a good byte - otherwise your receiver was triggered by a glitch, or in the middle of a byte. As long as the transmitter pauses occasionally, for longer than one byte's transmission time, the receiver will finish its sequence and be in a state of looking for the start bit's falling edge. So the next falling edge from the transmitter (start bit) will be picked up as such by the receiver, and the two will be in synch. Actually, you probably ought to consider a bit-level coding scheme, such as Manchester coding. To transmit a 1 bit you send 10, and to transmit a 0 bit, you send 01. So the byte 11011011 goes out as 1010011010011010. It halves the data rate, but you can pick up errors much more easily. Obviously, if the receiver gets more than two 1's or 0's in a row, there's an error. Then you can deliberately transmit an 'illegal' signal -such as 11110000 - which causes an error in the receiver and allows you to reset. You know the data that follows is the start of a new byte. And you can easily tell the difference between 'line-idle' and 'line-dead'. The former gives you ...0101010101010.... and the latter probably all sorts of random stuff. There are other advantages to this kind of coding, too - some communications channels don't like long strings of 000's or 111's, because they drift off frequency (or whatever). So you may _need_ to use some kind of coding system. If you just want to start off with a simple serial link (no coding) you can use the UART on the '84 as the receiver, and write a simple bit-bashing routing on the '71 as a transmitter. It's simpler to write transmitter code from scratch than receiver. The UART in the PIC will sort out all the start and stop bits, as long as you transmit them right. Don't forget to include lots of redundancy in the codes - transmit each nibble at least twice, and compare them. Good Luck Alec __________________________________________________________________________ ________ W5 Ltd. / ______/ ______ ______ _ / /___ 33 Sneath Avenue \ \ / \ / /____ \ London NW11 9AJ \ \ / \ / __ / / United Kingdom \ \ / \ / / /_/ / \ \/ /\ \/ \_____/ Telephone +44 181 922 7778 \ / \ / Fax +44 976 650 110 \ / \ / eMail mail@W5.co.uk \______/ \_______/ Technology * Innovation * Design * Solutions __________________________________________________________________________