Newer version of Code Needed?

I tried building the nrfUsbSerial.c code, changing the makefile to make MCU = atmega328p, and reprogram the Atmega.

Now, it now longer works. The Stat0 LED flashes indicating an nrFl2401 is found. But, when I send data it, the green LED on FT232 flashes, but the blue STAT leds do not. (

The blue STAT lights DID flash when using the original code as shipped from Spark Fun, but looking at the code it seems like they would only flash when RF data is received, not on the transmit side.

So, now I’m really confused. Is the code posted on the site really what’s really programmed into the device? Are there code changes required for the Atmega328p versus the Atmega168 code that’s posted?

Thanks,

Dave Thomas

I can reprogram the 328p using the Elf file that’s posted along with the source and it works again.

So, I guess that means there’s something I’m doing wrong in the build step to get the ELF file?

Using AVR Studio 4, version 4.18 for the build and programming.

Thanks,

Dave Thomas

Ok, I put the Makefile back to indicate atmega168 instead of 328p and all is good.

And, changing line 128 of nRF_USB2Seria.c to

if(RX_read >= 416) RX_read = 0;

from

if(RX_read >= 512) RX_read = 0;

Eliminated the “freeze” I was seeing every 416 bytes. So, I think that is a bug.

I don’t really understand why the Makefile should have MCU = atmega168 instead of atmega328p (signature of device matches 328p).

Maybe I’ll ask on AVR Freaks…

Thanks,

Dave Thomas