Homemade arduino troubles

it’s hard to say… before I had discovered the oddity with one of my chip, I would have said the clock/crystal would be the culprit - now I’m not sure though it is the most likely.

how are you uploading the script? what are the fuse settings reported by:

sudo avrdude -c linuxgpio -p atmega328p -v

… on a sidenote I’m using avrdude 6.1, as shipped with Raspbian at this stage, but I can’t imagine that being significant.

er, just noticed in your Fritzing diagram, cathode of LED goes to 3v3 rail on bredboard. It should go to ground right?

yes I edited the post saying that it goes to ground in real life

I am uploading like this.

 make && sudo avrdude -c linuxgpio -p atmega328p -v

and the output from

sudo avrdude -c linuxgpio -p atmega328p -v

is

avrdude: Version 6.2, compiled on Apr  4 2017 at 19:43:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/usr/local/etc/avrdude.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              : linuxgpio
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 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       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           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   =  8
           SCK     =  11
           MOSI    =  10
           MISO    =  9

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD

avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.

you are not specifying a file to upload in your first command. I did notice that the default at my end was named Blinkt.hex btw, rather than blink.hex so you’d need to run something like:

make && sudo avrdude -c linuxgpio -p atmega328p -v -U flash:w:build-uno/Blink.hex:i

if that still does not work, try with enforcing the part and clock in the Makefile:

MCU = atmega328p
F_CPU=16000000L
include /usr/share/arduino/Arduino.mk

Added the lines to the makefile and nothing changed I am starting to think that a broke something whilst soldering. If I get round to it I should be ordering some stuff at easter so I will chuck in the stuff I will need for another go at it.

Just an idea couldn’t this make quite a neat phat I think it could become quite popular and might actually work if you put some caps on it!

1 Like

Oh yes that is well established solution. Completely forgot about it!