View previous topic :: View next topic |
Author |
Message |
Guest
|
treansmit serially to one pic from another |
Posted: Mon Mar 15, 2004 6:30 am |
|
|
Hello,
i was wondering if anybody can help me, I want to transmlt serially from one 16f877 to another 16f877.
i'm using a wireless 433mhz transmitter and recievor, so i can't use a clock to sync both of them, hat is the easiest way to do it
i dont need it transmitting constantly so i can have soem over head , i was thinking of having it going 10101010 till i need to transmit somthing , then goin 1111, then transmitting.
is thi sthe way to go about it.
bu tthe main questio is how to oupt and rx on them , do i use pins c6 and c7.
with what commands.
thanks, as you can see i clearly don't have a clue and would be grateful of any help |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Mon Mar 15, 2004 8:16 am |
|
|
You really don't have to do anything special for the wireless link. You can write code as if they were conected directly togather. One thing to avoid is to not transmit while recieving unless your wireless link is bi-directional. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Mar 15, 2004 9:26 am |
|
|
One high-end conventional approach is the use Manchester encoding. Then in normal serial fashon you send Stop bits while you are idle. The Manchester encoding converts that to alternating 1s and 0s keeping the data stream active and balanced.
Most PIC applications don't need that level of sophistication though. What you suggested sounds fine. The only thing I know of to watch for is the rate of noise bits you get from your receiver. If you get too many noise bits your software will spend a lot of time trying to work with invalid inputs. Try to use as low a baud rate as you can with lots of analog filtering between the receiver and the UART. Also use as much error detection and correction as you can. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Guest
|
|
Posted: Mon Mar 15, 2004 10:17 am |
|
|
ok guys thanks fo ryou rhelp so far,
but does anyone have an example of how to tx serially and rx serially
it is a somplex system so i can ony tx and rx one way i.e form a to b |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Mar 15, 2004 12:51 pm |
|
|
Anonymous wrote: | ok guys thanks fo ryou rhelp so far,
but does anyone have an example of how to tx serially and rx serially
it is a somplex system so i can ony tx and rx one way i.e form a to b |
There are lots of exapmles of serial communications over wire. That is the easy part. Get that working first, then add your radio link. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|