Author Topic: Serial on PL2303HX  (Read 1449 times)

0 Members and 1 Guest are viewing this topic.

Offline j.a.mcguireTopic starter

  • Contributor
  • Posts: 34
Serial on PL2303HX
« on: January 24, 2016, 10:59:50 pm »
I've begun working with an atmega328, unsuccessfully. I've been unable to get the IDE to communicate with it so I'm unable to get any of my sketches to upload.

Through the process of debugging why this could be, I began testing my serial cable.  I have a USB -> TTL cable powered by a PL2303HX.  If I loop the TX->RX pins together I can get output on a serial console so in general it appears to be working.

I disconnected the loopback in order to test the cable on a scope.

When I scoped out the TX line.  It appeared like the signal was dropping when I entered characters into the serial console, which is what I'd expect.

When I then scoped out the RX line, I was getting a reverse effect, the signal appeared to spike on every key press.

Does anyone with serial experience know if this is normal, or is it likely I have a faulty cable?
« Last Edit: January 24, 2016, 11:06:03 pm by j.a.mcguire »
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: Serial on PL2303HX
« Reply #1 on: January 25, 2016, 07:33:26 pm »
The Rx line should not be driven. Try adding a pullup resistor (idle is high), since it might just be floating there and picking up noise from the transitions on the Tx line.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Serial on PL2303HX
« Reply #2 on: January 27, 2016, 03:20:35 pm »
I've begun working with an atmega328, unsuccessfully. I've been unable to get the IDE to communicate with it so I'm unable to get any of my sketches to upload.
It is a uC that has multiple programming options: ISP, HVPP, dW (factory disabled) and self-programming option that can use any custom protocol with appropriate bootloader.

So for programming you need one of four: ISP programmer or HVPP programmer or dW programmer (which typically can also debug) or a uC flashed via prior 3 interfaces with a bootloader for custom programming interface (these uCs come blank from the factory).

Which one you picked?

Your post suggests you own m328 that you have already flashed with some rs232 bootloader.
What about starting from ISP, blinking LED or hello world, leave bootloader as a second project?
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: Serial on PL2303HX
« Reply #3 on: January 27, 2016, 04:02:39 pm »
I've begun working with an atmega328, unsuccessfully. I've been unable to get the IDE to communicate with it so I'm unable to get any of my sketches to upload.

Through the process of debugging why this could be, I began testing my serial cable.  I have a USB -> TTL cable powered by a PL2303HX.  If I loop the TX->RX pins together I can get output on a serial console so in general it appears to be working.

I disconnected the loopback in order to test the cable on a scope.

When I scoped out the TX line.  It appeared like the signal was dropping when I entered characters into the serial console, which is what I'd expect.

When I then scoped out the RX line, I was getting a reverse effect, the signal appeared to spike on every key press.

Does anyone with serial experience know if this is normal, or is it likely I have a faulty cable?
Sounds like you are talking about Arduino, but you don't say so anywhere.
If that is so, then does your ATmega328 have the Arduino bootloader on it already? An ATmega328 is just an ATmega328 until that bootloader is programmed into it, then it is an Arduino-compatible. To do this, you need an AVR ISP tool. Fortunately, there is a sketch that makes a working Arduino into an ISP tool to program your blank ATmega328. It's like a self-replicating Arduino.  Read and understand https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf