Programming an atmega48v-10 AU using an arduino UNO

hi, I'm trying to use this board to save space in my wireless project.

I'm following this tutorial, using an arduino UNO as ISP programmer but I don't know how to set arduino IDE to burn the bootloader and the sketch....

any help?

tnk

Mauro

Follow the instructions here:

tnks to pointing me!!

my settings:

Arduino IDE 1.8.5

board: atmega48
bootloader:NO
clock: 16 mhz external
compilier LTO: disabled
variant: 48/48A
BOD: disabled
port: arduino uno

programmer: arduino as ISP

when, for fuse reason, I try to burn the bootloader this is the error:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/cepics/Library/Arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
         User configuration file is "/Users/cepics/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodemFD121
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega48
         Chip Erase delay              : 45000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no        256    4      0  3600  3600 0xff 0xff
           flash         65     6    64    0 yes      4096   64     64  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

and this is the error when trying to upload blink sketch:

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

An error occurred while uploading the sketch

tips?

tnks a lot

Screenshot 2018-10-13 19.02.00.png

my wiring:

arduino uno >>>>>>> ATmega48 + NRFL2401
(programmer) (to program)

D11 >>>>>>>>>>>>>>> MOSI
D12 >>>>>>>>>>>>>>>> MISO
D13 >>>>>>>>>>>>>>> SCK
D10 >>>>>>>>>>>>>>>> RESET
GRD >>>>>>>>>>>>>>>> GRD
5V >>>>>>>>>>>>>>>> 5V

I'm using the arduino as isp sketch on the example folder whitout modification...

but when I try to upload a sketch on ATmega48 + NRFL2401 board, this is the IDE output:

Arduino: 1.8.5 (Mac OS X), Board: "ATmega48, No, 48P / 48PA, Disabled, Disabled (default), 16 MHz external"

Sketch uses 382 bytes (9%) of program storage space. Maximum is 4096 bytes.
Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

tips?

I think on this chip there is already a program for the communication NRF<->Arduino through I2C
Are you sure you can program this chip ?

nid69ita:
I think on this chip there is already a program for the communication NRF<->Arduino through I2C
Are you sure you can program this chip ?

Yes, the processor was delivered pre-programmed with an SPI to I2C converter (source unknown).

While it should theoretically possible to reflash the device, the first thing the OP needs to understand is that the board does not contain a crystal so the selection of 16 MHz external will not work. The internal 8MHz option is the correct (and only) choice for that board. But, that’s not what is preventing the programming.

The invalid device signature is most likely a wiring error. The text based description isn’t at all adequate to provide the detail needed. Could you please post a photo clearly showing the connections between the two boards?

Edit: disregard the picture request. You do have the NRF24 module removed when programming, correct?

Found the schematic online:

https://robotdyn.com/pub/media/0G-00005364==Mod-SPI-I2C-NRF24/DOCS/Schematic==0G-00005364==Mod-SPI-I2C-NRF24.pdf

I tried programing a duplicate board I had lying about and was unsuccessful, same result as you. I also tried removing C6 but this failed as well. Not sure what to do next, out of time for now.

If you did a Burn Bootloader with Tools > Clock set to an external clock and there is no external clock connected to the ATmega48 then you bricked the ATmega48. You will need to connect an external clock source to the ATmega48 long enough to do another Burn Bootloader with an internal clock selected.