Microcontroller with 2 way paging application problem


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Should I change my preamble to a different byte such as $66, $66, $66, $66, $bb,... or should I increase the size?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oneohthree View Post
    Should I change my preamble to a different byte such as $66, $66, $66, $66, $bb,... or should I increase the size?
    Preamble byte has to be an equal number of 0's and 1's equally spaced. $66/$BB don't work, not equally spaced.

  3. #3
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Ok, I guess I will keep $55 and $aa. But, I do not understand why my reverse link (315 MHz) works only for some combinations or not at all for other combinations, even though I am sending it 50 times.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oneohthree View Post
    But, I do not understand why my reverse link (315 MHz) works only for some combinations or not at all for other combinations, even though I am sending it 50 times.
    What combo works, and which don't...

  5. #5
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    In the receiver code I posted in post #6 only a code of 1101 works.
    In the receiver code I posted in post #7 1100, 0101, 0100 works but not 1101. In all these cases the forward link (434 MHz) works all the time (in the cases where the first two bits (address) are different I changed the two bits (B0, B1) that are hardcoded in the code so that everything will work) but the reverse link (315 MHz) works only for the combinations I specified above.
    Last edited by oneohthree; - 18th April 2007 at 17:34.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oneohthree View Post
    In the receiver code I posted in post #6 only a code of 1101 works.
    In the receiver code I posted in post #7 1100, 0101, 0100 works but not 1101. In all these cases the forward link (434 MHz) works all the time (in the cases where the first two bits (address) are different I changed the two bits (B0, B1) that are hardcoded in the code so that everything will work) but the reverse link (315 MHz) works only for the combinations I specified above.
    I suspect, in fact I'd bet on, a programming problem, some sort of logic flow problem somewhere. I had a feeling way back when, that all this bit changing was going to cause problems and there had to be an easier way of doing this.
    And again, I'd suggest just sending straight numbers back and forth, rather than changing bits around and the like, 'cause you're writing the program now and everything is clear to you. But what happens when you've let the program go for a couple of months and you come back to it to change something. Might not be so clear then why you did whatever...

  7. #7
    Join Date
    Mar 2007
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Would it be smarter if I just transmit two bits back because I only need the address bits on the other side anyway. That would not involve any bit changing just sending two bits. Also, would there be any reason why the microcontroller would not pick up anything on the other side or do it intermittently even though I am sending the same thing repeatedly? Also, if I were to do that how could, could I just reencode the code that was received and then send only the 4/8 bits that are part of the address, something like: serout PORTB.2, n2400, [ $55, $55, $55, $55, $55, $55, $55, $55, $55, $aa , encode.4, encode.5, encode.6, encode.7 ]?
    Last edited by oneohthree; - 18th April 2007 at 18:20.

Similar Threads

  1. PIC KIT 2 writing problem ?
    By KaanInal in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd January 2010, 12:59
  2. Unusual Interrupts Application Problem
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th May 2009, 11:55
  3. Replies: 7
    Last Post: - 15th December 2008, 05:18
  4. PWM Problem
    By cihhan in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th June 2008, 18:43
  5. Replies: 18
    Last Post: - 24th January 2008, 22:44

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