Spend $80 on a pocket oscilloscope. (It will save you hundreds of hours of debugging time.)
Compare the signals at various points on the original DFRobot version against your version.
johnwasser:
The DFRobot RS232-to-TTL Converter only converts TXD and RXD. It does not connect DTR to anything. How are you getting a TTL version of the DTR signal to the reset pin of your Arduino through a 100 nF capacitor?
I'm not. I connected the DTR signal from the 9 pin connector directly to reset and it works fine. Of course it is not TTL here. I also did not use a cap.
However, if I take the DTR signal and put it through the MAX232 as in the link and then feed it through the cap it still doesn't work.
So I'm stumped. The only thing I'm thinking is that perhaps one of the other pins on the RS232 connector are grounded in the DFRobot version. CTS? RTS? Do any of them matter to the IDE?
Serial IO is for point-to-point connections only. You can connect Tx and Rx to either USB or to another RS232-to-TTL converter, but not to both at the same time. Eventually you can disable the converter by default (on reset), and activate it only when your code starts executing, in setup().
The meaning of DTR and the other control signals is up to you. The IDE requires that the controller can be reset by the USB DTR, so that a new sketch can be downloaded when required. Your application may or may not require a reset, wakeup or whatsoever, whenever a RS232 device is connected to the Arduino. I.e. you can connect the RS232 control signals to whatever Arduino pin you like, if you want to use them in your code.
Yes, I am aware of these items. If you look through the rest of the thread you can see these have been addressed. So for the sake of not having everyone reread this thread here is the latest info:
I need to connect to the Arduino via an RS232 connectionm. This connection must work exactly like the USB connection allowing access to serial communications and uploading of new programs.
I purchased a DFRobot RS232 to TTL converter and have been able to get this working by connecting up to pin 1 and 2 on the arduino. Soldering a wire from the serial port DTR signal to reset on the Arduino allows me to program the device. All was well.
I then proceeded to build a circuit based on the MAX232 device
I wired it exactly as shown in the link. It will communicate with the serioal port just fine. However it will NOT allow a program to be sent to the board.
I then connected DTR directly to reset as I did in the DFRobot case. It still doesn't work.
So now I am stuck and would appreciate guidance.
Thanks
tomb18:
I purchased a DFRobot RS232 to TTL converter and have been able to get this working by connecting up to pin 1 and 2 on the arduino.
I hope you meant to say Pin 0 and Pin 1.
Oops...Yes, Pin 0 and 1....
Ok a little progress.
I looked at the DFRobot RS232 to TTL circuit with a scope on the DTR pin. When you send a sketch to the Arduino, the DTR pin will show a positive pulse.
So I then reconnected the MAX232 and connected up the scope to the DTR line. It showed a positive pulse and now the programming worked!! Turns out that one row of the prototype board had no contacts!!!
So, with that solved, it was time to route the DTR signal through the MAX232 to get the right level.
Well, it still doesn't work to program the signal but I can tell you that the pulse is inverted. It is now a negative going pulse. So of course this won't work but the question now is why? WHere am I going wrong
?
Thanks
Correction.....the pulse is the same. Both are negative going. However, the output from the MAX232 when it is connected to DTR shows a swing of only 2 volts....not enough.
Solved....a 1K pull down resistor from Reset to ground solves the programming issue.
Pulse is now proper size and all works.
However, this is completely different than what I have read in other threads where a 1K pull up resistor is necessary! i.,e. I connect the cap output (input to reset) to ground via a 1k resistor.
Something is very wrong here. The Arduino typically uses a 10k pull-up on the Reset line. If you put a 1k pull-down on the same line it would drag the 5V down to 0.45V which would force the processor into permanent reset!