I need help programming an ATMEGA48A

Thank you. I'll give that a try :)
Code:
C:\Users\Konsolkongen\Desktop>"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -c arduino -P COM5 -b 19200 -p m48 -U flash:w:"CDCE9XX_PROGRAMMER_FW_v1.hex"

avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.


avrdude.exe done.  Thank you.
The paths you wrote are correct for me too. The file I want it to program is located on the Desktop, so this should work, right?

EDIT: I have now tried with a second Arduino chip (ATMEGA328) just to be sure. But no change.
I have now tried using the Raspberry Pi as well, and it still doesn't work. WTF?!

So are the AVRs just dead? Both of them? I find that extremely hard to believe.

I have very little experience with this, but I honestly can't see what I'm doing wrong. Everything is wired up correctly.
The only thing I'm unsure about are the fuses in the AVRs, but since no one has mentioned those I assume they are not supposed to be set first, if ever...?

Any further help would be greatly appreciated.

Code:
sudo avrdude -p m48 -C ~/avrdude_gpio.conf -c pi_1 -v -U flash:w:CDCE9XX_PROGRAMMER_FW_v1.hex

avrdude: Version 6.1, compiled on May 29 2015 at 01:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/pi/avrdude_gpio.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : unknown
         Using Programmer              : pi_1
         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 : linuxgpio
         Description     : Use the Linux sysfs interface to bitbang GPIO lines
         Pin assignment  : /sys/class/gpio/gpio{n}
           RESET   =  12
           SCK     =  24
           MOSI    =  23
           MISO    =  18

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.
When i built my programmer i certainly set the fuses first, the FW file comes with a txt telling you which to set.
It can't hurt to try setting them but given it can't even detect the AVR now i doubt it will work.

I'm out of knowledge on this one, if i had to guess i'd say it's a wiring issue.
The wiring to the ISP is correct. But maybe the pcb wiring is bad and the connections are mixed up. I also find that unlikely as many other have used this before me, but I can check this later.

EDIT: Actually, considering that MOSI means Master Out, Slave In and MISO means Master In, Slave Out, could it be that I have to connect MOSI (Arduino) to MISO (target) and MISO (Arduino) to MOSI (target)?

I guess that would make sense >_<
Nope it IS MOSI to MOSI and MISO to MISO. For whatever reason it decided to work now with the Arduino...

Code:
C:\Users\Konsolkongen\Desktop>"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -c arduino -P COM5 -b 19200 -p m48 -U flash:w:"CDCE9XX_PROGRAMMER_FW_v1.hex"

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e9205 (probably m48)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "CDCE9XX_PROGRAMMER_FW_v1.hex"
avrdude.exe: input file CDCE9XX_PROGRAMMER_FW_v1.hex auto detected as Intel Hex
avrdude.exe: writing flash (1158 bytes):

Writing | ################################################## | 100% 1.97s

avrdude.exe: 1158 bytes of flash written
avrdude.exe: verifying flash memory against CDCE9XX_PROGRAMMER_FW_v1.hex:
avrdude.exe: load data flash data from input file CDCE9XX_PROGRAMMER_FW_v1.hex:
avrdude.exe: input file CDCE9XX_PROGRAMMER_FW_v1.hex auto detected as Intel Hex
avrdude.exe: input file CDCE9XX_PROGRAMMER_FW_v1.hex contains 1158 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 1.08s

avrdude.exe: verifying ...
avrdude.exe: 1158 bytes of flash verified

avrdude.exe: safemode: Fuses OK (E:FF, H:DF, L:62)

avrdude.exe done.  Thank you.


C:\Users\Konsolkongen\Desktop>pause
Press any key to continue . . .
EDIT: And the other one programmed fine as well, but I had to use the offset pinheaders on the Arduino. It did not work with the ICSP pins for some reason.

Fused burned fine as well. Glad it worked, but I'm not quite sure where the problem lied :/

Hopefully the programming of the DFSs will go smoothly in comparison :)

Original thread: https://assemblergames.com/threads/i-need-help-programming-an-atmega48a.63566/