[Problem] Program an attiny85 with Serial to usb converter and USBasp

Hello,

So today I tried uploading a blinky sketch into my attiny85 so the first thing I did was to get the tiny library to the arduino so I'll have the attiny boards on the software then when I tried programing it with my serial to usb converter like this one:

It did recognize in COM port and when I uploaded the sketch it showed me some code attempts but did'nt get the sketch on the board then I tried it with a USBasp module:

so I had to install a driver for it and after installing it my computer recognized it but not the arduino software and I can't find anything about it on google or youtube.

Does anybody know what is the problem?

Thanks for your time.

Hi and welcome.

It is not at all clear what you have tried to do. I realise English is not your first language, but please try to write in short clear sentences. Also please draw a schematic showing how you have connected everything up. This can be hand drawn and photographed as long as it is neat. If you like to use Fritzing, use the schematic view not the breadboard view. Also post some screen shots showing the settings you have selected in the Arduino IDE.

You cannot use a usb to serial adaptor to upload a sketch to an attiny. You must use the usbasp for uploading the sketch. If you upload a sketch that sends or receives serial data to the pc, you can use the serial to usb adaptor for that once the sketch has been uploaded with the usbasp.

Paul

PaulRB:
Hi and welcome.

It is not at all clear what you have tried to do. I realise English is not your first language, but please try to write in short clear sentences. Also please draw a schematic showing how you have connected everything up. This can be hand drawn and photographed as long as it is neat. If you like to use Fritzing, use the schematic view not the breadboard view. Also post some screen shots showing the settings you have selected in the Arduino IDE.

You cannot use a usb to serial adaptor to upload a sketch to an attiny. You must use the usbasp for uploading the sketch. If you upload a sketch that sends or receives serial data to the pc, you can use the serial to usb adaptor for that once the sketch has been uploaded with the usbasp.

Paul

I connected the USBasp to my micro-controller according to this set up:

and my arduino settings were those:

Tho I'm not sure if my micro-controller is bootloaded.

and sorry for English I'm not used to post problematic situations of mine on forums.

The ATtiny doesn't support a serial bootloader but you DO need to "Burn Bootloader" at least once to set the proper configuration fuses.

Open the sketch you want to upload.
Tools->Board->ATtiny
Tools->Processor->ATtiny85
Tools->Clock->1MHz Internal
Tools->Programmer->USBasp
Tools->Burn Bootloader
File->Upload Using Programmer

You only need to Burn Bootloader again on that chip if you change the Clock setting.

It's been a while since I flashed a tiny (sry, couldn't resist lulz) but I don't remember a burn bootloader step, just ICSP the chip as the MIT High/Low Tech site showed. I thought the ICSP burn set the fuses.

MikeLemon:
I connected the USBasp to my micro-controller according to this set up:

Yes, but how is that connected up to your attiny? Please give a schematic!

Do you have a 10K pullup resistor on the tiny's reset pin for example?

GoForSmoke:
I thought the ICSP burn set the fuses.

No, but in my (limited) experience, attiny seem to leave the factory set for 1MHz, so as long as you set the IDE for that, you probably don't need to burn bootloader first. If you want to run at 8MHz, so that the SoftwareSerial library works for example, then you have to set 8MHz and use burn bootloader first.

They run at 8, Paul. I would notice an 8x slower Blink.

When I did that, my IDE was 0023. I look at the newer page for IDE 1.0 to 1.64 and sure enough there is that Burn Bootloader step.

MIT HIGH-LOW TECH current version.

If you think that life wasn't easier just a few years ago, this is the old page:

MIT HIGH-LOW TECH as of IDE 0022

GoForSmoke:
They run at 8, Paul. I would notice an 8x slower Blink.

When I did that, my IDE was 0023. I look at the newer page for IDE 1.0 to 1.64 and sure enough there is that Burn Bootloader step.

MIT HIGH-LOW TECH current version.

That page you linked to agrees with what I said:

By default, the ATtiny’s run at 1 MHz.

johnwasser:
The ATtiny doesn't support a serial bootloader but you DO need to "Burn Bootloader" at least once to set the proper configuration fuses.

Open the sketch you want to upload.
Tools->Board->ATtiny
Tools->Processor->ATtiny85
Tools->Clock->1MHz Internal
Tools->Programmer->USBasp
Tools->Burn Bootloader
File->Upload Using Programmer

You only need to Burn Bootloader again on that chip if you change the Clock setting.

This is still not my problem I can't even select the com port of the USBasp in "port" but I can see that the PC recognizes it in "Device Manager" as "lib-win32 devices"->"USBasp" when I plug it to the computer.

MikeLemon:
This is still not my problem I can't even select the com port of the USBasp in "port" but I can see that the PC recognizes it in "Device Manager" as "lib-win32 devices"->"USBasp" when I plug it to the computer.

I wish I could help you with the USBasp but.... You can program it with an Arduino and a few parts.

PaulRB:
That page you linked to agrees with what I said:

Yep. That's how it is with IDE 1.0 and since. That is what I would use now.

The other link that you didn't quote, the page that I had used not really long ago has no such step.

MikeLemon:
This is still not my problem. I can't even select the com port of the USBasp in "port" but I can see that the PC recognizes it in "Device Manager" as "lib-win32 devices"->"USBasp" when I plug it to the computer.

Notice that the instructions I provided did NOT say:
Tools->Port->(port for USBasp)
The USBasp does NOT show up as a serial port. The uploader knows how to talk to the USBasp when you tell it to use the USBasp.

What happens when you follow the directions I wrote?

John is right, isp programmers dont appear in port, they are not serial devices. Just select usbasp as programmer and thats it.

johnwasser:
Notice that the instructions I provided did NOT say:
Tools->Port->(port for USBasp)
The USBasp does NOT show up as a serial port. The uploader knows how to talk to the USBasp when you tell it to use the USBasp.

What happens when you follow the directions I wrote?

Well thanks somehow today after uploading a sketch to my attiny through the arduino uno as ISP it managed to work and after switching to the USBasp method the option of selecting a port at the IDE appeared and I was able to upload the sketch.

MikeLemon:
after switching to the USBasp method the option of selecting a port at the IDE appeared and I was able to upload the sketch.

You are still missing the point. When using the USBasp, it does not show up as a port and you don't need to select a port at all.

Yes thanks I got it this topic can be closed now.