serial com with mega 2560

hi i have some problems to establish the communication between my computer an my device. i'm using the serial port 0 with a db9/usb converter. can someone help me please???

Why are you using this converter and do you have a link to it?

I need to plug it to my computer with a db9 wire and i need to establish the communication with the serial port. I want to use my computer to control my device by using the com port of my computer

You might want to ckeck the voltage leves are compatible.

From what I remember, from a long time ago, RS232C (DB9) logic is +5V to +15V = false, -5 to -15V = true. A minimum of 10V between logic low and logic high.

The Mega and Uno use TTL levels which is 5V between logic high and logic low. USB port logic goes aslo

The easiest option would be to buy an RS232/FTDI cable, I should think.

MattS-UK: RS232C (DB9) logic is +5V to +15V = false, -5 to -15V = true.

Very close... +3 to +15V and -3 to -15V.

It is quite common for PCs to use -12 and +12.

You could try to use the db9/usb converter with a different device than arduino ( mouse/keyboard /printer ) to see, if it works correct. If thats the case, we could look further into your arduino-driver Installation. Does the arduino show up in your device-manager?

Hi,

You don't actually need a converter to use Serial Port 0. The Mega has a built-in serial to USB converter and creates a "virtrual COM port" on your PC. This is the same COM port that's used to program the device from the IDE. All you need to do is use the Arduino IDE's serial console or alternatively a 3rd party console such as Putty.exe (just Google it).

Maybe his PC doesn't have USB?

@alex23 How do you provide power to the arduino? Does the db9 converter feed the arduino? Or do you need a seperate powersupply?

i'm doing this because at the end i will need to plug my arduino mega to a PLC by a serial port

i use a separate power supply but the usb/db9 convertrer is only used for testing the serial com but at the end I will plug it to a PLC