Michal1848 wrote: Hello,
I bought a usbasp programmer and I have a problem ..........
I am asking for help because I do not know what to do anymore and I need to program Aruino mega for a 3D printer
You have the above answers from several people, but none of them read your question carefully, so these answers do not add much to your problem.
If you thought about your equipment for a moment, you would come to a correct conclusion:
With any Arduino system, except for the 'pro' version, you can program them directly via the USB cable without the programmer. This was the original goal of the makers of arduino tiles.
The exceptions are truncated 'pro' versions, which do not have a USB / UART converter / adopter, therefore either a programmer is required for them, using the SPI port during programming, as opposed to the programming method through the Rx, Tx port. bootloader in flash programmable processor. Then, however, the programmer is not used either, but a USB-to-TTL Serial Adapter Modul can be used, for example:
https://ae01.alicdn.com/kf/HTB1ZcXWOVXXXXXAaX...le-forArduin-Mini.jpg_200x200.jpg_200x200.jpg or the like.
In addition, all versions of arduino can be programmed by any programmer, after all, they contain AVR processor, which can almost always be programmed through the ICSP port, provided that the programmer is recognized by windows.
If you have an arduino Mega board (your statement shows that you have one), then such a converter is surely installed on the board. It doesn't really matter what "chip" it is built on.
99 percent of these boards are shipped with a bootloader installed, so there is no use of the USBasp programmer.
However, depending on the system used as this converter, it will be required to install the appropriate driver for windows. The driver will be different if there is mega16U2 (a small square chip next to the USB socket), and another one if you have CH340 / 341 there.
Older original versions of the arduino boards may have a built-in FTDI chip.
If it is the first one, you can easily read its model (it will probably be the original atmela chip, and therefore the clone of the board closest to the original version), then the appropriate driver for this board is included in every Arduino IDE pack, but it is not automatically installed. Requires installation with path indication.
However, if the inscription is not readable or missing (cut off), then it should be expected that it is a 'some' clone far from recognizable./ (16-pin oblong chip).
In order to run it, which is almost absolutely necessary in later programming and communication with the host computer, you need to install a driver appropriate for this board (or rather this adapter), so that the board is recognized by windows and the assigned communication port 'com x'

In such a situationmost often it is a CH340 chip or something that imitates it and trying to install this driver may have a positive effect.
https://sparks.gogo.co.nz/assets/_site_/downloads/CH34x_Install_Windows_v3_4.zip Only then can you enter the program from the Arduino IDE level, or the ready batch "* .HEX" by say Xloader.
Naturally, theoretically, the extreme possibility is that a bootloder is also missing. (?!); which I personally doubt very much ....
However, an external programmer will be required to reinstall it ...
It would be advisable to include a picture of this tile.
e marcus