EmbeddedRelated.com
Forums

no serial port on my PC

Started by gaetanbarthelemy September 21, 2006
Hello guys,

I believe that the only way to download a new program into flash is to
use the UART or the JTAG. what if I don't have a Serial port on my
computer and that I don't want to use the JTAG connection... I guess
that a simple USB to UART conversion will do the job. So my question
is:
what is it better to use?
A external adaptater or an USB to UART bridge such as the CP2102?

thanks for your advice

Gaetan

An Engineer's Guide to the LPC2100 Series

Em Qui 21 Set 2006 12:35, gaetanbarthelemy escreveu:
> Hello guys,
>
> I believe that the only way to download a new program into flash is to
> use the UART or the JTAG. what if I don't have a Serial port on my
> computer and that I don't want to use the JTAG connection... I guess
> that a simple USB to UART conversion will do the job. So my question
> is:
> what is it better to use?
> A external adaptater or an USB to UART bridge such as the CP2102?
>
> thanks for your advice
>
> Gaetan

Thats a sad signal of the time, no more serial ports... I think I am one of
the last that have a computer with two serial ports on the case...
Well, both solutions works. Indeed I made a ISP programmer for a LPC2106 board
with a commercial USB to RS232 conversor, I opened it and picked the signals
in TTL level, because I needed to program them on the field with a notebook
that doesnt have any serial ports (what a blasphemy!).
There are USB and PCMCIA "solutions" (I hate that word, solutions) to
the no RS232 port problem I think. I ordered a refurbished Dell
laptop that had a rs232 port on it because I use RS232 all the time
on more than just LPC2k parts.
Some of those USB dongles evident'y do not have the
drivable/programmable handshake lines for powering isolated type RS232
things so beware of that.

boB

--- In l..., Xtian Xultz wrote:
>
> Em Qui 21 Set 2006 12:35, gaetanbarthelemy escreveu:
> > Hello guys,
> >
> > I believe that the only way to download a new program into flash
is to
> > use the UART or the JTAG. what if I don't have a Serial port on
my
> > computer and that I don't want to use the JTAG connection... I
guess
> > that a simple USB to UART conversion will do the job. So my
question
> > is:
> > what is it better to use?
> > A external adaptater or an USB to UART bridge such as the CP2102?
> >
> > thanks for your advice
> >
> > Gaetan
>
> Thats a sad signal of the time, no more serial ports... I think I
am one of
> the last that have a computer with two serial ports on the case...
> Well, both solutions works. Indeed I made a ISP programmer for a
LPC2106 board
> with a commercial USB to RS232 conversor, I opened it and picked
the signals
> in TTL level, because I needed to program them on the field with a
notebook
> that doesnt have any serial ports (what a blasphemy!).
>
www.tibbo.com has some very simple ethernet<->UART gateways. The application
allows creation of virtual serial ports locally in the PC, and converts TCP
stream to UART stream embedded, allowing connecting Philips Flash Utility to
your LPC2000 UART0 transparently over ethernet.

Wagner

Citando gaetanbarthelemy :

> Hello guys,
>
> I believe that the only way to download a new program into flash is to
> use the UART or the JTAG. what if I don't have a Serial port on my
> computer and that I don't want to use the JTAG connection... I guess
> that a simple USB to UART conversion will do the job. So my question
> is:
> what is it better to use?
> A external adaptater or an USB to UART bridge such as the CP2102?
>
> thanks for your advice
>
> Gaetan
>
>
We use a number of USB based RS232 serial adaptors with no problems what so
ever. Personally I hate the USB spec. Why on earth they had to ruin a good
idea by allowing vendors to simply define their own generic class drivers
and in so doing ignore for example the spec for communications is beyond me.
Fine if you live in windows land but a bloody nightmare in embedded land.

Andy

-----Original Message-----
From: l... [mailto:l...]On Behalf Of
bobtransformer
Sent: 22 September 2006 01:39
To: l...
Subject: [lpc2000] Re: no serial port on my PC
There are USB and PCMCIA "solutions" (I hate that word, solutions) to
the no RS232 port problem I think. I ordered a refurbished Dell
laptop that had a rs232 port on it because I use RS232 all the time
on more than just LPC2k parts.
Some of those USB dongles evident'y do not have the
drivable/programmable handshake lines for powering isolated type RS232
things so beware of that.

