USBasp instead of USBtiny

Hi there!
I' ve recently decided to implement a project found in Instructables: http://www.instructables.com/id/Led-Cube-8x8x8/?ALLSTEPS
It looked very challenging, so I totally committed myself to this project. I succesfully completed the build of the LED Cube, soldered all the components and made all the necessary connections. I quadruple checked the connections adn everything seems allright. My problem is that instead of ordering a USBtiny ISP from eBay, I ordered a USBasp ISP. Nevertheless, I installed the necessary drivers and WinAVR as well. Then, I opened cmd, typed "avrdude" and (as expected) I was given all the AVRdude options. Now, I'm completely baffled. I don't know what to do in order to start programming the ATmega32 chip (keep in mind that instead of ATmega32-16PU, I'm using ATmega32A-PU, but I don't think that this is a problem). Shall I open cmd or another program? What should my first command be? Do I have to include any extra commands, because I'm using USBasp? In which part of the code will the commands [the ones that the publisher of the project's instructions have provided (like test.hex)] be included?
Thank you in advance!

(I' ve also posted this topic to two other categories of the forum. If you think that I should remove it from this category, please let me know)

I don't know the ATmega32A-PU

But if you want to upload using avrdude from the commandline using USBasp, it would be something like this

avrdude -pm328p -P usb -c usbasp -D -U flash:w:test.hex:i

Ofcource you will need another partnumber for your ATmega32A-PU (the -p parameter)

(I' ve also posted this topic to two other categories of the forum. If you think that I should remove it from this category, please let me know)

That is bad, very bad !, don't crosspost

You will find the answer in this post

humorous link removed; other topic deleted

Mark

OK.... I crossposted. Keep in mind that others don't even bother at all when they post a topic again and again. I included a note, so I could remove the topics that weren't in the correct category. Yet, that's not our issue... Erni, your advice seems very helpful! What you suggest is to open the cmd, and type in the specified command? I searched the web and I found that the chip in the Instructable and mine are identical. The partnumber is m32, so the command should look like this: avrdude -pm328p -P usb -c usbasp -D -U flash:w:test.hex:i
Am I right?
Does the text.hex correspond to a file? Should I copy all these commands and create some kind of file? Should I create a folder/directory?

There's been a progress! The only thing I had to change to the commands provided was the usbtiny. I had to make it usbasp! But still, I don't know what's going on with the test.hex. When I type in the command I get:
error opening test.hex: no such file or directory
That obviously means that I have to create the file/directory... How can I do this? Where should I save the file?
Thanks,
Sotos

The partnumber in my example -pm328p is the Atmega328P

and the test.hex was an example HEX file. You obviously has to substitute this with the file you want to opload

So something like this:

avrdude -p m32 -P usb -c usbasp -D -U flash:w:SotosAle.hex:i

Se this tutorial for avrdude
http://www.ladyada.net/learn/avr/avrdude.html

SotosAle:
OK.... I crossposted.

No. Not "OK". Don't do it again.

If you want a thread moved, ask.

Yes, I understood that the test.hex is an example file, but coincidencely the Instructable editor also provides a file like this. It's a test code to find out if there any problems with the wiring. Unfortunately, I couldn't find any helpfull information in your link. This seems important:
-U :r|w|v:[:format]: OK this one is the important command. Its the one that actually does the programming. The is either flash or eeprom (or hfuse, lfuse or efuse for the chip configuration fuses, but we aren't going to mess with those). the r|w|v means you can use r (read) w (write) or v (verify) as the command. The is, well, the file that you want to write to or read from. and [:format] means theres an optional format flag. We will always be using "Intel Hex" format, so use i
So, for example. If you wanted to write the file test.hex to the flash memory, you would use -U flash:w:test.hex:i. If you wanted to read the eeprom memory into the file "eedump.hex" you would use -U eeprom:r:eedump.hex:i

but, yet, I don't get my answer. The cmd can't find the file. When I click on the Instructables page, I'm redirected to this page: http://www.instructables.com/files/orig/FQX/H9M5/GICYB93T/FQXH9M5GICYB93T.tmp
What should I do with this? Copy it and save as a specific file format? Where should I save it in order for the cmd to find it?

The cmd can't find the file

No I understand that, save it somwhere on your computer as test.hex

I did so. Particularly, I saved it on my desktop.

[CORRECTION] What I actually did was to copy all these commands and paste them in notepad. Then I saved the file as test.hex

If it were me I would make a new directory for exaample hexfile.
Then in the command line I would navigate to this directory, and the write the avrdude command. That way you are sure that the file is found.

Lets say that I create a directory (folder apparently) named hexfile on my desktop. How would this command look like: avrdude -pm328p -P usb -c usbasp -D -U flash:w:test.hex:i ?

What I actually did was to copy all these commands and paste them in notepad. Then I saved the file as test.hex

Is this correct?

avrdude -pm328p -P usb -c usbasp -D -U flash:w:test.hex:i ?

-p m328p you mean -p m32 ??

Have you tried it, what was the result?

Yes, what I mean is -p m32. When I try it I get this:

C:\Users???????>avrdude -c usbasp -p m32 -B 1 -U flash:w:test.hex

avrdude: set SCK frequency to 750000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9502
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: set SCK frequency to 750000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: reading input file "test.hex"
avrdude: error opening test.hex: No such file or directory
avrdude: input file test.hex auto detected as invalid format
avrdude: can't open input file test.hex: No such file or directory
avrdude: write to file 'test.hex' failed

avrdude: safemode: Fuses OK

avrdude done. Thank you.

C:\Users???????>avrdude -c usbasp -p m32 -B 1 -U flash:w:test.hex

Did you place the test.hex file in that folder C:\Users???????>

Oh... How stupid am I? Initially I thought it was too obvious to be the solution to my problem! I have wired everything up (except for the cube, which currently not connected), compiled the code and disconnected the PCB from the USBasp. Now, I am using a 5V 3A power supply and the only visual result is the two LEDs on the switch flashing alternately and infinitely. When I press the reset button it starts all over again (as expected), but as long as I press the button everything keeps being switched off (apart from the power LEDs). Also, when I press the switch with the 2 LEDs, it stops flashing and only 1 LED is kept on. According to the code (which I am not yet capable of undestanding) is this the way the circuit should behave? Keep in mind that you don't have to answer if it's too difficult find out whether there's a problem with the circuit or not. I will soon connect the LED cube and I'll let you know if I encounter any kind of issues. Thank you VERY much for your help!