home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / apple-mac-advocate-ii-fall-1997.iso / mac / MacOS / Helpful Hints and FAQs / Apple Tech Info Library / Monitor Sense Codes Defined < prev    next >
Encoding:
Text File  |  1996-12-02  |  12.8 KB  |  188 lines  |  [TEXT/ttxt]

  1. Revised:       7/3/96
  2. Security:      Everyone
  3.  
  4. Macintosh Monitor Sense Codes: Technical Description (7/96)
  5.  
  6. ======================================================================
  7.  
  8. Article Created: 04 August 1994
  9. Article Reviewed/Updated: 02 July 1996
  10.  
  11. TOPIC -----------------------------------------------------------
  12.  
  13. 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.
  14.  
  15. DISCUSSION ------------------------------------------------------
  16.  
  17. Sense Lines
  18. -----------
  19. 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.
  20.  
  21. 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.
  22.  
  23. The Original Scheme
  24. -------------------
  25. 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.
  26.  
  27. 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.
  28.  
  29. Extended Type-7 Sense Codes
  30. ---------------------------
  31. 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.
  32.  
  33. 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.
  34.  
  35. 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.
  36.  
  37. 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.
  38.  
  39. Begin_Graphic
  40.                                   _____________ Sense 1 low, Sense 2 state
  41.                                  | ____________ Sense 1 low, Sense 0 state
  42.                                  ||
  43.                               XX XX XX
  44. Sense 2 low, Sense 1 state____||    ||_________ Sense 0 low, Sense 2 state
  45. Sense 2 low, Sense 0 state_____|    |__________ Sense 0 low, Sense 1 state
  46.  
  47. Figure 1—Extended Type-7 Sense Line Decode Method
  48.  
  49. End_Graphic
  50.  
  51. Extended Type-6 Sense Line Protocol
  52. -----------------------------------
  53. 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.
  54.  
  55. 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.
  56.  
  57. Multiple Scan Monitors
  58. ----------------------
  59. 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.
  60.  
  61. Begin_Table
  62.  
  63. Table 1  Supported Multiple Scan Screen Resolutions
  64. ---------------------------------------------------
  65.  
  66. Monitor Type         Screen Resolution     Frame Rate (Hz)
  67. ------------         -----------------     ---------------
  68. Multiple Scan 14     640 x 480             66.67
  69.                      832 x 624             74.55
  70.  
  71. Multiple Scan 16     640 x 480             66.67
  72.                      832 x 624             74.55
  73.                     1024 x 768             74.93
  74.  
  75. Multiple Scan 21     640 x 480             66.67
  76.                      832 x 624             74.55
  77.                     1024 x 768             74.93
  78.                     1152 x 870             75.08
  79.  
  80. Summary
  81. -------
  82.  
  83. The three tables below summarize the contents of this tech note.
  84.  
  85. Table S-1  Sense Line Code Assignments
  86. --------------------------------------
  87.  
  88. Monitor Type          Sense 2  Sense 1  Sense 0  Frame Rate (Hz)
  89. ------------          -------  -------  -------  ---------------
  90. RGB 21"                 0        0        0         75.08
  91. Full-Page (B&W 15")     0        0        1         75.08
  92. RGB 12"                 0        1        0         60.15
  93. Two-Page (B&W 21")      0        1        1         75.08
  94. NTSC Monitor            1        0        0         59.94 †
  95. RGB 15"                 1        0        1         75.08
  96. Hi-Res (12-14")         1        1        0         66.67
  97. Multiple Scan 14" *     1        1        0        See Table 1
  98. Multiple Scan 16" *     1        1        0        See Table 1
  99. Multiple Scan 21" *     1        1        0        See Table 1
  100. No Display Connected    1        1        1          NA
  101. PAL Encoder *           1        1        1         50.00 †
  102. NTSC Encoder *          1        1        1         59.94 †
  103. VGA *                   1        1        1         59.94
  104. Super VGA *             1        1        1         55.98
  105. RGB 16" *               1        1        1         74.55
  106. PAL Monitor *           1        1        1         50.00 †
  107. RGB 19" *               1        1        1         74.93
  108.  
  109. End_Table
  110.  
  111. * These monitors require extended sense line support.
  112. † Interlaced timing.
  113.  
  114. 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.
  115.  
  116. Begin_Table
  117.  
  118. Table S-2  Extended Sense Line Code Assignments
  119.  
  120.                    Sense 2 Low    Sense 1 Low    Sense 0 Low
  121. Monitor Type           1 & 0          2 & 0          2 & 1
  122.  
  123. Multiple Scan 14" *     00             00             11
  124. Multiple Scan 16" *     00             10             11
  125. Multiple Scan 21" *     10             00             11
  126. PAL Encoder             00             00             00
  127. NTSC Encoder            01             01             00
  128. VGA/Super VGA           01             01             11
  129. RGB 16"                 10             11             01
  130. PAL Monitor             11             00             00
  131. RGB 19"                 11             10             10
  132.  
  133. * Type-6
  134.  
  135. End_Table
  136.  
  137. 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.
  138.  
  139. Begin_Table
  140.  
  141. Table S-3  Signal Assignments for the DB-15 External Video Connector
  142.  
  143. Pin       Signal Name              Signal Description
  144. ---       -----------              ------------------
  145. 1            RED.GND                  Red Ground
  146. 2            RED.VID                  Red Video Signal
  147. 3            /CSYNC                   Composite Sync Signal
  148. 4            SENSE0                   Monitor Sense Line 0
  149. 5            GRN.VID                  Green Video Signal
  150. 6            GRN.GND                  Green Ground
  151. 7            SENSE1                   Monitor Sense Line 1
  152. 8            n.c.                     Not Connected
  153. 9            BLU.VID                  Blue Video Signal
  154. 10           SENSE2                   Monitor Sense Line 2
  155. 11           C&VSYNC.GND              Ground for CSYNC & VSYNC
  156. 12           /VSYNC                   Vertical Sync Signal
  157. 13           BLU.GND                  Blue Ground
  158. 14           HSYNC.GND                HSYNC Ground
  159. 15           /HSYNC                   Horizontal Sync Signal
  160.  
  161. End_Table
  162.  
  163. Further Reference:
  164. • Guide to the Macintosh Family Hardware, Third edition, Video Displays
  165. • develop Issue 3, “Macintosh Display Card 8•24GC: The Naked Truth”
  166. • Technical Note M.HW.ColorMonitors—HW 8 - Color Monitor Connections
  167.  
  168.  
  169. This article is one of many available through the Apple Fax center. For a complete list of available fax documents, search the Tech Info Library for Apple Fax Document Index or call the Apple Fax line at 1-800-505-0171 and select document number 20000 (Apple Fax - Document Index - Product Support Literature).  The Apple Fax center is available free of charge 24 hours a day, 7 days a week.
  170.  
  171.  
  172. Article Change History:
  173. 02 Jul 1996 - Added Fax Doc word
  174. 15 Nov 1995 - Added information about Multiple Scan 14.
  175. 09 Aug 1995 - Reformatted to make more readible on the World Wide Web.
  176. 06 Apr 1995 - Corrected Multiple Scan 15 product name.
  177.  
  178. Support Information Services
  179.  
  180. Copyright 1994-96, Apple Computer, Inc
  181.  
  182. ======================================================================
  183.  
  184. Created:       8/4/94
  185. Author:        MHH
  186. Source:        SIS
  187. Library:       TECHINFO
  188. Article ID:    TECHINFO-0015987