"avrdude: ser_open(): can't open device" error, FTD1232 chip

Hello,

I am trying to program a standalone Atmega328P-PU chip using a FTD1232 mini-USB to TTL converter. I have made all of the proper connections, and I keep on getting this error. I have rebuilt my circuit multiple times according to many different tutorials and websites but nothing is working. The circuit I have built is attached below. Can anybody help me?

Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\\.\COM5": Access is denied.


Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
An error occurred while uploading the sketch
Exception in thread "Thread-173" java.util.ConcurrentModificationException
	at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:127)
	at cc.arduino.contributions.libraries.LibrariesIndexer.setLibrariesFolders(LibrariesIndexer.java:106)
	at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:682)
	at processing.app.Base.onBoardOrPortChange(Base.java:1313)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2198)
	at java.lang.Thread.run(Thread.java:748)

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

"Access is denied" error indicates something already has COM5 open.

Make sure COM5 is actually the port of the FTDI. The port should appear after you plug in the USB cable and disappear after you unplug it. Note you need to reopen the Tools > Port menu to refresh it.

If you find that COM5 is the correct port and you don't have any programs open that are using COM5 then restart your computer. Sometimes the COM ports get stuck open.

Hi pert,

I have tried unplugging and plugging the mini USB, and indeed, the com port disappears and reappears, so I think that the computer does recognize the FTDI chip through com port 5. I also tried restarting my computer but the same error is still occurring. Is there any other explanation or solution?

I seem to remember there are certain crappy programs or drivers or whatever that assume any port is their device and open it. You need to disable that program. I don't remember the exact details. Maybe someone else can provide details. After a quick search, the closest I found was this:
https://www.arduino.cc/en/Guide/Troubleshooting#toc7

I checked for those in Task Manager as shown in the page that you linked me, but nothing is running except for the avrdude, the java, and the Arduino builder.

Can anybody please help me? I don’t know what to do, nothing is working...

Are you resetting the chip at the correct point in the upload process ? Do you have the driver for the converter chip ?
Do you have a crystal clock in the 328, it runs at a lower baud rate without . I’ve never actually tried this method as ...

I’ve found it easier to program standalone chips by installing them in an UNO , then I can get the boot loader and sketch I want easily uploaded. Worth doing this any way to check your standalone 328 runs with say blink installed first .

Hi hammy,

I actually tried to do that before I made this circuit, and I used the Blink sketch but the LED wasn’t lighting up.