Do you have to reset the registers each time the RF12 starts or are they non-volatile so that the clock frequency will always be 10MHz (or whatever) once set? In my experience, registers like these are usually non-volatile.
Do you have to reset the registers each time the RF12 starts or are they non-volatile so that the clock frequency will always be 10MHz (or whatever) once set? In my experience, registers like these are usually non-volatile.
uchar RGIT=0; unsigned char RGIT = 0
uint temp=0xB800; unsigned int temp = B800 hex
temp|=DATA; temp = temp ORed with the value in DATA
dhouston,
So far the registeres are reset when the power is removed. i.e. everytime I restart the module, the OSC is back to 1MHz.
I did read in one of the datasheets, but I can't find it now, something along the lines of that you have to reset the module after changing settings for them to be stored. Not 100% sure of this right now. But I haven't had any luck attempting it so far.
Bruce,
What do you mean ORed?
I'm struggling to get the over-all picture of what it sends here.
From my understanding.. to actually send data.. I must use the "WriteCMD loop from earlier, to send first $b8, and then another 8bits of data.
Which I have done by...
Now currently there is what I presume is a preamble..Code:WriteFSKbyte: ... temp = $b8 SCK = 0 SDI = 1 nSEL = 1 dout.highbyte = temp dout.lowbyte = dat gosub writecmd
That should actually transmit.... "$AAAA, $2DD4 " ????????Code:dout = $8228 'open PA gosub writecmd pauseus 4 dout = $8238 'something to do with transmit register gosub writecmd pauseus 2 dat = $AA gosub writefskbyte 'send $B8AA gosub writefskbyte 'send $B8AA dat = $2D gosub writefskbyte 'send $B82D dat = $D4 gosub writefskbyte 'send $B8D4
Suffering from severe lack of experience in RF and/or serial transmission, when should I send the pre-amble? Before every transmission?
i.e.
Preamble,
Transmit data, - Several 16bit segments...
Pause
do whatever else..
Preamble
Transmit data
etc??
Don't see anything about that.
Logical OR'ing. It's in the manual, or look it up on Wiki under Boolean logic.What do you mean ORed?
ShiftIn/ShiftOut will work just fine with this chip, no need to reinvent the wheel as you have been doing.I must use the "WriteCMD loop from earlier, to send first $b8, and then another 8bits of data.
I knew I was in above my head, and would do something stupid like try to re-invent the wheel. Oh well, at least I'm learning..
To counter that last statement though, would you believe I took "ORed" as "O-Red" and thought it was some C statement I didn't know about.. Really quite obvious now... stupid me.
I think I will just keep re-inventing the wheel until it's almost as good as the one we got now, then chuck it out and go with the tried and tested. At least by then I might know more about the module, and might have more luck trying the shiftout commands...
Hi davewanna
at the end; what about your project.
Are you satisfied about the RFM12.
I have just ordered some of that modules to make some RF trial; as I'm a novice in RF and SPI interfacing.
I have in plan to use this module with a 16F877 just to make experience before use it on a real project.
After reading the full tread, I have now a gray view of the problem that I will encounter to make the RF connection working. From your experience and your point of view, do you have any helpfull suggestions about PBP and the RFM12 module interfacing?
Ciao
Leo
Leo,
To be honest was never able to reliably transmit data. There were many many errors.
I have since found out a few pieces of information that I have not yet had a chance to try. Firstly, do not use the onboard osc output to run your MCU. Make sure the osc output is switched off. Apparently it creates noise in the transmission.
Also the setup is crucial, there is a lot of trial and error needed to get the settings right.
There is a lot of very valuable information here Most of the code is in C, but there is a forum, and a lot of information related to setup that you will need.
The datasheets will need to be read many many times.
I have some code that uses PBP's SEROUT commands to communicate with the RFM12, and currently it kind of works. I would suggest you try write it yourself, as you will get a much better understanding, but let me know if you really need it. It might even give me the kick I need to have another look at it.
Cheers
Dave
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks