Transmission works with wires but not always with wireless


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jyi1 View Post
    I am using the Laipac 315 modules and I serout only once and it works with wires 100% of the time. When I try wireless it works once in a while. On the other hand, when I serout 5 times the wireless works most of the time but does not work once in a while. I have add 4 $55 for a preamble and manchester encoded everything.
    But yet we don't see any code to base an opinion on what could possibly be wrong!

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    skimask,

    Not all solutions require the persons code to solve the problem.

    If you've used a "Laipac 315" before, then maybe you've noticed something that might apply.

    He's made a very specific request, and shouldn't expect an answer for quite some time. Hopefully from someone that's tried that device before.

    You're indignant response only 1 minute after his post, does not help.
    <br>
    DT

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    skimask, Not all solutions require the persons code to solve the problem. If you've used a "Laipac 315" before, then maybe you've noticed something that might apply. He's made a very specific request, and shouldn't expect an answer for quite some time. Hopefully from someone that's tried that device before. You're indignant response only 1 minute after his post, does not help. <br>
    True...but if the guy has the code in the first place, why not hasten the process and post it straight away!

    And tell me that this thread/code and this one
    http://www.picbasic.co.uk/forum/showthread.php?t=6145
    don't look very similar...too similar...not that there's anything wrong with that. I mean, at least the guy (whether it be the same guy as the other thread or actually a new guy) searched the forum's and found some usable code instead asking for somebody else to write it all.
    And no, I don't think everything is a conspiracy...or is it?

  4. #4
    Join Date
    Apr 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Transceiver

    Include "Modedefs.bas"

    ct55 var byte: encoded1 var byte: p var byte: counter var byte: e var byte: action var byte:
    encoded var byte: encoded2 var byte: action2 var byte: B0 var bit: B1 var bit: B0=1: B1=0:
    p=0: e=0: encoded1=0: counter = 0: action=0: action2=0: encoded=0: encoded2=0:

    Main:

    Clr:
    p=0: e=0: encoded1=0: action=0: action2=0: encoded=0: encoded2=0

    Maina:
    ct55=0 'counter for $55 is zero

    Wait55:
    serin PORTB.0, n2400, encoded1
    If encoded1 = $55 Then
    ct55 = ct55 + 1
    If ct55 = 4 Then goto Waitaa
    Else
    goto Maina
    Endif
    goto Wait55

    Waitaa:
    serin PORTB.0, n2400, encoded1
    If encoded1 <> $aa Then goto Maina
    serin PORTB.0, n2400, encoded1
    write 0, encoded1

    For counter = 0 to 3 : p.0[counter] = encoded1.0[counter*2]:Next counter
    write 1,p

    e = p:
    If ((e.3=B0) and (e.2=B1)) Then
    goto L3
    Else
    write 2, p
    goto Clr
    Endif

    L3:
    If((p.1=0) and (p.0=0)) Then
    action=%1010
    write 3, p
    For counter = 0 to 3
    If action.0[counter]=0 Then
    encoded.0[counter*2]=0 : encoded.0[counter*2+1]=1
    Else
    encoded.0[counter*2]=1 : encoded.0[counter*2+1]=0
    Endif
    Next counter:
    write 8, encoded
    For counter = 0 to 4
    serout PORTB.7, n2400, [$55,$55,$55,$55,$aa, encoded]
    Next counter
    goto Clr


    Endif

    If ((p.1=0) and (p.0=1)) Then
    action2 = %1011
    write 4, p
    For counter = 0 to 3
    If action2.0[counter]=0 Then
    encoded2.0[counter*2] = 0: encoded2.0[counter*2+1] = 1
    Else
    encoded2.0[counter*2] = 1: encoded2.0[counter*2+1] = 0
    Endif
    Next counter:
    write 9, encoded2
    For counter = 0 to 4
    serout PORTB.7, n2400, [$55,$55, $55, $55,$aa, encoded2]
    Next counter
    goto Clr

    Endif
    End

    Receiver

    Include "Modedefs.bas"
    cot55 var byte: encoded1 var byte: p var byte: counter var byte: e var byte:
    p = 0: e = 0: encoded1 = 0: counter = 0:

    Main:


    Mainb:
    cot55=0 'counter for $55 is zero

    Wait55:
    serin PORTB.0, n2400, encoded1
    If encoded1 = $55 Then cot55 = cot55 + 1
    If cot55 = 4 Then
    goto Waitaa
    Else
    goto Wait55
    Endif
    'goto Wait55

    Waitaa:
    serin PORTB.0, n2400, encoded1
    If encoded1 <> $aa Then goto Maina
    serin PORTB.0, n2400, encoded1
    write 0, encoded1

    For counter = 0 to 3 : p.0[counter] = encoded1.0[counter*2]: Next counter
    write 1,p

    If (p.1=1) Then
    goto B4
    Else
    write 2,p
    High 2
    Pause 1000
    Low 2
    goto Mainb
    Endif

    B4:
    e = p
    write 3, e
    High 1
    Pause 1000
    Low 1
    High 5
    serout PORTB.3, n2400, [e.3]
    serout PORTB.4, n2400, [e.2]
    goto Mainb

    End
    Last edited by jyi1; - 24th April 2007 at 06:46.

Similar Threads

  1. Wireless Tachometer - Design Help
    By DanPBP in forum Off Topic
    Replies: 2
    Last Post: - 3rd May 2009, 10:06
  2. RS485 Vs Wireless (TWS-434A)
    By koossa in forum Off Topic
    Replies: 3
    Last Post: - 11th April 2009, 13:40
  3. Serial Wireless
    By mackrackit in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th May 2007, 17:06
  4. Serial comm - are 2 wires for TX only enough?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 30th August 2006, 04:23
  5. RS 485 wireless communication
    By Armadus in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th January 2006, 20:30

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