Should I change my preamble to a different byte such as $66, $66, $66, $66, $bb,... or should I increase the size?
Should I change my preamble to a different byte such as $66, $66, $66, $66, $bb,... or should I increase the size?
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.
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.
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...
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.
Bookmarks