I am told that to have multiple ZX24s outputting to one serial device, using the same line, I should be utilizing 'Open Drain'.
I'm using 19K2 Inverted, 8, None, 1, but I can't see anything in the documentation or forum about Open Drain, except one reference to using the same pins for input and output, but that appears to exclude Inverted communication.
I'm at the limit of my knowledge here, so any help would be appreciated.
Thanks, John
Multiple ZX-24p to one serial device
Re: Multiple ZX-24p to one serial device
That would be correct if 1) you're using non-inverted mode, 2) you use an external pullup resistor and 3) you can somehow guarantee that only one device will be transmitting at any given moment. If you need inverted mode, the technically correct description would be 'Open Source' and you would use a pull-down resistor.jburrow wrote:I am told that to have multiple ZX24s outputting to one serial device, using the same line, I should be utilizing 'Open Drain'.
The description of DefineCom discusses the bussed half-duplex mode (rxPin = txPin) where either inverted or non-inverted signalling may be used. What is missing is a way to specify that you want bussed mode when the rx and tx pins aren't the same. Although undocumented, this can be achieved by adding 4 to the bit count field of the 'flags' parameter. This is the same, of course, as adding 4 to the entire 'flags' parameter value so if you wanted 8-bit inverted mode you could use the value &H88 + 4. This only applies to the software UART channels Com3-Com6.jburrow wrote:I can't see anything in the documentation or forum about Open Drain, except one reference to using the same pins for input and output, but that appears to exclude Inverted communication.
- Don Kinzer
Quite so. If you don't yet understand why, the wikipedia article on Open-Drain/Open-Collector may prove helpful. Although not specifically discussed, the Open-Source driver strategy is the same general idea except that the output actively drives the signal line high and lets it float low. Consequently, the signal line requires a pull-down rather than a pull-up.jburrow wrote:Does definitely require a pull-down resistor.
In this context, the words source and drain refer to the source and drain terminals of a MOSFET on the output stage of a signal driver such as an I/O line of a microcontroller. On a ZX, the open drain configuration is achieved by making the I/O pin an input for a logic 1 (thus letting the external pull-up pull the line high) and making the I/O pin an output in the low state for a logic 0 (thus pulling the line to ground). In contrast, the open source configuration is achieved by making the I/O pin an output in the high state for a logic 1 (thus pulling the line to +V) and making the I/O pin an input for a logic 0 (thus letting the external pull-down pull the line low). The table below summarizes this logic.
[table][mrow]State[mcol]Open Drain[mcol]Open Source
[row]low[col]output, low[col]input
[row]high[col]input[col]output, high[/table]
- Don Kinzer