How to connect my avr to the computer with usb cable - avr

I have an avr, but I do not have any sidewall to program it. Is it possible to program an avr with an usb cable without any modules (with four wire available on usb cable)

No it is not possible. You need to program DFU bootlader first.
Many ARM uCs have DFU bootloaders in their ROMs, and IMO it is not worth nowadays to start learning obsolete 8bit architecture

Related

Flashing a Cyclone IV's SROM chip via its JTAG connection

Is there an inbuilt or pre-existing feature I can use to accomplish Flashing a Cyclone IV's(EP4CE6E22C8) SROM(W25Q16BV) chip via its JTAG connection? Maybe some setting when compiling in Quartus to tell the FPGA "Hey flash this". Or a specific command for OpenOCD.
I saw that there are IP cores to manually flash the device, but I really do not want to go down that rabbit hole. Programming my own flasher sounds like an unnessisary hell at my experience level.
I hope this is good enough of a question, Ive been suffering with this for months, if you need any more information
INFO:
I have a W25Q16BV SROM chip connected directlyto a EP4CE6E22C8 in AS config mode. (Data input on SROM has single direct connection to FPGA's ASDO)
And to that FPGA I have a JTAG connection that connects to my computer via a J-Link adapter.
Controlling the J-Link adapter is OpenOCD that uploades compiled data(SVF file) provided by Quartus Prime.
The board is from an obscure seller, but it did come pre-flashed with an example program that starts upon every reset, so there must be some way they uploaded this.

USB Host Controller for DE10-Standard FPGA (Altera Cyclone V SoC)

I'm Looking for a USB Host Control to connect a USB Keyboard and PS gaming controller to control program functionallity (a game) done on FPGA.
I have built a simple game in VHDL on the DE10 platform, currently controllerd using a keboard connected to the PS/2 interface (and a VHDL controller I have found on-line). Looking to expand the gaming control by connecting a USB keyboard and PS gaming controller, but I can't figure out how to build to the USB host controller in VHDL/find an existing one.
Would appriciate to know if there are exiting USB host controllers in VHDL/BSF/BDF formarts I can use to connect USB devices and get decoded information, or am I in over my head.
Thanks!
You are not only far, far in over your head, but any USB interface will need an analogue section which your FPGA does not** have.
I know from experience that USB PHY-only chips are (almost?) impossible to get.
Also where would you run the USB protocol on? And are you planning to write a USB software stack? Unfortunately these things are not that simple.
I would guess the best option would be to make a VHDL UART interface connected to a USB <=> RS323 converter cable and plug that in a PC/Raspberry-Pi or something else with a keyboard.
**There are FPGAs with a USB PHY but they have the USB digital section too, as well as an on-chip processor.

How to connect multiple devices on avr(atmega16/32) using UART?

atmega 32 has only one (TX/RX) .In case of connecting many devices working with UART what should I do?....Arduino has something called software serial
Is it available in atmega 32 or how to establish it?
One may also use a multiplexer if the peripheral devices do not need to operate at the same time. This is a bit trickier to use due to baud rate changes and such but I have used this approach in one of my projects where I had a serial printer and some other devices which interfaced with the MCU via UART. The drivers for the said devices included calls to switch to the correct output on the multiplexer before communicating with the device.

8Mhz Bootloader for Arduino Micro

I have just finished a project using an Arduino Micro dev board and want to move to a standalone ATmega32.
I need to run this at 3.3V and I dont want to go down the overclocking road so I have an 8MHz crystal to put on it.
I still want to be able to upload sketches via USB and the Arduino compiler so I gather I need to burn a different bootloader.
For this purpose I have purchased a USBASP programmer.
I am slightly unsure of what to do next - everything I can find on the topic either relates to the ATmega328 or to burning bootloaders using another Arduino.
I have worked out that I need to modify boards.txt to point to the correct bootloader....but which is the correct bootloader for ATmega32 at 8Mhz?
Also do I need to change any fuses?
Thanks
I think you're a bit out of luck.
The ATmega doesn't have hardware USB, so I assume the bootloader is using V-USB to implement USB. That stack, being a software implementation of USB's high-speed signalling, requires at least a 12 MHz clock (higher is better).
I don't think you can run V-USB using only the internal 8 MHz oscillator.
According to the OP comments the micro is indeed an Atmega32u4, not an Atmega32 (#OP: please fix the question to match this).
Since it has onboard USB, you can use a pre-existing bootloader like the sparkfun one:
https://www.sparkfun.com/products/12587
Here you have the link to one of their products, the Arduino pro micro 3.3V (which runs at 8MHz). You can add the sparkfun arduino boards repository to your IDE and then just use the board specification for their pro micro 3.3V do upload the correct bootloader and to program it through the USB just like the usual Arduino Micro.

Windows PC as a USB slave to emulate a thumbdrive

I need to create a application that will allow a Windows PC (XP/Vista) to emulate a thumbdrive. That is, when the PC is plugged into either another Windows system, or in this case, a piece of hardware that allows for USB thumbdrives to be plugged in, a folder on the computer looks like a giant thumbdrive. Any thoughts on where a guy would start to investigate this?
Update (more specific description):
I need to connect my PC to one of the newer multifuction devices that support scanning to a USB thumbdrive that is inserted into the front of the device. These units do not support WIA or TWAIN via the rear USB connector that you'd typically use for connectivity to a PC.
Most USB controllers in regular pc's dont have the possibility to function as an USB slave. So I'd start with investigating what kind of hardware you're going to use.
Another way to go: there are USB Link cables to link up 2 pc's over USB, maybe that's usable for you?
You cannot do this in an application. At the lowest level, the USB ports on your computer are controlled by an Host Controller Interface. This chip will manage up to 127 slave USB devices. You would need to seriously reprogram this chip before it implements the slave side of the USB protocol. Of course, at that point any USB hub in your PC will break down - those 8 USB ports you probably have are usually implemented by 2 smart USB hubs connecting to both USB1 and USB2 host controllers. Next, your USB keyboard and mouse will stop working.
Take an MCU with two Slave USBs. Write a simple frimware which makes one USB act as a Special Device Class and wait until PC on this USB provides mandatory data (including Device Class, of course) for the other USB. Write a PC program which connects to the Special Device (your MCU), uploads Mass Storage Device Class and redirects I/O to a dedicated partition. The other USB on the MCU will become an emulated Mass Storage Device.
Some of those code can be taken from Linux.

Resources