K2 - KIO2 stop bit oddity

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

K2 - KIO2 stop bit oddity

Joe Planisky
Hey Folks,

I've just finished assembling a KIO2 for my K2 (SN 3490, Firmware  
2.04).  It seems to be working, but it only works reliably when I set  
my terminal software to use 1 stop bit instead of 2.  If I set my  
terminal to 2 stop bits, I get garbled data about 70% of the time.  
For example, the ID; command will return ID017, ID0, ID, ID01, etc.  
I've observed this behavior on both a Mac and a PC, so I don't think  
it's my terminal program.  I tried the MacK2 program and it works  
extremely erratically, presumably because it assumes 2 stop bits.  The  
KIO2 manual says to use 2 stop bits, but that 1 stop bit will also work.

Before I dive into this, I thought I'd see if anyone else has  
experienced this problem.

Thanks in advance for any advice.

73
Joe KB8AP

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Joe Planisky
Well, that's just it: you can't change it on the K2, and the KIO2  
manual says it should be 2 stop bits.

73
Joe KB8AP

On May 14, 2008, at 1:43 AM, Larry Clay wrote:

> One stop bit is the normal default for most programs for serial  
> communications. Hyperterminal in Windows XP defaults to this. Also  
> the KIO2 manual says that one stop bit works also. The main thing is  
> that both the K2 and control program are set the same.
>
> Larry
> KB5DXY
>
_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Ian Maude
Joe Planisky wrote:
> Well, that's just it: you can't change it on the K2, and the KIO2
> manual says it should be 2 stop bits.
You will normally find that 4800 baud tends to be set to 2 stop bits but
everything else appears to be 1.  I don't know why this is but it seems
to be the norm.

Ian

>
>
> 73
> Joe KB8AP
>
> On May 14, 2008, at 1:43 AM, Larry Clay wrote:
>
>> One stop bit is the normal default for most programs for serial
>> communications. Hyperterminal in Windows XP defaults to this. Also
>> the KIO2 manual says that one stop bit works also. The main thing is
>> that both the K2 and control program are set the same.
>>
>> Larry
>> KB5DXY
>>
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
> http://mailman.qth.net/mailman/listinfo/elecraft 
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>
>


--

Ian J Maude, G0VGS
SysOp GB7MBC DX Cluster
Member RSGB, GQRP
K2 #4044 |K3 #455

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Mike S-8
In reply to this post by Joe Planisky
At 02:14 AM 5/14/2008, Joe Planisky wrote...
>extremely erratically, presumably because it assumes 2 stop
>bits.  The
>KIO2 manual says to use 2 stop bits, but that 1 stop bit will also
>work.

That is only possible if the K2 firmware sends 2 and receives 1. Since
the source code isn't available to check, Elecraft will have to
respond.

Any device can send 2 (or more) stop bits, and any device can receive 1
stop bit. The extra bit(s) will just be considered marking time (extra
idle time between characters).

It would be strange for any modern device to require 2 stop bits. The
option was originally used so that mechanical Teletype terminals would
have enough time to cycle their mechanisms to an initial state between
characters. That isn't an issue with any modern device (does anyone
still use a Model 33 for RTTY?).

>If I set my terminal to 2 stop bits, I get garbled data about 70% of
>the time. For example, the ID; command will return ID017, ID0, ID,
>ID01, etc.

That looks about right for a mismatch. If the sender is only sending 1
stop bit, the following start bit should result in a framing error, and
NO character should be displayed. The inconsistency you see is likely
the K2 marking time (busy with something else) between characters,
which looks the same as the second stop bit to the receiver.



_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Brian Lloyd-6
In reply to this post by Joe Planisky

On May 14, 2008, at 6:11 AM, Joe Planisky wrote:

> Well, that's just it: you can't change it on the K2, and the KIO2  
> manual says it should be 2 stop bits.

The receiver's stop-bit setting needs to be greater than or equal to  
the stop bit setting of the transmitter. It is OK for the transmitter  
to send two stop bits and for the receiver to be set for one stop bit.  
It won't hurt a thing. Most UARTs use the stop bit setting to affect  
only the transmitter (RS-232 sending part of the device). The receiver  
will handle anything that is at least one bit-time long for a stop  
bit. Longer stop bits just reduce the maximum rate (characters per  
second) that you can send data.

What may be happening is that the KIO2 is doing the UART in software.  
A longer period of time between characters (as represented by the  
extra stop bit) gives the processor more time to process the received  
character before the next character starts coming.

--

73 de Brian, WB6RQN
Brian Lloyd - brian HYPHEN wb6rqn AT lloyd DOT com



_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Brian Lloyd-6
In reply to this post by Ian Maude

On May 14, 2008, at 6:21 AM, Ian J Maude wrote:

> Joe Planisky wrote:
>> Well, that's just it: you can't change it on the K2, and the KIO2  
>> manual says it should be 2 stop bits.
> You will normally find that 4800 baud tends to be set to 2 stop bits  
> but everything else appears to be 1.  I don't know why this is but  
> it seems to be the norm.

There is no reason for this. All the extra stop bit does is allow the  
receiver more time to process the most recently-received character  
before the next one arrives.

--

73 de Brian, WB6RQN
Brian Lloyd - brian HYPHEN wb6rqn AT lloyd DOT com



_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

David Woolley (E.L)
In reply to this post by Brian Lloyd-6
Brian Lloyd wrote:
>
> The receiver's stop-bit setting needs to be greater than or equal to the
> stop bit setting of the transmitter. It is OK for the transmitter to

You meant less than, not greater than, although, as you noted later,
receivers generally don't have a stop bits setting.

> send two stop bits and for the receiver to be set for one stop bit. It
> won't hurt a thing. Most UARTs use the stop bit setting to affect only
> the transmitter (RS-232 sending part of the device). The receiver will

Delete RS232.  (In fact, historically, current loop was used for the
physical interface.)

> handle anything that is at least one bit-time long for a stop bit.

Modern UARTs accept stop bits that are just over half a signalling unit
in length (they sample in the nominal middle, but there is a limited
sampling clock resolution.  They need to accept ones that are strictly
shorter than the transmitted ones, because, as we are talking about
asynchronous signalling, they need to be able to cope with recovering
from false start bits and cope with clock rate differences (more common
on mechanical devices, but some electronic devices rely on these to
allow working with convenient crystals.

(When sending asynchronous data over 1200 bps synchronous modems,
sometimes no stop bits could  be sent over the wire, if the source clock
was fast, as, being synchronous, there was no option to shorten the stop
bit.  Stop bits were re-inserted before creating the baseband output; I
believe they ran the output clock fast to ensure that this worked.)


> Longer stop bits just reduce the maximum rate (characters per second)
> that you can send data.

And give better recovery from false start bits - not a problem you
should have on a short piece of wire.

Incidentally, 4800 baud is normally sent with one stop bit.  As noted
elsewhere, it is only really for mechanical devices that one needed
longer ones, so it tends to be 110 and below (maybe 300) that uses 2, or
for, 5 unit, Baudot, 1.5.
>

--
David Woolley
"The Elecraft list is a forum for the discussion of topics related to
Elecraft products and more general topics related ham radio"
List Guidelines <http://www.elecraft.com/elecraft_list_guidelines.htm>
_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity - Solved

Joe Planisky
In reply to this post by Joe Planisky
Well, I now know what's causing the problem.  It seems the culprit is  
my USB-to-serial adapter (a Tripp-Lite U209-000-R).  I managed to get  
my old PC (with real RS-232 serial port hardware) running well enough  
to try it there and everything worked perfectly with both 1 and 2 stop  
bits.  The KIO2 seems fine.

Thanks to all who replied.

73
--
Joe KB8AP



On May 13, 2008, at 11:14 PM, Joe Planisky wrote:

> Hey Folks,
>
> I've just finished assembling a KIO2 for my K2 (SN 3490, Firmware  
> 2.04).  It seems to be working, but it only works reliably when I  
> set my terminal software to use 1 stop bit instead of 2.  If I set  
> my terminal to 2 stop bits, I get garbled data about 70% of the  
> time.  For example, the ID; command will return ID017, ID0, ID,  
> ID01, etc.  I've observed this behavior on both a Mac and a PC, so I  
> don't think it's my terminal program.  I tried the MacK2 program and  
> it works extremely erratically, presumably because it assumes 2 stop  
> bits.  The KIO2 manual says to use 2 stop bits, but that 1 stop bit  
> will also work.
>
> Before I dive into this, I thought I'd see if anyone else has  
> experienced this problem.
>
> Thanks in advance for any advice.
>
> 73
> Joe KB8AP
>

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com
Reply | Threaded
Open this post in threaded view
|

Re: K2 - KIO2 stop bit oddity

Brian Lloyd-6
In reply to this post by David Woolley (E.L)
>> The receiver's stop-bit setting needs to be greater than or equal  
>> to the stop bit setting of the transmitter. It is OK for the  
>> transmitter to
>
> You meant less than, not greater than, although, as you noted later,  
> receivers generally don't have a stop bits setting.

Yes.

>> send two stop bits and for the receiver to be set for one stop bit.  
>> It won't hurt a thing. Most UARTs use the stop bit setting to  
>> affect only the transmitter (RS-232 sending part of the device).  
>> The receiver will
>
> Delete RS232.  (In fact, historically, current loop was used for the  
> physical interface.)

True, once the mechanical teleprinters fell from grace, current loop  
fell by the wayside. (Unless you were connecting to DEC hardware. I  
have implemented more than one 20mA current loop to RS-232 converter  
in my life.)

>> handle anything that is at least one bit-time long for a stop bit.
>
> Modern UARTs accept stop bits that are just over half a signalling  
> unit in length (they sample in the nominal middle, but there is a  
> limited sampling clock resolution.  They need to accept ones that  
> are strictly shorter than the transmitted ones, because, as we are  
> talking about asynchronous signalling, they need to be able to cope  
> with recovering from false start bits and cope with clock rate  
> differences (more common on mechanical devices, but some electronic  
> devices rely on these to allow working with convenient crystals.
>
> (When sending asynchronous data over 1200 bps synchronous modems,  
> sometimes no stop bits could  be sent over the wire, if the source  
> clock was fast, as, being synchronous, there was no option to  
> shorten the stop bit.  Stop bits were re-inserted before creating  
> the baseband output; I believe they ran the output clock fast to  
> ensure that this worked.)

You are, of course, correct. I should make sure that I am rigidly  
correct when I write and I was being sloppy. Having implemented UARTs  
in both software and hardware, and then the protocols to run over them  
(I am one of the authors of PPP and the architect for MLPPP) I do have  
a modicum of understanding.

>> Longer stop bits just reduce the maximum rate (characters per  
>> second) that you can send data.
>
> And give better recovery from false start bits - not a problem you  
> should have on a short piece of wire.
>
> Incidentally, 4800 baud is normally sent with one stop bit.  As  
> noted elsewhere, it is only really for mechanical devices that one  
> needed longer ones, so it tends to be 110 and below (maybe 300) that  
> uses 2, or for, 5 unit, Baudot, 1.5.
>
> --
> David Woolley
> "The Elecraft list is a forum for the discussion of topics related  
> to Elecraft products and more general topics related ham radio"
> List Guidelines <http://www.elecraft.com/elecraft_list_guidelines.htm>
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
> http://mailman.qth.net/mailman/listinfo/elecraft
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>

--

73 de Brian, WB6RQN
Brian Lloyd - brian HYPHEN wb6rqn AT lloyd DOT com



_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com