I've been experimenting using N2400, Should I use SERIN, SEROUT, or SERIN2, SEROUT2, and since I am sending at N2400 driven inverted, what is the difference if I used T2400, OT2400, or ON2400? Does it matter? Thanks again
I've been experimenting using N2400, Should I use SERIN, SEROUT, or SERIN2, SEROUT2, and since I am sending at N2400 driven inverted, what is the difference if I used T2400, OT2400, or ON2400? Does it matter? Thanks again
It matters quite a bit which serial mode you use. Most RF transmitters need logic 0 on the
data input pin during idle periods to supress the RF carrier. A logic 1 turns ON the carrier.
A logic 0 turns it OFF. You want a logic 0 on the data inut during idle periods, so inverted
mode is for sure the way to go.
With PBP, DEBUG compiles to the least amount of code, so if you're not familiar with using
DEBUG, it's worth the effort to learn it.
The OT2400 mode returns the serial output pin to high impedance. I.E. it makes the TX pin
an input just after sending serial data. The T part means TRUE mode, which just means
data is transmitted in non-inverted logic. 1=high, 0=low.
ON2400 transmits in INVERTED mode, and leaves the TX pin as a high impedance input
once data is transmitted. I wouldn't use either of these with RF.
N2400, N9600, etc are best, but DEBUG is still one of the best options since it offers the
same data modifiers SEROUT2 does, but produces tighter code.
Serial communications with RF is really pretty easy once you get the hang of it. One of the
easiest ways is to just send the same data payload several times, compare each packet,
and if one or more doesn't match, just ignore it.
Send a long pulse to start. I.E. a 2mS high going pulse, follow it with a few bytes that are
an equal number of 1's and 0's, a synch byte (you can lock onto this with a WAIT option)
then follow-up with the data payload.
Last edited by Bruce; - 1st August 2008 at 01:39.
Thanks Bruce, I was looking in the manual at debug, and I also want to learn more about INTERRUPT. when I search the forum these keywords bring me other peoples post of their code with those words in there. Would you suggest where I may find more examples of using these? By the way, I sure hope your about done with your book, or at least still working on it, I am looking forward to purchasing a copy. Again, Thanks
Last edited by tazntex; - 2nd August 2008 at 06:41.
Interrupts are not all that difficult, but I do not know of a good list of examples for all that you can do with them and the different types. Melabs web site has some examples.
What do you have in mind to use an interrupt with (type of application) and we can get you started with something basic you can build on.
Dave
Always wear safety glasses while programming.
Bookmarks