Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

Macintosh Monitor Sense Codes

From Higher Intellect Vintage Wiki
Jump to navigation Jump to search
Apple Computer, Inc. -- Technical Information Retrieval System

Document Retrieved: /wais/TIL/Macintosh Hardware/Monitor Sense Codes
Defined

(Note: This article was extracted from the Apple Tech Info Library, Apple's
official technical support database. Look for the Apple Tech Info Library
on AppleLink, eWorld, CompuServe, and on the Internet on both the Home
Gopher Server and Apple's Worldwide Web server: www.info.apple.com.)

Macintosh Monitor Sense Codes: Technical Description (8/94)

Article Created: 04 August 1994

TOPIC -----------------------------------------------------------

The following article is based on a Macintosh Tech Note titled "HW 30 -
Sense Lines" originally written by Rich Collyer and Blake Roberts. It
provides a detailed explanation of the standard and extended sense codes
used to determine which monitor is connected to a particular Macintosh
computer or video card.

DISCUSSION ------------------------------------------------------

Sense Lines

The sense line protocol was implemented when Apple recognized the need for
a mechanism that would allow a display card to identify the monitor
connected to it. For example, the built-in video display circuitry on CPUs
such as the Macintosh Quadras and the PowerBook 160 and 165c can configure
itself according to the monitor that is connected at boot time. The
identification scheme works fine, but there is one problem. There are only
three sense lines and this limits the number of different monitors to seven
plus the no-connect case. To overcome this limitation, newer display cards
and built-in video use extensions to the sense line scheme that allow for
new codes.

The first extension, type-7, is based on the following idea: When the
display circuitry senses a configuration that in the original scheme
signals ³no display connected² (i.e. when none of the three sense lines are
grounded), the card pulls down each sense line, one by one, and reads what
the other lines return. To return a unique code, the only requirement is
that the sense lines be interconnected, in the cable or the monitor itself,
by wires or diodes. The beauty of this idea is that existing monitors are
detected correctly and newer monitors can have their own encoding. The
circuitry for detecting new monitors is relatively simple and has no active
components. Adding the encoding to new or existing monitors involves only
inexpensive diodes and wire. The type-6 extension has a similar approach.

The Original Scheme

-------------------

In the original scheme, the display circuitry determines the type of
monitor attached by reading three sense lines and comparing the signal
value to ground. By convention, the sense lines are identified as 2, 1, and
0. Given three lines and two different states, on or off, there are a total
of eight possible combinations. For a monitor to be recognized, a sense
line on the monitor side is connected to ground to be read as a binary 0,
or left unconnected to be read as a binary 1.

The first seven monitors listed in Table S-1 show the required sense line
states for them to be recognized using the original sense line scheme. It¹s
worth noting that monitors using the original scheme need only have their
sense lines read once to determine the monitor type. As new monitor types
became available for the Macintosh, the extended sense line protocol was
implemented.

Extended Type-7 Sense Codes

---------------------------

The extended sense line protocol is one of those oddities of software
engineering that at first seems to defy logic. The protocol sets a standard
for defining a 6-bit binary number that represents how the sense lines must
respond for the monitor to be recognized correctly.

With this unusual introduction, let¹s step back. Under the original scheme,
sense lines were compared to ground to determine their state. To reiterate,
with three pins there are a total of eight possible combinations, 000 (all
grounded) to 111 (none grounded). Seven combinations of the sense line
states are assigned to early monitor types. The eighth combination, 111
(signifying "no display connected" in the original scheme), is used to
signal the extended type-7 sense line code protocol. This is also known as
the no-connect sense line code protocol. The type-7 designation derives
from the fact that the three sense lines are high relative to ground and
can be represented in binary format as 0b111 or $07.

To implement the type-7 sense line protocol, the sense lines get tied to
each other within the monitor using a combination of straight wire and/or
diode connections. When the display system software reads the state of the
three monitor sense lines and finds that none of them are grounded, it
begins dynamic polling. The software tells the video card/hardware to
assert each sense line and read the other two lines. Instead of being
compared to ground, each line is compared to the asserted line. If a sense
line has the same state as the asserted sense line, the state equates to a
binary 0, otherwise it is binary 1.

The diagram in Figure 1 illustrates the type-7 sense line protocol
notation. There are three pairs of binary numbers. Each pair of binary
digits represents the relative state of two sense line pins to the third,
which is held low. The pairs are always in the order: sense 2 low, sense 1
low, sense 0 low. Each bit in a pair is sense line specific, with the
higher sense line bit to the left.

_____________ Sense 1 low, Sense 2 state

| ____________ Sense 1 low, Sense 0 state

||

XX XX XX

Sense 2 low, Sense 1 state____|| ||_________ Sense 0 low, Sense 2 state

Sense 2 low, Sense 0 state_____| |__________ Sense 0 low, Sense 1 state

Figure 1‹Extended Type-7 Sense Line Decode Method

Extended Type-6 Sense Line Protocol

-----------------------------------

With the implementation of the Display Manager, the sense line protocol was
extended further for a new family of monitors. The same method that gives
the extended type-7 sense line protocol its designation applies to the
three cases where one sense line is grounded. For the extended type-6 sense
line protocol, pin 4, i.e. sense line 0, is grounded to pin 11 (see Table
S-3) and the binary notation is expressed as 0b110 ($06) with the least
significant bit representing sense line 0.

From Table S-1 below, note that the sense line configuration for this case
corresponds to the Apple Hi-Res monitor. To extend the support of monitors
in this family, one can add three new codes by connecting sense lines 1 and
2 with a jumper, or a diode in either direction. These new extended type-6
sense codes support three new monitor types which are capable of supporting
the standard 640x480 resolution and other resolutions. See "Multiple Scan
Monitors" below.

Multiple Scan Monitors

----------------------

The Power Macintosh VRAM expansion cards include support for three new
monitor types which use the extended type-6 sense codes. These new types
are multiple scan rate monitors which can display in multiple screen
resolutions. The VRAM expansion cards being shipped with the Power
Macintosh units will support the multiple scan monitors with the
resolutions listed in Table 1. Note that the Apple Multiple Scan 17 Display
is sensed as a multiple scan 16 display type and the Apple Multiple Scan 20
Display is sensed as a multiple scan 21 display type.

Table 1 Supported Multiple Scan Screen Resolutions

---------------------------------------------------

Monitor Type Screen Resolution Frame Rate (Hz)

------------ ----------------- ---------------

Multiple Scan 14 640 x 480 66.67

832 x 624 74.55

Multiple Scan 16 640 x 480 66.67

832 x 624 74.55

1024 x 768 74.93

Multiple Scan 21 640 x 480 66.67

832 x 624 74.55

1024 x 768 74.93

1152 x 870 75.08

Summary

-------

The three tables below summarize the contents of this tech note.

Table S-1 Sense Line Code Assignments

--------------------------------------

Monitor Type Sense 2 Sense 1 Sense 0 Frame Rate (Hz)

------------ ------- ------- ------- ---------------

RGB 21" 0 0 0 75.08

Full-Page (B&W 15") 0 0 1 75.08

RGB 12" 0 1 0 60.15

Two-Page (B&W 21") 0 1 1 75.08

NTSC Monitor 1 0 0 59.94 İ

RGB 15" 1 0 1 75.08

Hi-Res (12-14") 1 1 0 66.67

Multiple Scan 14" * 1 1 0 See Table 1

Multiple Scan 16" * 1 1 0 See Table 1

Multiple Scan 21" * 1 1 0 See Table 1

No Display Connected 1 1 1 NA

PAL Encoder * 1 1 1 50.00 İ

NTSC Encoder * 1 1 1 59.94 İ

VGA * 1 1 1 59.94

Super VGA * 1 1 1 55.98

RGB 16" * 1 1 1 74.55

PAL Monitor * 1 1 1 50.00 İ

RGB 19" * 1 1 1 74.93

* These monitors require extended sense line support.

İ Interlaced timing.

Note: The binary values in this table indicate the relative state of the
sense pin measured against monitor ground, pin 11, on the DB-15 connector
depicted in Table S-3 below.

Table S-2 Extended Sense Line Code Assignments

Sense 2 Low Sense 1 Low Sense 0 Low

Monitor Type 1 & 0 2 & 0 2 & 1

Multiple Scan 14" * 00 00 11

Multiple Scan 16" * 00 10 11

Multiple Scan 21" * 10 00 11

PAL Encoder 00 00 00

NTSC Encoder 01 01 00

VGA/Super VGA 01 01 11

RGB 16" 10 11 01

PAL Monitor 11 00 00

RGB 19" 11 10 10

* Type-6

Note: In this table, the column under "Sense 2 Low 1 & 0" indicates the
values the software is reading from monitor sense lines 1 and 0 while
driving sense line 2 low. Suppose you have a PowerBook 180c and you want it
to believe there is an Apple 16" RGB monitor attached. The sense line code
in Table S-2 for this monitor is 10 11 01. As shown in Figure 3, this sense
code equates to sense line 2 being connected to sense line 0 with a jumper.
Based on Table S-3, your tying pin 4 to pin 10 will make the PowerBook
think that the 16" monitor is attached. It¹s important to recognize that
pins 4 and 10 in this example must not be tied to ground, otherwise a 12"
RGB monitor would be indicated.

Table S-3 Signal Assignments for the DB-15 External Video Connector

Pin Signal Name Signal Description

--- ----------- ------------------

1 RED.GND Red Ground

2 RED.VID Red Video Signal

3 /CSYNC Composite Sync Signal

4 SENSE0 Monitor Sense Line 0

5 GRN.VID Green Video Signal

6 GRN.GND Green Ground

7 SENSE1 Monitor Sense Line 1

8 n.c. Not Connected

9 BLU.VID Blue Video Signal

10 SENSE2 Monitor Sense Line 2

11 C&VSYNC.GND Ground for CSYNC & VSYNC

12 /VSYNC Vertical Sync Signal

13 BLU.GND Blue Ground

14 HSYNC.GND HSYNC Ground

15 /HSYNC Horizontal Sync Signal

Further Reference:

€ Guide to the Macintosh Family Hardware, Third edition, Video Displays

€ develop Issue 3, ³Macintosh Display Card 8€24GC: The Naked Truth²

€ Technical Note M.HW.ColorMonitors‹HW 8 - Color Monitor Connections

Support Information Services

Copyright 1994, Apple Computer, Inc

Keywords:

===============================================================================

This information is from the Apple Technical Information Library.