RS 485 wireless communication


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Don't laugh but I'm not sure about how a data slicer functions.....I do have a squelch circuit that controls an analog switch that I will "assume" is a "data slicer" (pass--no pass?). ??

    I have 2 qualifiers in my serin statement and then 2 data bytes that follow.

    What seems to be happening is I have a sequence at the very START of the program, that shouldn't function unless a switch is pressed.

    It is going through the routine at the rcvr end anyway and the only thing I can figure out is that rather than the data being zero, there is a bit in there that is noise?
    SERIN PORTA.4, N1200, [QUALIFIER,QUALIFIER],DATA1,DATA2
    IF DATA1 + DATA2 = 0 THEN....

    But if I have 2 bytes of qualifier that are working fine everywhere else in the program, why aren't they corrupt as well?

    I'm a novice programmer....I'm also out to lunch on "timeout"
    and was wondering if I'm missing something there.

    Everything works great when it's wired.

    I simply have the serout statement in the xmtr pic and the serin on the rcvr
    and sometimes (but rarely) they can get out of sequence....I have led's on the xmtr and rcvr that should be in unison.

    When they do get out of sequence, it usually just takes a second or so for everything to fall in line...so I never cared.

    Am I doing something wrong here? I always wondered about the coordination between the two.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    On wire everything is quite clear (hmm, not always, but anyway...).

    But radiofrequency is another matter. The receiver has analog circuits that produce a analog replica of the pulses you transmit. If you want a pulse at the output of the receiver, then either you will connect a schmitt trigger or a more clever circuit called data slicer. The first will work only if the signal is at a standard level. The second will adjust the trigger level according to the signal strength. So if you are near the receiver (strong signal) the trigger level will be higher. If you move away from the receiver (weak signal) then the trigger level will fall. But not immediatly. There is a time constant (that's where the preamble is needed-to find the correct level).

    There is no need to deal with squeltch or analog outputs of receivers since there are all the circuits included. Just connect your PIC at the data output of the receiver.

    Also your bytes should not be a train of 1's or 0's because again in this case data slicer cannot be set correctly. So you need also a manchester encoding scheme. (See: http://www.picbasic.co.uk/forum/show...79&postcount=6 and also: http://www.picbasic.co.uk/forum/show...77&postcount=4 )

    All these have been discussed in the forum.

    It is a good practice to send a series of 4-5 $55 which is 01010101 in binary as preamble and after this a manchester encoded data bytes.

    I would suggest also a CRC at the end if you can, to ensure data integrity.

    Ioannis
    Last edited by Ioannis; - 25th January 2006 at 20:58.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    So manchester encoding is sort of the opposite of compression? More bits to represent the same thing?

    I actually have a non inverted schmitt trigger buffer at the LINX rcvr output..(2 sections of a 4093) and using porta.4....the schmitt trigger input.

    I'll get it working someday.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Use a scope and see the level of the receiver output. Should be rect pulses of almost 5 volt high. No matter if it is noise pulses or data. If you see this then you are on good road. No schmitt trigger is needed. All necessary electronics are within the receiver module.

    Try this:

    On the Txer send with serout or serout2 the array $55,$55,$55,$AA,$55

    On the Rxer wait with the serin for a $AA and get the next byte. In our case this is $55.

    I am sure if you have electrically everything by the book, you will get that byte received OK.

    On the example if you check the bytes you will see that there is no continues
    train of 1's or 0's. So no DC bias is created internally in the Rxer. That's the idea. Please do a search on the topic, it is cover fully here on this forum and on the mailing list archives of http://list.picbasic.com/cgi-bin/board-search.cgi

    Ioannis

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 04:49
  2. Simple Wireless Communication
    By jhorsburgh in forum General
    Replies: 6
    Last Post: - 27th March 2008, 12:02
  3. Replies: 2
    Last Post: - 29th September 2007, 07:49
  4. RS 485 using 16F84A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2005, 15:46
  5. Wireless communication gear.
    By toalan in forum Off Topic
    Replies: 5
    Last Post: - 17th March 2005, 17:33

Members who have read this thread : 1

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