boB

--- In l..., Xtian Xultz wrote:
>
> Em Qui 21 Set 2006 12:35, gaetanbarthelemy escreveu:
> > Hello guys,
> >
> > I believe that the only way to download a new program into flash
is to
> > use the UART or the JTAG. what if I don't have a Serial port on
my
> > computer and that I don't want to use the JTAG connection... I
guess
> > that a simple USB to UART conversion will do the job. So my
question
> > is:
> > what is it better to use?
> > A external adaptater or an USB to UART bridge such as the CP2102?
> >
> > thanks for your advice
> >
> > Gaetan
>
> Thats a sad signal of the time, no more serial ports... I think I
am one of
> the last that have a computer with two serial ports on the case...
> Well, both solutions works. Indeed I made a ISP programmer for a
LPC2106 board
> with a commercial USB to RS232 conversor, I opened it and picked
the signals
> in TTL level, because I needed to program them on the field with a
notebook
> that doesnt have any serial ports (what a blasphemy!).
>
--- In l..., "gaetanbarthelemy"
wrote:
>
> Hello guys,
>
> I believe that the only way to download a new program into flash is to
> use the UART or the JTAG. what if I don't have a Serial port on my
> computer and that I don't want to use the JTAG connection... I guess
> that a simple USB to UART conversion will do the job. So my question
> is:
> what is it better to use?
> A external adaptater or an USB to UART bridge such as the CP2102?
>
> thanks for your advice
>
> Gaetan
Here is one example for building your own:

http://www.ftdichip.com/Documents/Schematics/FT232R/UC232R%20Schematic.pdf

I found this works for standard and non-standard baud rates on PCs
running both Linux and Windows.

Bear in mind that no matter what converter you use, you may get LPC
UARTs working incorrectly for some weird combination of CPU crystals
and baudrates.

Hope this helps.

Jaya
--- In l..., "jayasooriah"
wrote:

> Bear in mind that no matter what converter you use, you may get LPC
> UARTs working incorrectly for some weird combination of CPU
crystals
> and baudrates.
>

Jaya,

You keep repeating this claim without providing specific
information, though I note the claim is now more restricted than
previously.

Can you provide even one specific combination of crystal and baud
rate that doesn't work? If not, I'd ask you to please stop making
this claim.

If the parts do indeed have an issue under certain circumstances
then it is valuable information to know exactly what the issue is
and what the circumstances are when it arises. If they don't have an
issue than repeating inaccurate information devalues the entire
group.

Thanks!

Brendan
--- In l..., "Brendan Murphy"
wrote:
>
> --- In l..., "jayasooriah"
> wrote:
>
> > Bear in mind that no matter what converter you use, you may get LPC
> > UARTs working incorrectly for some weird combination of CPU
> crystals
> > and baudrates.
> > Jaya,
>
> You keep repeating this claim without providing specific
> information, though I note the claim is now more restricted than
> previously.
>
> Can you provide even one specific combination of crystal and baud
> rate that doesn't work? If not, I'd ask you to please stop making
> this claim.
>
> If the parts do indeed have an issue under certain circumstances
> then it is valuable information to know exactly what the issue is
> and what the circumstances are when it arises. If they don't have an
> issue than repeating inaccurate information devalues the entire
> group.
>
> Thanks!
>
> Brendan

Thanks to an alert by a fellow forum member, the issue has been quite
adequately documented here:

http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/limitations.html

This was written some time ago and nothing has changed in respect of
my findings reported.

I say "alert" in my opening remark because my filter now seems to
working reasonably well in weeding out Brendan's posts :)

Jaya
> Thanks to an alert by a fellow forum member, the issue has been quite
> adequately documented here:
>
> http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/limitations.html
>
Dear Jaya,

This is from your web site.

//
More specifically, on LPC2292 with 14.7456 MHz crystal, both PLL and MAM
disabled, VPBDIV set to 1, UART set to 8-data 1-stop and no parity, it works
at 230400 baud and above, but drops characters at 4800 baud and below.

