Reply by Meindert Sprang November 30, 20052005-11-30
"trungnl" <ngolamtrung@yahoo.com> wrote in message
news:z7SdnaMGFbQ4sRDeRVn-rw@giganews.com...
> > >You have to poll the PL2303 for that. > > Thanks Meindert, > > I have implemented a polling mechanism to get data from PL2303 to the > embedded host. But there is another problem > > According to PL2303's spec, the chip has an 256-byte-buffer for each Tx > and Rx operation. But when I transfer a large amount of data (about 3KB) > to the RS232 interface of PL2303, the USB host can only read a few bytes > from the USB interface. It seems that the data in PL2303's buffer has lost > so I cannot read all the data transfered to RS232 interface.
Without knowing all the details, I'd say: poll more often. You have to at least poll often enough not to let your 256 buffer fill up. Meindert
Reply by trungnl November 30, 20052005-11-30
>You have to poll the PL2303 for that.
Thanks Meindert, I have implemented a polling mechanism to get data from PL2303 to the embedded host. But there is another problem According to PL2303's spec, the chip has an 256-byte-buffer for each Tx and Rx operation. But when I transfer a large amount of data (about 3KB) to the RS232 interface of PL2303, the USB host can only read a few bytes from the USB interface. It seems that the data in PL2303's buffer has lost so I cannot read all the data transfered to RS232 interface.
Reply by trungnl November 30, 20052005-11-30
>You did read the datasheet and manuals at this site? >
Yes I did read all the docs at Prolific Website, but they lack all the information needed to develop PL2303's driver. I think FTDI has a better product, the FT232BM, but PL2303 is much cheaper so I must choose Prolific's product to reduce overall cost.
Reply by Arie de Muynck November 29, 20052005-11-29
"trungnl" ...
> > I am writting a firmware to connect an embedded USB host with the Prolific > PL2303 USB-RS232 chip. The PL2303 chip is used to get data from some > RS232-enabled devices and then transfer these data to the USB host. Now I > need detailed information about PL2303's specification and operation, to > develope the appropriate driver for it. > I have been searching for some PL2303 driver or programming guides but > haven't found any of them yet. > > Has anybody worked with PL2303 ? Please give me some help !
You did read the datasheet and manuals at this site? http://www.prolific.com.tw/eng/Download-2.asp?ID=17 Arie de Muynck
Reply by Meindert Sprang November 29, 20052005-11-29
"trungnl" <ngolamtrung@yahoo.com> wrote in message
news:xsadnTWnQpEQ_hHeRVn-ug@giganews.com...
> Actually I am writting the PL2303 driver base on some reverse-engineered > information retrieved by monitoring the data transfer process between a > PL2303-based USB-RS232 cable and PC. Now I can enumerate the PL2303, set > the COM settings like baudrate, stop bits, parity... I can send as many > data as I like from the embedded USB host to PL2303 as well. But there is > still a big problem because the host cannot get data from PL2303. > Now I need some more information on: > 1. How to be notified when there's some data in the Receive buffer of > PL2303.
You have to poll the PL2303 for that. Remember, USB is a master/slave system where a slave NEVER starts transmitting by itself. Transmission of a slave is always a response to a request from the master. Meindert
Reply by trungnl November 29, 20052005-11-29
>trungnl wrote: >> Has anybody worked with PL2303 ? Please give me some help ! > >When I wrote a driver for this chip, I gleaned the apparently >reverse-engineered interface information from the appropriate >Linux device driver. >
>When I wrote a driver for this chip, I gleaned the apparently >reverse-engineered interface information from the appropriate >Linux device driver. >
Hi Michael, Actually I am writting the PL2303 driver base on some reverse-engineered information retrieved by monitoring the data transfer process between a PL2303-based USB-RS232 cable and PC. Now I can enumerate the PL2303, set the COM settings like baudrate, stop bits, parity... I can send as many data as I like from the embedded USB host to PL2303 as well. But there is still a big problem because the host cannot get data from PL2303. Now I need some more information on: 1. How to be notified when there's some data in the Receive buffer of PL2303. 2. How to know the amount of data in the Receive buffer of PL2303. Best, N.L.Trung
Reply by Meindert Sprang November 29, 20052005-11-29
"trungnl" <ngolamtrung@yahoo.com> wrote in message
news:xuadnZPzmdXwsBHeRVn-sQ@giganews.com...
> > >If you are lucky, you *could* get the API from Prolific. FTDI offers a > >similar service under NDA. > > > >Meindert > > > > Thanks Meindert, > May be that API is the exact thing I need now. > Can you tell me how to get the PL2303's API ?
Well, here's what I wrote earlier:
> >If you are lucky, you *could* get the API from Prolific.
So, contact Prolific... Meindert
Reply by Michael N. Moran November 29, 20052005-11-29
trungnl wrote:
> Has anybody worked with PL2303 ? Please give me some help !
When I wrote a driver for this chip, I gleaned the apparently reverse-engineered interface information from the appropriate Linux device driver. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Already Gone" The Beatles were wrong: 1 & 1 & 1 is 1
Reply by trungnl November 29, 20052005-11-29
>If you are lucky, you *could* get the API from Prolific. FTDI offers a >similar service under NDA. > >Meindert >
Thanks Meindert, May be that API is the exact thing I need now. Can you tell me how to get the PL2303's API ? Thank you very much, N.L.Trung
Reply by Meindert Sprang November 29, 20052005-11-29
"trungnl" <ngolamtrung@yahoo.com> wrote in message
news:vZKdnQIBMd3HiRHenZ2dnUVZ_sydnZ2d@giganews.com...
> > I am writting a firmware to connect an embedded USB host with the Prolific > PL2303 USB-RS232 chip. The PL2303 chip is used to get data from some > RS232-enabled devices and then transfer these data to the USB host. Now I > need detailed information about PL2303's specification and operation, to > develope the appropriate driver for it. > I have been searching for some PL2303 driver or programming guides but > haven't found any of them yet. > > Has anybody worked with PL2303 ? Please give me some help !
If you are lucky, you *could* get the API from Prolific. FTDI offers a similar service under NDA. Meindert