Skip to content

can't program a blank 328P-AU SMD with internal clock @8mhz with AVRDUDE #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
X3msnake opened this issue Nov 9, 2017 · 9 comments
Closed

Comments

@X3msnake
Copy link

X3msnake commented Nov 9, 2017

The USBASP throws a can't connect error in the IDE and in the avrdude
But I was able to burn the loader with the arduino ISP

You have any idea if this could be because of the usbasp 12mhz clock?

@aleh
Copy link
Owner

aleh commented Nov 9, 2017

Hmm, no idea here. As far as I understand the clock speed should not matter.

@X3msnake
Copy link
Author

X3msnake commented Nov 9, 2017 via email

@X3msnake
Copy link
Author

X3msnake commented Nov 9, 2017

In AVRDUDESS I can do all the things avrdude can either with usbasp or usbasp-clone

I can even upload binaries generated from the arduino IDE

If i try to sent trough the IDE it gives me this if I turn all the debug option on inpreferences;

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

     System wide configuration file is "C:\Users\X3msnake\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

     Using Port                    : usb
     Using Programmer              : usbasp

avrdude: Warning: cannot query manufacturer for device: Input/output error
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done. Thank you.

@aleh
Copy link
Owner

aleh commented Nov 11, 2017

Hey!

I am on a Mac and I've just tried to flash a bootloader and a sketch from the Arduino IDE 1.8.2 and it worked well. My avrdude is similar, though compiled a bit later:

avrdude: Version 6.3, compiled on Sep 17 2016 at 02:19:28

Can you compare the version of avrdude used by the IDE with the one AVRDUDESS uses?

The error you get means that it is unable to access the USB device directly. Maybe the USB library/driver it uses is outdated or something. If you can see the programmer's device in your Device Manager with the same vid/pid/vendor, then perhaps you need to run the IDE as an admin or something like that?

A quick google also suggest that a wrong driver can cause problems: http://forum.arduino.cc/index.php?topic=415210.msg2862244#msg2862244

Aleh

@X3msnake
Copy link
Author

X3msnake commented Nov 13, 2017 via email

@X3msnake
Copy link
Author

So Avrdudess is using Version 6.1, compiled on Mar 13 2014 at 00:09:49
And Arduino IDE is using Version 6.3, compiled on Jan 17 2017 at 12:00:53

@X3msnake
Copy link
Author

X3msnake commented Nov 14, 2017

Solution in the last comments on the post you pointed works

Replaced avrdude.exe and avrdude.conf with avrdudess version
(also works if one dowloads avrdude-6.3-mingw32.zip)

Files I patched

avrdude.exe:

C:\Users%USERNAME%\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9\bin
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\

avrdude.conf

C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\gemma
C:\Users%USERNAME%\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9\etc\avrdude.conf
C:\Program Files (x86)\Arduino\hardware\tools\avr\


But Masters beware that doing this might bring other issues, according to this post one should try changing the driver first.

arduino/avrdude-build-script#1

@aleh
Copy link
Owner

aleh commented Nov 14, 2017

Glad it works now. Thanks for sharing the solution here, will be useful to someone!

@X3msnake
Copy link
Author

X3msnake commented Nov 14, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants