Subject: Re: serial console
To: Wojciech Puchar <wojtek@tensor.3miasto.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 06/02/2003 10:55:51
Sorry for the delay in responding.

On Mon, 7 Apr 2003, Wojciech Puchar wrote:

> >
> > This could mean that the com port read routine is getting garbage from
> > the serial port, which the bootloader assumes comes from you pressing
> > a key to stop the boot.
>
> you are RIGHT!!!
>
> i now remember a bit of garbage after connecting to terminal when
> bootloader already started.
>
> >
> > It could be that your hardware returns junk characters when a byte is read
> > with nothing hooked up.  You should build a biosboot_com0 with the
> > '-DDIRECT_SERIAL' option disabled and see if that helps.
> will try and report
>
> is it possible that unplugged cable "receives" noise?
>
> will just connecting extra resistor between ground and receive fix it?
>
> any idea what resisitor? 22KOhm?

22k Ohm would probably be fine, but I think it'd be better to tie the
signal to DTR rather than to ground. RS232 signals are defined as being
'Mark' (logical 1) if the voltage is between -3V and -25V (I think 25 is
the right number) and "Space" (logical 0) if between 3V and 25V. Most
systems use +/-5V or +/-12V.

The important thing is that ground isn't a valid signal voltage, so your
resistor will end up keeping the signal in limbo. Yes, there will be less
noise, but if the last voltage was a "Space", you'll get a stream of zeros
which will be considered a break sequence. :-(

DTR through should be asserted to "Mark" so it'll be fine.

I also think 47k or 100k would be fine. All you need is enough so that you
bleed of whatever capacitance is in the input circuitry. Also, during use,
you will be seeing either 10 or 24 volts across the resistor, and you
don't want to draw too much power.

Take care,

Bill