[ntp:questions] PPS on Linux status?

Martin Burnicki martin.burnicki at meinberg.de
Tue May 22 10:25:24 UTC 2007

David Woolley wrote:
> In article <38doh4-vi2.ln1 at gateway.py.meinberg.de>,
> Martin Burnicki <martin.burnicki at meinberg.de> wrote:
>> The reason for this is mostly historical. On-board logic levels used to
>> be close to 0V for logical "low" and close to +5V for logical "high"
>> signals.
> Whilst it certainly is historical, I have doubts about this
> interpretation.

> In particular, it doesn't explain why control signals use positive logic.

What in you opinion is "positive logic"? Do you refer to the status bits in
the UART's registers, which are set to "high" or "1" if a condition is
true, or the voltage levels of the UART output pins which commonly used to
have TTL levels, or the RS232 levels on the wire?

For the logic circuits used in PCs a logic "high" corresponds to a high
voltage levels, close to the supply voltage of the circuit, and a logic
"low" level corresponds to a voltage level close to 0V. 

BTW, I _know_ real TTL levels are roughly 0V~0.8V for "low", and 2V~5V for
"high", and CMOS logic uses different voltage levels, but let's just use 0V
and 5V for simplicity here.

On a RS232 wire, however, a logical "high" level corresponds to a negative
voltage while a logical "low" level corresponds to a positive voltage. If
you use a current loop interface rather than RS232, you have to check for
current/no current rather than positive/negative voltage. 

So a certain signal which has positive voltage in the TTL world has a
negative voltage on the RS232 wire at the same time, and thus talking about
"positive logic" or "negative logic" just due to the voltage levels is at
least confusing.

>> Those on-board signals were converted to RS232 levels using inverting
>> driver chips,
> That's definitely wrong, as the standard pre-dates that level of logic
> integration.  When it was developed, logic would have been ECL or DTL.
> ECL uses very low voltage differentials and DTL doesn't naturally produce
> the TTL 5 volts power supplies.  At the low level (probably zero,
> at that time) of integration for DTL logic, the distinction between
> positive and negative logic would really depend on whether you wanted
> a NOR or a NAND function.

I know that all, but I didn't want to go back to the roots of digital
circuits because I think it's not relevant to PCs and similar computers. 

> Note that, as a control signal, DCD uses positive logic.

If you look at the TxD/RxD lines then a "0" bit is transmitted as a positive
RS232 voltage but 0V TTL level, while a "1" bit is transmitted as a
negative RS232 voltage but a +5V TTL level. Is that called positive or
negative logic?

On the other hand, the "carrier detect" status is "true" if the RS232 signal
level is positive, and thus the TTL signal level is 0, which normally means
"false". So compared to the data lines the logic of the control line is
indeed reversed. But is this positive or negative logic?

>> However, in practice the RS23 chips built into standard PCs accept also
>> voltage levels in the range of 0..+5V as input levels.
> This is actually a very old characteristic of RS232.  It ensures that
> disconnected (0 volts) is treated as negative, so a false control signal
> and a marking data signal, which is the correct fail safe configuration.

Anyway, this feature allows to feed a TTL level PPS signal to a DCD input,
resulting in a status change that can be determined by the drivers. Care
must be taken that the correct slope of that PPS signal is evaluated by the

Which the "correct" slope is depends on several conditions: active TTL high
or low generated by the device, or active RS232 high or low generated by
the device, inverting (standard), non-inverting, or no drivers at all used
for level shifting.

Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list