PL2303, any decent documentation ? app notes ? anything ?

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey everyone,

I'm planing on connecting an AVR to usb using PL2303.
Since the datasheet is seriously lacking in information I tried searching for application note but couldn't find anything.

The only thing I managed to find was this schematic.

-Some of the pins in this schematic don't match the pins in the datasheet though.
For example, the PLL supply voltage is not connected in the schematic.

-Also I'm trying to figure out why R1 pulls up the D+ line to 3v and not 5v.
It also seems that pin (number 17) is a 3v3 power pin, do I need to supply it 3v3 too ?
I'm so confused.

-How do I set the speed and data format ? I don't see any option for that in the config eeprom.

Is there any decent source of information about this chip ? Any app notes or anything ?

I have searched this forum, but couldn't find anything more than the schematic above.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely you just connect the PL2303 according to the schematic and the job is done. If you don't like thinking, simply copy an existing pcb that runs at 5V.

The AVR side connects to RXD, TXD and any other handshake signals that you want / need. e.g. RTS, DTR, ...

The USB side connects to your USB host. Commonly a PC. This has the necessary Prolific drivers.

From your AVR application point of view, you just program the USART as normal. i.e. baudrate, parity, flow-control.

The AVR application will not know or care whether you have MAX232, FTDI, SiLabs, Prolific, Microchip or any other chip.

Regarding R1 and 3.3V. This is just the USB spec.
Most systems will be 3.3V anyway. The GPIO is 5V tolerant.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The schematic above doesn't seem to have the PLL voltage supply connected to anything, I kind of doubt it would work that way.

I'm more worried about the PL2303 configuration point of view, how do I set it to a specific speed and format setting (parity,length and so on) ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm more worried about the PL2303 configuration point of view, how do I set it to a specific speed and format setting (parity,length and so on) ?

Surely the Prolific/generic Windows/Linux serial driver hides this from you. You just open the COM port and then use the handle to set things like baud (Windows) or do termio (Linux) and your settings are passed via the driver to the device.

As far as the AVR goes you just set UBRR and UCSRC or whatever to the parameters you plan to use.

Although it's more expensive I'd start by prototyping an FT232R. Get a feel for "what goes where" (you will get far more information and help from Scotland than Taiwan!) and when you are ready to make the "cost down" leap then replace with PL2303. At this point you'll probably be familiar with the general concepts and be able to see how their device differs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh yeah, it makes sense. I though I would have to configure the chip from the avr, but configuring it from the pc driver makes much more sense.

pl2303 is so cheap and I have plenty of time to try and figure out how to get it to work.

After some more searching around the web I have found an updated datasheet. This one seems to match the part in the schematic.

Which raises another question.
According to this new updated datasheet, pin 4 is the supply for the serial port. Data sheet states:

Quote:
RS232 VDD. The power pins for the serial port signals.
When the serial port is 3.3V, this should be 3.3V. When
the serial port is 2.5V, this should be 2.5V.

So according to the datasheet I gotta hook it up to 3v3 and have a level converter 3v3 -> 5v to the avr (assuming the avr running 5v).
Seems like the RX pin on the PL2303 is 5v tolerant.

The schematic seems to connect this supply pin to VCC_USB or VCC, so is it 5v tolerant ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

pl2303 is so cheap and I have plenty of time to try and figure out how to get it to work.

Consider this - about 95% of the $2-$3 USB-RS232 cables you can buy on ebay are PL2303 based so you can start to get a feel about how they operate simply by buying a handful of cables on ebay.

Of course those cables consist of a PL2303 and some kind of MAX232 compatible which then forces you to also put a MAX232 to match on your AVR board. If you were feeling brave you could break open a device (again they only cost $2..$3) and see if you could circumvent the "MAX232" to make a direct PL2303 to AVR connection.

FTDI already sell cables (quite expensively though) which are basically this so instead of USB-RS232 they are USB-TTL/Uart

Oh and while we're here there is a 3rd player in this game - you may previously have PICd one of their microcontrollers to use ;-) (MCP2200).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I like what you did there, pun and all.

I came across another helpful document, this time it's a migration guide which explains the difference between all the different pl-2303.
Seems like pl2303HX serial output is 3v3 so I would need to shift it to 5v for the avr.

I was going to get this chip from eBay (link)
Question is which rev is that ? I would assume A since it doesn't say anything about it.

Last Edited: Fri. Jun 29, 2012 - 05:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A typical schematic. This happens to be for a Chinese 8051 board. PL2303 is at bottom left hand corner.

The board runs at 5V i.e. USB powered.
The D+ pull-up goes to the VO33 pin of the PL2303. i.e. the PL2303's internal 3.3V regulator is only used for this purpose.

Most USB chips contain an internal 3.3V regulator. You can't take a large amount of power, but mainly used for voltage pull-up or reference.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, according to the datasheet you can draw up to 100mA from it.

Now I wonder how can I identify which revision of PL-2303HX they sell on that ebay link.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ItsMike wrote:
The schematic seems to connect this supply pin to VCC_USB or VCC, so is it 5v tolerant ?
RS232-Like SIE: 3.3v or 2.5v interface (level converts 2.5v to 3.3v) but the signals are 5v tolerant (ref. datasheet Table 5-1 and its notes 2, 3, 5, and 7).
Note that an AVR powered at 5v can read 3v as a high signal; this is close to the PL2303's 3.3v so the noise margin is reduced.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Oh and while we're here there is a 3rd player in this game - ...
Some more from a quick search at one distributor: Exar, SMSC (recently bought by guess who), Silicon Labs.

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Jun 29, 2012 - 06:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Consider this - about 95% of the $2-$3 USB-RS232 cables you can buy on ebay are PL2303 based so you can start to get a feel about how they operate simply by buying a handful of cables on ebay.


I have bought a few of those cable and they all SUCK!
I spent more time looking for driver this/driver that nonsense and finally said enough.

Bought a few FTDI FT230X parts, made up a testboard and It worked right out. Had to get a driver from the website, but no big deal.

I also used the FT232 and it too worked without any fuss.

Great documentation and support from FTDI.

Just MHO though.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The USB HID -to- UART or SPI or I2C ICs appear to not need drivers; several makers of these.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I have bought a few of those cable and they all SUCK!

I bought a few and they work brilliantly. They were $1.61 each including postage.

Of course I use Linux as the main OS interfacing to the USB and it tends to have a richer more developed driver support ni the generic package.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff Wrote:

Quote:
Of course I use Linux....

But of course you do.... :)

Yeah the price sounds right, but the headache ain't worth the costs.

But of course..You get what you pay for. ;)

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have to agree with Jim. Those PL2303 based cables are a pain in the arse and the driver support under windows is practically non existent.

I threw the 2 I had in the bin and replaced them with an FTDI based product.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used a couple of those Prolific based cables and they seem to dislike glitches on their receive input causing them to lock up. Only power cycling restores normal operation.