Re-programming the Nordic FOB

I’m finally getting around to changing the code for the Nordic FOB, since I need to configure several FOBs to use different RF channels. I want to confirm the code in the FOBs is consistent with the source code posted on the website here:

http://www.sparkfun.com/datasheets/Wire … ic-FOB.zip

But, when I built that code and tried to verify the flash against the hex file from the build, I get a miscompare at address 0x02. Read 0x28 and expected 0x1d.

Looking at the hex files (read from FOB versus built from Sparkfun source), they are not close to being the same.

Maybe this is just because of what I used to build the code (AVR Studio) versus what was used for flashing the FOB. But, I want to confirm I have the right code before doing any further modifications.

Is the source code posted above the code used with the FOBS currently shipping? If not, can I get a copy of that source code, or a description of how it differs?

I also plan to add some delay in the ISR that runs when a button is pressed. Hopefully, this will eliminate the need for debounce code in the receiver.

Also, I’m going to elminate the transmission of the two bytes that are the # of button pushes since the FOB was powered on. That might significantly increase battery life, if power dissipation is dominated by the RF transmission time.

But, I want to take one step at a time, first is just same code except different RF channel

Thanks,

Dave Thomas

This might have been “my bad”.

Just noticed that I didn’t change the device type on the “Main tab” in the AVRISP mkII programming menu.

So, maybe that caused this miscompare.

Unfortunately, I tried programing with the wrong device type, so I can no longer check what was there originally verus what I built. But, the FOB still works, after changing from the original channel 2 to channel 3.

Now I’ll try the debouncing. But I’d still like to confirm what’s posted is the latest revision of the code.

Thanks,

Dave Thomas

Hi Dave,

Yes, the FOB code hasn’t changed recently, so that is in fact the code shipping with the FOBs right now.