Can’t upload program to ATmega16

atmegaavravrdude

I have the same exact problem as in this question, except that I have an ATmega16 microcontroller. But the answer on that question doesn't solve my problem. ie:

The command: avrdude -c avrisp -p m16 results in the following error message:

avrdude: ser_open(): can't set attributes for device "/dev/ttyS0":
    Inappropriate ioctl for device
avrdude done.  Thank you.

I don't whether to ask the question is right but I badly need an answer to this problem.

After connecting the device lsusb, I get the following:

Bus 001 Device 018: ID 16c0:05dc VOTI shared ID for use with libusb

Best Answer

The problem with this is that I had been using USBASP programmer. So instead of

avrdude -c avrisp -p m16

I needed to run the following command

avrdude -c usbasp -p m16
Related Topic