Hi all,
I have a bootloaded smd atmega328P-AU with a sketch already uploaded. I would like to know if the following is enough for the chip to function properly.
VCC/VCC_2/AVCC => +5V
GND/GND_2/GND_3 => battery GND
AREF => nowhere
0.1uF cap => from VCC to GND
all other pins as IO
Is this right ? I have connected the chip like that but when I apply voltage it does not work (simple program with leds).
Thanks in advance,
Alex
I have a bootloaded smd atmega328P-AU with a sketch already uploaded. I would like to know if the following is enough for the chip to function properly.
Was the intent on the chip using the internal RC oscillator; that is, no crystal?
1 Like
Yes I do not want to use an external crystal (no space for that)
1 Like
alex_poupakis:
Yes I do not want to use an external crystal (no space for that)
Then use AVRDUDE to check the fuse settings to make certain that the uC understands what your intents are...
IF you are a Windows users, I have examples of reading and writing using AVRDUDE here.
You can take the settings and then plug them into the AVR Fuse Calculator to determine what settings you are supplying (and which ones you should provide.)
Ray
Example of 328 with internal fuses: http://waihung.net/using-internal-oscillator-on-atmega328p/
You need bypass capacitors on all VCC / GND pairs.
With an FTDI, caps and a crystal
Ok I am definitely sure that the problem is the internal clock !! When I connect a crystal to the atmega everything seems to work. Thank you mrburnette !!
Any ideas as to where I can download the avrdude from ? I found some links but in the comments people say that it deletes the %PATH% enviroment variable and I don't really want that. So any ideas on that ?
Thanks again
AVRDUDE is installed with Arduino... Lives off in C:\Program Files\Arduino <>
You can just CD to that directory and run the command from a command-prompt
In my script, I append the OS PATH variable but the script needs to be edited to match Arduino and Windows version.
Ray
Ok I get this error
avrdude: can't open config file "": Invalid argument
avrdude: error reading system wide configuration file ""
Also in this command avrdude -c usbasp -p m328p -U lfuse:w:0xe2:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
I changed usbasp to the name of the ftdi in the device manager.
avrdude -c USB Serial Converter -p m328p -U lfuse:w:0xe2:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
Use switch -C path_to config_file.
So, wrong path should be. Show command and first of all do not change a fuses but verbose output only (-vv switch). You could a problem if something went wrong.
EDIT: Don't forget a file name.
\arduino-1.0.3\hardware\tools\avr\bin>avrdude -c path_to config_file USB Serial Converter -vv
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is ""
avrdude: can't open config file "": Invalid argument
avrdude: error reading system wide configuration file ""
Try this:
avrdude -c usbasp -C C:\path\avrdude.conf -p m328p -vv
C:\path must be a real path of avrdeude.conf file and also look at -c switch usbasp should there not a some kind of description.
I found the path. Here is the error I am getting
\arduino-1.0.3\hardware\tools\avr\bin>avrdude -c usbasp -C C:\Users\TURBO_X\Desktop\desktop\arduino-1.0.3\hardware\tools\avr\etc -p m328p -vv
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Users\TURBO_X\Desktop\desktop\arduino-1.0.3\hardware\tools\avr\etc"
avrdude: can't open config file "C:\Users\TURBO_X\Desktop\desktop\arduino-1.0.3\ hardware\tools\avr\etc": Permission denied
avrdude: error reading system wide configuration file "C:\Users\TURBO_X\Desktop\desktop\arduino-1.0.3\hardware\tools\avr\etc"
Still missing \avrdude.conf at the end of path string.
Ok that was stupid of me 
I included the filename and I am now getting this
C:\Users\...\arduino-1.0.3\hardware\tools\avr\bin> avrdude -c usbasp -C C:\Users\...\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf -p m328p -vv
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Users\...\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf"
Using Port : lpt1
Using Programmer : usbasp
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
avrdude done. Thank you.
Also if I change usbasp it prints a list of valid programmers
Do you have the USBASP programmer connected? And also check if driver is installed.