Programming with USB-Serial Converters

Sam just shared a new tutorial: "Programming with USB-Serial Converters"

Thanks to huge advancements in technology over the last decade, the maker community that we know and love has thrived. It’s now easier than ever before to get started with programming and tinkering due to the innovation from brands such as Ardu…

Read more

1 Like

I’m trying to program an Arduino Mega 2560 using an FTDI converter ( but, although I followed these suggestions, I’m not able to upload a sketch, I get the error:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch
What can be this due to?

Thank you in advance

Hi AZ,

I’m not sure what might be causing your issues! Are you able to upload code over USB?

Hi Stephen,
thank you for answering my question.
Yes, I can upload the code using the same pc and arduino, I can’t figure out what’s wrong…
Could you suggest any test or verification to help troubleshooting?

Hi Antonella,

Sorry I’m not sure what the issue might be. Perhaps verify that all the pins are connected properly? If the Arduino is confirmed to work then it seems that the problem lies with your system configuration or the converter itself!

  1. After Plugging in my USB serial converter, the FTDI driver automatically creates a COM port; 2. I go to USB serial controllers and see the same FTDI driver there. Problem is that when I go and install a different driver here for my casio calc CESG502 device: 3. the previously created port in COM/LPT becomes hidden, with message “this hardware device is not connected to the computer. (Code 45)”
1 Like

Hi Paul,

It sounds like an issue with the combination of drivers you have, it could be that both drivers are trying to take control of the same COM port at once.
What operating system were you using?
Is there a newer or older version of the Casio calc CESG502 driver you could try to see if it behaves the same as the one you currently have?

1 Like

What happens if you install the Casio driver first and then the FTDI driver? It is possible that the FTDI driver is flexible about the virtual com port number that it uses, whereas the Casio driver is not.


Do you mean that the installation EXE for the FTDI driver removes the installed Casio Driver, just like the installation of the Casio driver removes the installed FTDA driver?

In that case, it may be possible to set the port manually, depending on the drivers. After you install the Casio driver, go into Control Panel/Device manager, open the virtual COM port and select Port Settings/Advanced. Change the COM port number to something other than the default. Then install the FTDI driver. If that doesn’t work, try it with the drivers installed in the opposite order.

1 Like

I don’t understand the problem. When you plug a device into a USB socket, the operating system interrogates the device and it responds saying what it is. The operating system then loads the appropriate driver if that driver is known. Unplug the device and plug a different one in, a different driver gets loaded. Drivers should not require installing more than once.
If you remove a device while a program is attached to it, then that message could come up. I don’t know how the COM port is allocated when the driver is loaded. I have used a few different USB/serial devices, if they are plugged into different USB ports then they appear as different COM ports. I have succesfully had three USB/serial devices plugged in at the same time, one FTDI and two CH340G and there’s no conflict.
Maybe we need a more detailed description of the problem.

1 Like

plugging in the USB automatically makes the FDTI UART drivers kick in to create the COM updating the casio driver (in controllers) made the FDTI COM hidden

Should they share that port?

No - they cannot share the port. Try changing the port after installing the first driver, as suggested above. Note that one or other of the drivers may not work when the port is changed - that’s probably the Casio, I would be surprised if the FTDI driver was fussy about which port it was assigned to.

1 Like

It looks as though Windows will only recognise the Casio as a USB serial converter in USB serial controllers
It will not allow it to access the USB Serial COM Port

1 Like

This is common. It might look like a serial connection, but it is in fact a proprietary protocol of some sort. Sometimes manufacturers do this because the device requires some special control, but sometimes they do it just to be different.

But what has this got to do with your original problem of one port disappearing when the other is installed?

1 Like

Is this a 64-bit system? A quick look says there is no 64 bit driver for the CESG502 device. What operating system?

1 Like

i needed to clarify that i never get a chance to install the casio as a serial device the fdti allways loads itself and i make the update manually in controllers

1 Like

Why do you need to make the change? If the Casio does not install as a serial device then that suggests that it does not need to be a serial device and therefore it should not conflict with anything in COM/LPT. It seems to me that this change is likely the cause of the problem. Are you trying to use the Casio driver with some device other than the Casio calculator?

1 Like

i made my own comms unit for the casio calculator using USB to TTL Serial Cable FTDI 3.3v and a 3 line stereo plug. The casio comm program is FA-124. I used it to back up my programs once too!

1 Like

Then I would guess this is the source of the problem. WIthout detailed information on what you were trying to do and what you have constructed it is not possible to offer useful advice concerning the problem.

1 Like

turns out i was confusing myself got it going without touching anything