StatusQueue with Com3

Started by jxpicciri2000 June 21, 2005
How does the StatusQueue function work with input
queues use in Com3. It seems to find a "0" in the
queue even if there is no input to the pin assigned
to the queue.

Thanks,

John-



--- In basicx@basi..., "jxpicciri2000" <jpicciri@r...> wrote:
> How does the StatusQueue function work with input
> queues use in Com3. It seems to find a "0" in the
> queue even if there is no input to the pin assigned
> to the queue.

To be clear, StatusQueue() doesn't tell you what's in the queue.
Rather, it indicates whether there is any data available in the
queue.

If StatusQueue() is returning True, it's because there is received
data in the queue. If you don't have anything connected to the
input pin you may still receive data because the pin will be
floating. If it ever drops below the threshold for a logic zero
(or, for inverted mode, rises above the threshold for a logic one)
that will be interpreted as the start bit of a character. After
sampling the specified number of data bits the result will be put in
the receive queue for your enjoyment.

If you aren't going to be using the input, specify a zero for the
receive pin number. Alternately, connect a pull up or pull down
resistor to the pin for true or inverted mode, respectively.

Don




>Message: 12
> Date: Tue, 21 Jun 2005 23:17:05 -0000
> From: "Don Kinzer" <dkinzer@dkin...>
>Subject: Re: StatusQueue with Com3
>
>--- In basicx@basi..., "jxpicciri2000" <jpicciri@r...> wrote:
> > How does the StatusQueue function work with input
> > queues use in Com3. It seems to find a "0" in the
> > queue even if there is no input to the pin assigned
> > to the queue.
>
>If you aren't going to be using the input, specify a zero for the
>receive pin number. Alternately, connect a pull up or pull down
>resistor to the pin for true or inverted mode, respectively.

Thanks Don. I suspected the floating pin, it just seemed odd
that it worked so consistently at 9600 baud to give all zeros
for input.

JOhn-