The problem manifests itself only when the UART is connected to devices (for
example FTDI chip) that can send data at full speed without any delays
between characters at specific baud rates.

//

My question are,

1. What about baud rate between 4800 -230400?

2. You also said that it works at 230400 and above

3. What happen if the serial port is PC and not FTDI chip?

Finally,

Should we conclude that problem is below 4800 AND with FTDI chip AND for
LPC2292?

Best Regards,

Mukund Deshmukh.
Beta Computronics Pvt Ltd
10/1, IT Park, Parsodi,
Nagpur-440022
Cell - 9422113746
This is with regard to the claim of Jaya that the LPC UART is faulty.

Jaya is a university staff member in New South Wales Australia who
gets paid from public tax payers money. As such he has an automatic
standing and so we should expect certain standards. Also Jaya
deliberately conducts himself in a style that attempts to portray an
image that he is a credible expert. However Jaya has not helped
Brendan reconcile differences in results and Jaya has failed to
provide complete information.

Please note I am not making a claim that Jaya's results are not true.

1. Brendan attempted to reproduce Jaya's claims and was not able to.
Brendan provided more complete information than Jaya.

2. Jaya's report is incomplete. Jaya has not provided a copy of the
source code of PC program he used when testing the bootloader
firmware (nite.exe). He also failed to provide a complete copy of the
source for test.hex firmware so we cannot investigate this side of
the set-up also. He also used an FTDI chip but no where mentioned if
he used default or special configuration values for the FTDI driver.

3. There are delay and latency issues with FTDI chips. FTDI Chip is
open about this and no where claims their chips emulate real UARTS
faithfully. Nor does FTDI Chip make any claims about
having 'professional' performance, however that might be defined (I
have not seen the word 'professional' used in any set of credible
specifications). FTDI also makes it clear that data can be lost and
advises use of flow control. Since FTDI Chip uses USB data can only
be read and written within the bandwidth slots permitted by USB,
which cannot be faster than 64 byte chunks once per millisecond for
USB High Speed for each enabled USB endpoint. In fact FTDI chips
reserve two bytes for their own use during each IN endpoint transfer.

4. The Philips bootloader uses Xon/Xoff flow control. This is clearly
stated in the documentation. I have yet to see a single open source
bootloader that includes Xon/Xoff flow control.

5. Jaya complained that it took him six weeks to master using Philips
UARTs. This appears bizarere as Philips uses a UART register layout
and interrupt conventions that are as old as the first PCs. The LPC
UART layout follows the '550 industry standard.

6. Philips follows the interrupt '550 industry standard so closely
that they had to break a VIC rule mandated by ARM with regard to not
allowing the source of an interrupt disappear. However Philips
clearly points out a way to work around this problem. Hence it is not
an unsolvable problem.

John Heenan

--- In l..., "jayasooriah" wrote:
>
> --- In l..., "Brendan Murphy"
> wrote:
> >
> > --- In l..., "jayasooriah"
> > wrote:
> >
> > > Bear in mind that no matter what converter you use, you may get
LPC
> > > UARTs working incorrectly for some weird combination of CPU
> > crystals
> > > and baudrates.
> > >
> >
> > Jaya,
> >
> > You keep repeating this claim without providing specific
> > information, though I note the claim is now more restricted than
> > previously.
> >
> > Can you provide even one specific combination of crystal and baud
> > rate that doesn't work? If not, I'd ask you to please stop making
> > this claim.
> >
> > If the parts do indeed have an issue under certain circumstances
> > then it is valuable information to know exactly what the issue is
> > and what the circumstances are when it arises. If they don't have
an
> > issue than repeating inaccurate information devalues the entire
> > group.
> >
> > Thanks!
> >
> > Brendan
>
> Thanks to an alert by a fellow forum member, the issue has been
quite
> adequately documented here:
>
> http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/limitations.html
>
> This was written some time ago and nothing has changed in respect of
> my findings reported.
>
> I say "alert" in my opening remark because my filter now seems to
> working reasonably well in weeding out Brendan's posts :)
>
> Jaya
>