Bi-Direction serial communication PC > PIC *16F84A via RWS-434 TWS-434


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    RYTECH, Have you looked at the output from the receiver with no RF being generated? You probably have all kinds of switching going on at the output of the receiver as these types of receivers use a data slicer for comparing the signal strength of the incomming signal. These types of receivers need to have a Sync or Wakeup data stream sent before the actual data to condition the data slicer integrator. During times of no RF reception the integrator is allowed to discharge and is made more sensitive to background noise. If the PC side of the system is allowed to receive this output signal then it will interpret it as random data by the uart. That is why you need to send a stream of 1's and 0's to condition the receiver and then send a preamble pattern then look for the fixed pattern before accepting the received data from the RS232 port. I hope this all makes sense......

    Dave Purola,
    N8NTA

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Do a Google search on

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Do a Google search on Manchester encoding before you go any farther.

    I'm using the same modules you are using and they work great for me, both TX'ing and RX'ing at 9600 baud over 200-300 feet at 5v on the TX and RX using roughly 11 inch wire antennas.

    Send about 5ms worth of 1's and 0's before you do anything with the transmitted data...a $55AA will do to sync up the data slicer on the RX, more if you can spare the time. Then immediately after that send your data.
    This should be manchester encoded, which also happens to double your data payload...2400 baud becomes 1200 baud of actual data sent. 0's become '01' and 1's become '10'. I just use a lookup table to do both the encoding and decoding conversion...simple enough and avoids any complex logic at both ends. And don't wait between characters. With those modules, the data slicer begins to discharge itself after a couple of milliseconds. If you pause the data stream, the data slicer will lose it's mind and you'll have to send more sync-bytes. Check out www.laipac.com for a bit more in-depth information on those type modules.

    More advise from me that may work for you (or not, who knows), switch over to 4800 baud, maybe 9600 if it ends up working (I've had 19,200 baud working intermittently at 200 feet). With the 4800 or 9600 baud rate, you can send more sync-bytes ($55AA) to help set up the receiver.

    JDG

  4. #4
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Im satisfied for now with the N1200, it seems to get my data over fast enough, however i'm trying to make my outgoing to PC from intermediate receiver PIC provide a "fixed length string" when it transmits its data (decimal) values to the PC. But this is quite hard cause i cant seem to figure out how to count the lenth of my outgoing string, which varies slightly with larger byte values. I want to make my input string a fixed length in vb i think it make parsing alot simpler as sometimes the entire "stream" is not received. sometimes a string will be chopped up or the beginning is with the end of another transmission etc... i think it will simplify this "push" and "poll" method i seem to be working.

    actually im not even polling now its using vb comm controls event received "OnComm" for the input data.

Similar Threads

  1. Interrupt and Serial communication to PC.
    By obaskirt in forum mel PIC BASIC
    Replies: 2
    Last Post: - 17th June 2005, 20:01
  2. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  3. Pic To Pic Serial Communication?
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 5th February 2005, 00:59
  4. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 15:45
  5. PIC to PIC Serial Communication
    By v_merino in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd July 2004, 07:05

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts