How to send data (Hello World) from Arduino Uno to a PC using USB to TTL/UART (PL2303 4 wires)? Why do I need to press the reset button to upload a program using PL2303?
2 Answers 2
How to send data(Hello World) from Arduino Uno to PC using USB to TTL/UART(PL2303 4 wires)?
Serial.print("Hello World");
That is, assuming it's connected to pins 0/1. Otherwise you would have to use SoftwareSerial
.
why I need to press the reset button during upload a program using PL2303?
Because it lacks a DTR signal to press the reset button for you (resetting runs the bootloader).
-
Thanks Majenko. I have tried that code and it works when I use normal USB. But when I am trying to upload sketch with PL2303 it doesn't work. I have pressed the reset button manually just before uploading the sketch. I have tried other way.. that is.. I have uploaded the sketch with normal usb and after uploading the sketch I have changed the serial port to Pl2303. but it still not working. I am really getting confused as well as frustrated.Sahed– Sahed2017年10月09日 11:46:06 +00:00Commented Oct 9, 2017 at 11:46
-
How is the PL2303 wired? Why are you trying to upload a sketch using it when you already have a perfectly working USB connection?Majenko– Majenko2017年10月09日 11:46:57 +00:00Commented Oct 9, 2017 at 11:46
-
I have connected arduino rx to pl2303 tx and arduino tx to pl2303 rx and the ground pin. It's a task of mine given by my tutor.Sahed– Sahed2017年10月09日 11:53:52 +00:00Commented Oct 9, 2017 at 11:53
-
Are you powering the board from the normal USB connection? If so you may well find you have to remove that connection and power it from some other source, since the on-board USB to UART interface may well be interfering with what you are trying to do.Majenko– Majenko2017年10月09日 11:55:14 +00:00Commented Oct 9, 2017 at 11:55
-
Ya. I have powered my board with normal USB connection. But before I used the VCC pin of PL2303. But in the datasheet of Pl2303 they warned to not use the VCC pin (exactly don't know why). So I powered the board by normal USB. If I assign the RX/TX on a different pin (other than 0 and 1). It's also not working. But i never tried external voltage source.Sahed– Sahed2017年10月09日 12:03:02 +00:00Commented Oct 9, 2017 at 12:03
I think you have a PL2303 board that do not have DTR or RTS line. It is a signal from Arduino IDE to Arduino Board for reset. So you must press reset button before upload.