Hi avr_fred,
Thanks for the reply. I have tried as below
-
Enabled Raspberry pi 3 SPI using 'sudo raspi-config' command and rebooted
-
then connected GPIO pins with breadboard atmega328p-pu as below
PI 19 - ATMEGA 19
PI 21 - ATMEGA 18
PI 23 - ATMEGA 17
PI 24 - ATMEGA 1
PI 1 & 6 - for suplying power to the atmega328p-pu
Used 16mhz external crystal oscillator
-
I have followed this instructions for Atmega328p breadboard connections -
https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
Raspberry Pi Tutorial 36 - ATMEGA328P AVR (Arduino) Programming via GPIO (SPI) - YouTube
-
When I run 'avrdude -p m328p -c gpio' this command in raspberry pi. I get below error
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 run 'avrdude -p m328p -c gpio -F'. I get below error
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude done. Thank you.
- I have opened the corresponding avrdude.conf file and searched for 328p. below is the signature
#------------------------------------------------------------
ATmega328P
#------------------------------------------------------------
part
id = "m328p";
desc = "ATMEGA328P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x86;
avr910_devcode = 0x;
signature = 0x1e 0x95 0x0F;
7. I have tried the same with external power (9v battery + used 5v 7805 regulator)
Please let me know where I miss. Thanks in advance.
UPDATED:
- When I run 'avrdude -p m328p -c gpio -v'. I get below output
avrdude: Version 5.10, compiled on Jun 18 2012 at 12:38:29
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/pi/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : unknown
Using Programmer : gpio
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 5 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 : GPIO
Description : Use sysfs interface to bitbang GPIO lines
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.