Hey! I am currently making a midi controller with my Arduino and wanted to make it standalone. I have made Arduino ATMEGA238 stand-alone projects by themselves and have a USB burner for it (Paolo) although I have never connected a usb to a stand-alone because they’ve never required it. are there certain pins I can connect it to? Is there a certain usb cable I need to buy and strip one side of? Will a scrap usb cable work? Any information helps.
Your PC talks serial over USB, and the ‘328 only talks TTL serial..
It’s necessary using the module to convert the TTL serial into packetised USB for your PC.to see as a virtual COM port.
Beyond that, you’ll need to burn a bootloader, or provide ICSP pins so you can load your program into the chip… remember to expose the RESET pin, so the programming cycle can restart the processor.
Remember you on,y need one single USB-TTL module.
You simply move it between target devices as you’re uploading code or using the serial for configuration.
Or, forget the USB requirement completely and as mentioned, simply burn the hex into the targets using the ICSP programming capability. (You would have developed and debugged on a similar hardware module with aUSB capability… then take that’working code’ (hex file) to your production boards.
I thought the purpose of these were that you were hooking them up to a project? I think you all misunderstood, I should have been more detailed about what I was making.
I am making a midi controller with an Atmega328 Chip. My problem is that for the midi controller to work, it must be hooked up to the computer at all times. But I don't want to use my Arduino Nano and just have it sitting with this project for ever. What would other alternatives be? I assume the only other option would be the USB CH340G.
7$ for 1 CH340G module....That's a bit overpriced for a chinese chip. In India, I'm getting it for around $1-$2 each... You can also get cheap Arduino Nano clones for around $3-$5 each. I think you need to check on Aliexpress-many people order it from there... You can also try the Raspberry Pi pico (4$ Microcontroller board).
Yes Many alternatives are there like CP2102, FT232RL,PL2303 etc.
Just search a bit more and you may get "USB to TTL modules" for cheap enough. I hope you know on how to burn a bootloader into a bare ATMEGA328 chip.
Also you need to download drivers for the CH340G and CP2102, you can do it from here (for the CH340G) and here (For CP2102).
Yes @Snizce you can try this out too. But @david_2018 do we need to burn a Leonardo bootloader into this?
What I know: This is the way of programming microcontrollers without a bootloader through the ICSP interface. You need some sort of cables like this to program. Then you can use one Arduino or a USB AVR programmer like this.
What I don't Know: I have never used that method, don't know how to generate a .hex file from a .ino file (maybe that requires Atmel Studio?). I still use the USB method because it's easy for me.
If you can and that is cheaper for you then nothing's wrong. I never tried making one because buying modules is always cheaper in my country.
The ridiculously obvious solution to your whole absurd question.
Buy a second Nano (clone)!
Would have posted before you but doing research, the Nano prices on Aliexpress seem to have become quite absurd - and the Aliexpress search engine is even more useless than it used to be!
In India , Aliexpress is banned. I just forgot about ebay bcz that also doesn't seem to deliver cheap products from china yet. I just wrote without any research, I agree .
Things have been changing a lot since Wuhan affected us. Back and forth.
I used to get stuff on eBay. Now I only use it for things from here in Australia. Most of the stuff on the slow boat from China has been much cheaper on Aliexpress but the search engine is unbelievably broken.
Specifically, the price of Nanos seems to now be outrageous, but I did then find that one I linked on eBay at a plausible price - and certainly vastly more sensible than mucking around with a "bare bones ATmega328" and adding a USB-serial (not "TTL") module.
By no means whatever was I criticising you for lack of research.
Thank you everyone! I will end up trying one of these FT chips but for the time being I ended up purchasing a pack of AtMega32u4(s) because they’ll be sensed as MIDI Controllers without external software.
Well again, if you insist on buying "raw" chips, you either need to burn a bootloader to match the chip, or provide an ICSP interface for all code uploading.