<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: RFM12 Tutorial &#8211; Part 3a</title>
	<atom:link href="http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/</link>
	<description>Where Photographer and Geek merge......</description>
	<lastBuildDate>Sun, 18 Dec 2011 11:07:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stephen Eaton</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1165</link>
		<dc:creator>Stephen Eaton</dc:creator>
		<pubDate>Mon, 19 Sep 2011 01:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1165</guid>
		<description>@gnrcampos

The code is commented, and pretty self explantry, as the interrupt of the RFM12B it is a low enable so enabling pullups so no spurios interrupts occur last line is setting up the interrupt edge</description>
		<content:encoded><![CDATA[<p>@gnrcampos</p>
<p>The code is commented, and pretty self explantry, as the interrupt of the RFM12B it is a low enable so enabling pullups so no spurios interrupts occur last line is setting up the interrupt edge</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gnrcampos</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1164</link>
		<dc:creator>gnrcampos</dc:creator>
		<pubDate>Sun, 18 Sep 2011 03:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1164</guid>
		<description>Hello Stephen,

I&#039;ve been trying to use the code you made available and been going through some trouble. I&#039;m using PIC18F4550 and RFM12B on both sides of the (not yet) communication. I&#039;m also using the MPLAB IDE, so I had to make some changes to your code and this may be the reason why it is not working.

I think the first problem to be solved is in the tx side, since the LED is supposed to blink after the transmittion and it is not doing so.

I commented this part of your code in both sides becouse I simply did not know what was it about, can you make it clear for me?

	osccon = 0x70;				// 8Mhz internal OSC
	ansel = 0;					// all is digital i/o on PortA
	option_reg.NOT_RBPU = 0;	// enable pullup resistors on PB
	option_reg.INTEDG = 0;		// falling edge interrupt

I suppose the second line is just to deal with the disable of the analogic functions, but the other ones I don&#039;t have a clue!</description>
		<content:encoded><![CDATA[<p>Hello Stephen,</p>
<p>I&#8217;ve been trying to use the code you made available and been going through some trouble. I&#8217;m using PIC18F4550 and RFM12B on both sides of the (not yet) communication. I&#8217;m also using the MPLAB IDE, so I had to make some changes to your code and this may be the reason why it is not working.</p>
<p>I think the first problem to be solved is in the tx side, since the LED is supposed to blink after the transmittion and it is not doing so.</p>
<p>I commented this part of your code in both sides becouse I simply did not know what was it about, can you make it clear for me?</p>
<p>	osccon = 0&#215;70;				// 8Mhz internal OSC<br />
	ansel = 0;					// all is digital i/o on PortA<br />
	option_reg.NOT_RBPU = 0;	// enable pullup resistors on PB<br />
	option_reg.INTEDG = 0;		// falling edge interrupt</p>
<p>I suppose the second line is just to deal with the disable of the analogic functions, but the other ones I don&#8217;t have a clue!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1159</link>
		<dc:creator>Dirk</dc:creator>
		<pubDate>Wed, 10 Aug 2011 15:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1159</guid>
		<description>Hello Stephen,

Thanks for your quick reply! 
It looks as if I have found the problem for the problem described above. I do not have a module working (i.e. sending and receiving data), but I am now able to get the response I expect when sending the commands controlling the CLK output pin. 

I found a small bug in the  SPI routine: I read the output pin after pulling the clock pin high, reading it before seems to solve the problem. The weird thing is that even with the routine that included the bug it seems was sometimes possible to have communication with the module.

To reply to your questions:
&gt; I think the voltage supply is decent enough: the module does not reset.
&gt; IRQ pin is low before first status read, high afterwards
&gt; Status register only has a high POR bit at first read, in subsequent reads status register is equal to 0.
&gt; Even after writing the problem commands I was able to read the status register...

My next try is to send a bunch of configuration commands and see if I can get some communication between two modules going. Do you have any suggestions for intermediate tests to do, in order to make sure that the modules are configured correctly?

Thanks again for your great tutorial! It has been the most valuable source of information for me in getting this far with the RFM modules!

Cheers,
Dirk</description>
		<content:encoded><![CDATA[<p>Hello Stephen,</p>
<p>Thanks for your quick reply!<br />
It looks as if I have found the problem for the problem described above. I do not have a module working (i.e. sending and receiving data), but I am now able to get the response I expect when sending the commands controlling the CLK output pin. </p>
<p>I found a small bug in the  SPI routine: I read the output pin after pulling the clock pin high, reading it before seems to solve the problem. The weird thing is that even with the routine that included the bug it seems was sometimes possible to have communication with the module.</p>
<p>To reply to your questions:<br />
&gt; I think the voltage supply is decent enough: the module does not reset.<br />
&gt; IRQ pin is low before first status read, high afterwards<br />
&gt; Status register only has a high POR bit at first read, in subsequent reads status register is equal to 0.<br />
&gt; Even after writing the problem commands I was able to read the status register&#8230;</p>
<p>My next try is to send a bunch of configuration commands and see if I can get some communication between two modules going. Do you have any suggestions for intermediate tests to do, in order to make sure that the modules are configured correctly?</p>
<p>Thanks again for your great tutorial! It has been the most valuable source of information for me in getting this far with the RFM modules!</p>
<p>Cheers,<br />
Dirk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Eaton</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1158</link>
		<dc:creator>Stephen Eaton</dc:creator>
		<pubDate>Wed, 10 Aug 2011 12:19:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1158</guid>
		<description>G&#039;day Dirk,

What are your voltage supplies like, reset all tied high?  it&#039;s been a while since I&#039;ve played with these, but something does not sound right.  what is the IRQ status during this?  can you read the status after sending the problem command?

Stephen..</description>
		<content:encoded><![CDATA[<p>G&#8217;day Dirk,</p>
<p>What are your voltage supplies like, reset all tied high?  it&#8217;s been a while since I&#8217;ve played with these, but something does not sound right.  what is the IRQ status during this?  can you read the status after sending the problem command?</p>
<p>Stephen..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1157</link>
		<dc:creator>Dirk</dc:creator>
		<pubDate>Wed, 10 Aug 2011 12:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1157</guid>
		<description>Hi Stephen,

This is really a great tutorial page, thank you for your post. 
At the moment I am trying to get a set of RFM12B (433MHz) up and running. However they do not seem to work as I expect them to work.
In my search I encountered some weird behavior, perhaps you have an explanation for the observed behavior.

My approach so far:
1) make sure SPI is properly working, which it does.
   - sending a status read command results nicely in a POR bit high and rest low
2) change the CLK frequency and monitor the result on a scope
  - it works perfectly, so I am confident that both spi work and that I am able to send commands, and the RFM modules are receiving them and are working.
3) without sending any configuration commands when turning on the chips, steps 1 and 2 work. However, as soon as I send the first configuration command (0x8208, which should be the same as the configuration at startup) nothing changes, but after a status read command (0x0000) the  clock output is disabled (CLK is 0). 
Obviously I also tried to send a (0x8209) with identical result, moreover, sending (0x8209) does not even shutdown the CLK by itself.

Directly after turning the module on, I was able to turn on/off the CLK pin by sending 0x8201 (turn off) and 0x8200 (turn on).  As soon as I send one status read command (0x0000), CLK is dead all the time....

I getting rather desperate now, so any suggestions would be very much appreciated. 

Thanks!
Dirk</description>
		<content:encoded><![CDATA[<p>Hi Stephen,</p>
<p>This is really a great tutorial page, thank you for your post.<br />
At the moment I am trying to get a set of RFM12B (433MHz) up and running. However they do not seem to work as I expect them to work.<br />
In my search I encountered some weird behavior, perhaps you have an explanation for the observed behavior.</p>
<p>My approach so far:<br />
1) make sure SPI is properly working, which it does.<br />
   &#8211; sending a status read command results nicely in a POR bit high and rest low<br />
2) change the CLK frequency and monitor the result on a scope<br />
  &#8211; it works perfectly, so I am confident that both spi work and that I am able to send commands, and the RFM modules are receiving them and are working.<br />
3) without sending any configuration commands when turning on the chips, steps 1 and 2 work. However, as soon as I send the first configuration command (0&#215;8208, which should be the same as the configuration at startup) nothing changes, but after a status read command (0&#215;0000) the  clock output is disabled (CLK is 0).<br />
Obviously I also tried to send a (0&#215;8209) with identical result, moreover, sending (0&#215;8209) does not even shutdown the CLK by itself.</p>
<p>Directly after turning the module on, I was able to turn on/off the CLK pin by sending 0&#215;8201 (turn off) and 0&#215;8200 (turn on).  As soon as I send one status read command (0&#215;0000), CLK is dead all the time&#8230;.</p>
<p>I getting rather desperate now, so any suggestions would be very much appreciated. </p>
<p>Thanks!<br />
Dirk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1156</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 13 Jul 2011 01:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1156</guid>
		<description>Hi,

Have the other parts in this tutorial been uploaded? I am unable to find them (parts 3b and onwards).

J. Alexander</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Have the other parts in this tutorial been uploaded? I am unable to find them (parts 3b and onwards).</p>
<p>J. Alexander</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Eaton</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1153</link>
		<dc:creator>Stephen Eaton</dc:creator>
		<pubDate>Thu, 19 May 2011 06:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1153</guid>
		<description>@John Z

first read the status register and see if there are any interrupts pending, any of the followin will cause the nIRQ to be pulled low  

The TX register is ready to receive the next byte (RGIT)
 The FIFO has received the pre-programmed amount of bits (FFIT)
 Power-on reset (POR)
 FIFO overflow (FFOV) / TX register under run (RGUR)
 Wake-up timer timeout (WKUP)
 Negative pulse on the interrupt input pin nINT (EXT)
 Supply voltage below the pre-0programmed value is detected (LBD)</description>
		<content:encoded><![CDATA[<p>@John Z</p>
<p>first read the status register and see if there are any interrupts pending, any of the followin will cause the nIRQ to be pulled low  </p>
<p>The TX register is ready to receive the next byte (RGIT)<br />
 The FIFO has received the pre-programmed amount of bits (FFIT)<br />
 Power-on reset (POR)<br />
 FIFO overflow (FFOV) / TX register under run (RGUR)<br />
 Wake-up timer timeout (WKUP)<br />
 Negative pulse on the interrupt input pin nINT (EXT)<br />
 Supply voltage below the pre-0programmed value is detected (LBD)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jtz@jtzeng.com</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1152</link>
		<dc:creator>jtz@jtzeng.com</dc:creator>
		<pubDate>Wed, 18 May 2011 21:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1152</guid>
		<description>This project has helped a lot.
Hope there is still help you there.
I have my transmitter working, but I can&#039;t get nIRQ to go high so I can use interrupts.

Which settings affect the nIRQ in TX mode.
John Z.</description>
		<content:encoded><![CDATA[<p>This project has helped a lot.<br />
Hope there is still help you there.<br />
I have my transmitter working, but I can&#8217;t get nIRQ to go high so I can use interrupts.</p>
<p>Which settings affect the nIRQ in TX mode.<br />
John Z.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sophi</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1151</link>
		<dc:creator>Sophi</dc:creator>
		<pubDate>Sun, 06 Mar 2011 00:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1151</guid>
		<description>I just added an LED on/off at the end of the loop. I can see that the data is clocking on the RFM-SDI and I can see the SPI clock too.
So I&#039;m sure that data is going from PIC to RFM.
So my question is still, how do I know the data is then leaving the RFM12B module?
Is there an RFM pin I should look at ?(I&#039;ve looked at them all and don&#039;t know what to see) 
I disconnected the FSK pullup for now since I&#039;m not sure if it should be tied high or low or if it matters.

What dramas! LOL!
Sophi</description>
		<content:encoded><![CDATA[<p>I just added an LED on/off at the end of the loop. I can see that the data is clocking on the RFM-SDI and I can see the SPI clock too.<br />
So I&#8217;m sure that data is going from PIC to RFM.<br />
So my question is still, how do I know the data is then leaving the RFM12B module?<br />
Is there an RFM pin I should look at ?(I&#8217;ve looked at them all and don&#8217;t know what to see)<br />
I disconnected the FSK pullup for now since I&#8217;m not sure if it should be tied high or low or if it matters.</p>
<p>What dramas! LOL!<br />
Sophi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sophi</title>
		<link>http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/comment-page-1/#comment-1150</link>
		<dc:creator>Sophi</dc:creator>
		<pubDate>Sat, 05 Mar 2011 23:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.strobotics.com.au/2009/07/27/rfm12-tutorial-part-3a/#comment-1150</guid>
		<description>Hi Stephen,
Thanks for your reply- the pseudo code is helpful.
My SPI communications is working...I can see the SPI  CLK signal on scope and also I turn off the crystal output on the RFM12B.

I&#039;m using a PIC. 
I do not think I am successfully transmitting.
I do not know how to tell if I am transmitting. I don&#039;t have an RS232 output set up on my board or a spectrum analyzer. I have an oscilloscope which can see a 9600 baud rate CLK signal and SPI data. I also have an LED attached.

1. Besides the FIFO, how else could you be TXing and RXing data? I have tied the FSK/DATA/nFFS pin high based on part 2 of these tutorials. One of the data sheets says it should be tied low for FIFO, but it is not definitive. Hope RF has a schematic showing FSK tied high, but who knows if they are using the FIFO.

2. After the configuration routine, do I need to chip select before and after each byte of data (actual transmit data) that gets sent?
 
3. My problem is now the NIRQ pin. At first it was low all the time, but now I start my configuration code sending 0x0000. Now it is high all the time and I don&#039;t see it go low ever. I have a 4.7k pullup on the NIRQ to 3.3V.

What pin can I look on to see if anything gets transmitted? I think nothing is transmitting since the NIRQ never goes low. Or does the NIRQ move too fast for my oscilloscope (60MHz, but I&#039;m not sure what that really means since I can&#039;t even see my MCU crystal, 20MHz signal on it)
Thank you so much for your help!!
Sophi
Here&#039;s the code (after the config)
output_low(PIN_C0);    // chip select
for (i=0;i&lt;5;i++)
{
while(input(PIN_C1))    // NIRQ is high
{
spi_write(0xAA);        // preamble
spi_write(0xAA);        // preamble
spi_write(0x2D);        // Synchron pattern from power on reset FIFO and Reset Mode command
spi_write(0xD4);        // Synchron pattern from power on reset FIFO and Reset Mode command 
spi_write(0x82);        // turn on TX from Power Management register, first byte
spi_write(0x38);        // turn on TX from Power Management register, second byte
// 13. Transmitter Register Write Command POR B8AA, so need to start every transmission with 0XB8
spi_write(0xB8);        // this command byte is used to write a data byte to the RF12
spi_write(0xF0);        // this information should get transmitted with the previous byte
spi_write(0xAA);        // preamble, clear buffer
spi_write(0xAA);        // preamble, , clear buffer
spi_write(0x82);        // turn off TX from Power Management register, first byte
spi_write(0x11);        // turn off TX from Power Management register, second byte
}
}</description>
		<content:encoded><![CDATA[<p>Hi Stephen,<br />
Thanks for your reply- the pseudo code is helpful.<br />
My SPI communications is working&#8230;I can see the SPI  CLK signal on scope and also I turn off the crystal output on the RFM12B.</p>
<p>I&#8217;m using a PIC.<br />
I do not think I am successfully transmitting.<br />
I do not know how to tell if I am transmitting. I don&#8217;t have an RS232 output set up on my board or a spectrum analyzer. I have an oscilloscope which can see a 9600 baud rate CLK signal and SPI data. I also have an LED attached.</p>
<p>1. Besides the FIFO, how else could you be TXing and RXing data? I have tied the FSK/DATA/nFFS pin high based on part 2 of these tutorials. One of the data sheets says it should be tied low for FIFO, but it is not definitive. Hope RF has a schematic showing FSK tied high, but who knows if they are using the FIFO.</p>
<p>2. After the configuration routine, do I need to chip select before and after each byte of data (actual transmit data) that gets sent?</p>
<p>3. My problem is now the NIRQ pin. At first it was low all the time, but now I start my configuration code sending 0&#215;0000. Now it is high all the time and I don&#8217;t see it go low ever. I have a 4.7k pullup on the NIRQ to 3.3V.</p>
<p>What pin can I look on to see if anything gets transmitted? I think nothing is transmitting since the NIRQ never goes low. Or does the NIRQ move too fast for my oscilloscope (60MHz, but I&#8217;m not sure what that really means since I can&#8217;t even see my MCU crystal, 20MHz signal on it)<br />
Thank you so much for your help!!<br />
Sophi<br />
Here&#8217;s the code (after the config)<br />
output_low(PIN_C0);    // chip select<br />
for (i=0;i&lt;5;i++)<br />
{<br />
while(input(PIN_C1))    // NIRQ is high<br />
{<br />
spi_write(0xAA);        // preamble<br />
spi_write(0xAA);        // preamble<br />
spi_write(0x2D);        // Synchron pattern from power on reset FIFO and Reset Mode command<br />
spi_write(0xD4);        // Synchron pattern from power on reset FIFO and Reset Mode command<br />
spi_write(0&#215;82);        // turn on TX from Power Management register, first byte<br />
spi_write(0&#215;38);        // turn on TX from Power Management register, second byte<br />
// 13. Transmitter Register Write Command POR B8AA, so need to start every transmission with 0XB8<br />
spi_write(0xB8);        // this command byte is used to write a data byte to the RF12<br />
spi_write(0xF0);        // this information should get transmitted with the previous byte<br />
spi_write(0xAA);        // preamble, clear buffer<br />
spi_write(0xAA);        // preamble, , clear buffer<br />
spi_write(0&#215;82);        // turn off TX from Power Management register, first byte<br />
spi_write(0&#215;11);        // turn off TX from Power Management register, second byte<br />
}<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.568 seconds -->

