SEROUT / SERIN question
Archiver
Posts: 46,084
I have some questions about "open output" vs. "driven output".
1. Pg. 296 of BS manual version 2.0c (Table 5.81) shows the 4 steps
in determining the baudmode. First 3 steps are identical to SERIN,
but SEROUT has a 4th step. I must determine if I want "driven"
or "open" outputs.
How is the term "open" used on Table 5.81 related to term "open" used
on Table 5.88?
I believe Table 5.81's "open" refers to a mode of operation,
whereas "open" in Table 5.88 means "disconnected" or "high impedance
state". Is my understanding correct?
2. If my application only has 1 trasmitting Stamp, and 1 or more
receiving Stamp, should I choose "driven" output mode (as this does
not require external resistor)?
3. If I have 1 trasmitting Stamp and 1 or more receiving Stamp, can
I choose either of the "open" output modes (i.e. either open drain or
open source)?
4. If my application has 2 or more transmitting Stamps, then I
believe I must choose either open drain or open source. Is this
correct?
Thank you.
1. Pg. 296 of BS manual version 2.0c (Table 5.81) shows the 4 steps
in determining the baudmode. First 3 steps are identical to SERIN,
but SEROUT has a 4th step. I must determine if I want "driven"
or "open" outputs.
How is the term "open" used on Table 5.81 related to term "open" used
on Table 5.88?
I believe Table 5.81's "open" refers to a mode of operation,
whereas "open" in Table 5.88 means "disconnected" or "high impedance
state". Is my understanding correct?
2. If my application only has 1 trasmitting Stamp, and 1 or more
receiving Stamp, should I choose "driven" output mode (as this does
not require external resistor)?
3. If I have 1 trasmitting Stamp and 1 or more receiving Stamp, can
I choose either of the "open" output modes (i.e. either open drain or
open source)?
4. If my application has 2 or more transmitting Stamps, then I
believe I must choose either open drain or open source. Is this
correct?
Thank you.
Comments
1. The 'open' baud modes, both in table 5.81 and 5.88, refer to the
same thing. 5.81 shows how to specify it in your SEROUT 'baudmode'
value. 5.88 shows what happens on the signal pins.
I don't know how far you can transmit this 'TTL'-ish 232 NRZ signal.
I assume the 'open' modes refer to multiple Stamps on the same
Circuit Card -- allowing you an on-card communication bus.
2. In 'non-open' baudmodes, both the '1' state and '0' state are
DRIVEN. The input impedance of your receivers is very high (meaning
it takes little current to set the state). I would guess it would
work better if non-open, but then your receivers could NEVER 'talk'
on that pin. (You might want to put a 220 ohm resistor in series
with the signal to prevent damage should both drivers be 'on' at the
same time. 470 ohms works too.)
3. Yes, you should be able to choose either 'open' mode -- inverted
or not. The receiver shouldn't care that it's 'open' as long as it
matches the 'invert' setting.
4. Yes, if both stamps want to talk (at different times) then you
would pick which mode you wanted (Pull High or Pull Low). You would
install a 10K ohm resistor to match your 'pull' selection. You would
configure 'baudmode' on both drivers to match your 'pull' selection.
In fact, you can use one 'slave' stamp pin to listen, then turn
around and use that SAME 'slave' stamp pin to talk back to
the 'master' (with perhaps a 1 mS delay to allow
the 'master's 'SERIN' statement to begin.)
'Pull High' is Open, Non-Inverted, and has a 10K to +5.
'Pull Low' is Open, Inverted, and has a 10K to Ground.
--- In basicstamps@yahoogroups.com, "yellowniter" <yellowniter@y...>
wrote:
> I have some questions about "open output" vs. "driven output".
>
> 1. Pg. 296 of BS manual version 2.0c (Table 5.81) shows the 4
steps
> in determining the baudmode. First 3 steps are identical to SERIN,
> but SEROUT has a 4th step. I must determine if I want "driven"
> or "open" outputs.
>
> How is the term "open" used on Table 5.81 related to term "open"
used
> on Table 5.88?
>
> I believe Table 5.81's "open" refers to a mode of operation,
> whereas "open" in Table 5.88 means "disconnected" or "high
impedance
> state". Is my understanding correct?
>
> 2. If my application only has 1 trasmitting Stamp, and 1 or more
> receiving Stamp, should I choose "driven" output mode (as this does
> not require external resistor)?
>
> 3. If I have 1 trasmitting Stamp and 1 or more receiving Stamp,
can
> I choose either of the "open" output modes (i.e. either open drain
or
> open source)?
>
> 4. If my application has 2 or more transmitting Stamps, then I
> believe I must choose either open drain or open source. Is this
> correct?
>
> Thank you.
> ..How is the term "open" used on Table 5.81 related to term "open"
> used on Table 5.88?
>
> I believe Table 5.81's "open" refers to a mode of operation,
> whereas "open" in Table 5.88 means "disconnected" or "high impedance
> state". Is my understanding correct?
>
Both refer to the same concept: only one hardware logic level
(the active state) will be asserted or driven, i.e. presented as an
output. The opposite hardware logic level (the idle state) will be
represented by placing the pin in input mode, allowing an external
pullup or pulldown resistor to control the default level present at
the pin.
> 2. If my application only has 1 trasmitting Stamp, and 1 or more
> receiving Stamp, should I choose "driven" output mode (as this does
> not require external resistor)?
If only one transmitter exists, it really doesn't matter once your
system is fully debugged and working correctly. However, resistors
are much cheaper than Basic Stamps, so I'd suggest the open modes (and
series resistors as well) to start with.
> 3. If I have 1 trasmitting Stamp and 1 or more receiving Stamp, can
> I choose either of the "open" output modes (i.e. either open drain
> or open source)?
Yes, your choice. Just make sure all Stamps employ the same
technique.
> 4. If my application has 2 or more transmitting Stamps, then I
> believe I must choose either open drain or open source. Is this
> correct?
While it's possible to work with multiple transmitters in driven
mode, it's risky--especially during the code development and
testing phases. If things aren't choreographed exactly right you
stand an excellent chance of damaging your Stamp(s).
Finally, keep in mind that when the I/O pin assumes the idle state
at the completion of a SEROUT, it will remain an output for driven
mode SEROUTs, but is an input after open mode SEROUTs. Sometimes
this in itself is enough to tip the scales in favor of one approach
or the other.
Regards,
Steve