Presentation is loading. Please wait.

Presentation is loading. Please wait.

PC Peripherals for Technicians

Similar presentations


Presentation on theme: "PC Peripherals for Technicians"— Presentation transcript:

1 PC Peripherals for Technicians
Mar 1998 PC Peripherals for Technicians Chapter Video Text Mode Operation Systems Manufacturing Training and Employee Development Copyright © 1998 Intel Corp. Rev. 2.0 Sys MFG Training/Employee Development

2 PC Peripherals for Technicians
Mar 1998 Text Mode Operation OBJECTIVES: At the end of this section, the student will be able to do the following: Discuss Video Display Modes in a Graphics System. Discuss the ASCII standard. Explain the Text Mode Video Buffer data format. Discuss Text Mode character fonts. Describe the attribute byte & the palette registers. Discuss color generation using the Video DAC. Rev. 2.0 Sys MFG Training/Employee Development

3 PC Peripherals for Technicians
Mar 1998 Display Modes Video subsystems operate in multiple display modes which control certain aspects of the video operation. Text OR Graphics; Screen Resolution; Number of colors. Numerous control registers put the video adapter hardware in a state that will allow it to produce the indicated mode. This is almost always accomplished with BIOS calls. Video modes are changed using BIOS software interrupt INT 10h, or through a high-level construct such as the int86() function in Microsoft C. Default Mode is Text Mode 03h The initial video mode is an 80-column alphanumeric mode (03h) set by the ROM BIOS during POST. Text modes display alphanumeric characters only. Rev. 2.0 Sys MFG Training/Employee Development

4 Modes supported BIOS (Partial list)
PC Peripherals for Technicians Mar 1998 Modes supported BIOS (Partial list) CGA EGA VGA MDA EGA EGA EGA EGA VGA VGA VGA Text Graphics Mode Emul. Res. Type Max Colors Scheme Char. Box Max. Pages Buff. Start 0,1 2,3 2,3! 4,5 6 7 7! D E F 10 11 12 13 320x200 320x350 360x400 640x200 640x350 720x400 720x350 640x480 8 1 4 2 16/256k 4/256k 2/256k MDA Mono VGA Mono Mono 16/356k 256/256k 40x25 80x25 80x30 8x8 8x14 9x16 9x14 8x16 B8000h B0000h A0000h ! - Indicates power-on default mode 3! - Color monitor is attached 7! - Monochrome monitor is attached Rev. 2.0 Sys MFG Training/Employee Development

5 Characteristics of VGA Mode 03h
PC Peripherals for Technicians Mar 1998 Characteristics of VGA Mode 03h Characteristics of VGA Mode 03h: Video B8000 80 Characters/line; 25 text lines frame 4000 bytes of Memory used (4000t = FA0h) 80 x 25 = 2000 characters 2000 chars * 2 bytes/char = 4000 bytes. Character size = 9 x 16 Resolution = 720 pixels x 400 raster lines 720 pixels per horizontal line 720 / 9 pixels/char -> 80 char/line 400 vertical lines 400 / 16 lines/char -> 25 text lines 15 2 4 5 9 1 3 6 7 8 10 11 12 13 14 Rev. 2.0 Sys MFG Training/Employee Development

6 Characteristics of VGA Mode 03h
PC Peripherals for Technicians Mar 1998 Characteristics of VGA Mode 03h Characteristics of VGA Mode 03h Horizontal Freq. = 31.5 KHz (lines/sec) Vertical Freq = 70 Hz (frames/sec) 31.5 KHz / 70 Hz ~ 449 lines per frame Only 400 displayed due to overscan Dot Clock = MHz (28,322,000 dots per second) MHz / 31.5 KHz = 900 dots/line 100 chars/ line * 9 dots / char = 900 dots/line Only 80 chars/line displayed due to overscan Number of colors = 16 (2 4 = 16) Attribute Byte is two 4-bit fields: Foreground Color: Bits 0-3 Background Color: Bits 4-7 Displayed Video Buffer area 720 pixels x 400 lines Rev. 2.0 Sys MFG Training/Employee Development

7 Mode 3: Display Memory Map
PC Peripherals for Technicians Mar 1998 Mode 3: Display Memory Map Bit Planes 0, 1 B8000 B8F9F B9000 B9F9F BA000 BAF9F Page 0 Bit Planes 0, 1 Display Data 0000 0000 4000 Bytes Page 1 3999 4000 4095 0F9Fh 0FA0h 0FFFh Page 2 96 Bytes Unused Typical Page: 80x25 = 4000 Bytes A Display Page is one screen of text. Int 10h Function 5 sets the active page. BE000 BEF9F BF000 BFF9F Page 6 Page 7 THE 32K BETWEEN B BFFFF CAN HOLD UP TO 8 DISPLAY PAGES (8 * 4096 = 32K) NOTE: The memory between A0000h & B7FFFh is not used for display in this mode. Rev. 2.0 Sys MFG Training/Employee Development

8 PC Peripherals for Technicians
Mar 1998 ASCII Standard American Standard Code for Information Interchange ASCII (pronounced “askey”) is a 7 bit code used to achieve compatibility between data services. The ASCII standard ensures that each of the common characters are assigned a unique code that is the same, regardless of keyboard, computer or monitor. Common characters include: Alphabet: Upper & lower case (A,a,B,b, ... Z,z) Numbers: (0,1,2...8,9) Symbols: $, [, ~, etc) Non printable characters: Control chars (^G, ^H), etc. Extended ASCII characters includes codes for multiple keys (e.g. - CTL-ALT-DEL). Rev. 2.0 Sys MFG Training/Employee Development

9 Decimal To Hex to ASCII Conversion
PC Peripherals for Technicians Mar 1998 Decimal To Hex to ASCII Conversion Dec Hex ASCII 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 NAK 23 24 25 26 27 28 29 30 31 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1-XON DC2 DC3-XOFF DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F NAK 1A 1B 1C 1D 1E 1F 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 22 2A 2B 2C 2D 2E 2F 3A 3B 3C 3D 3E 3F SP ! # $ % & ( ) * + , - . / : ; < = > ? 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 4A 4B 4C 4D 4E 4F 5A 5B 5C 5D 5E 5F @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z { \ } ^ _ 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 6A 6B 6C 6D 6E 6F 7A 7B 7C 7D 7E 7F a b c d e f g h i j k l m n o p q r s t u v w x y z | ~ DEL Rev. 2.0 Sys MFG Training/Employee Development

10 Putting a character on the screen
PC Peripherals for Technicians Mar 1998 Putting a character on the screen BIOS ( INT 10h) Dot Stream To Monitor A 41 07 Video RAM ASCII Char Code 41h h ATTR Info (colors) Video Controller Video Signal Generator CRT Controller Alphanumeric Character Attribute Decoder Color & Intensity Dot Pattern Horiz & Vert Timing BUS Interface Microprocessor O/S or Application Software Write “A” on Screen - Call INT 10h AH=09 AL=41 Rev. 2.0 Sys MFG Training/Employee Development

11 Putting a character on the screen
PC Peripherals for Technicians Mar 1998 Putting a character on the screen In Text Mode each character is represented in the Video Buffer by a pair of bytes: The first byte represents the character’s ASCII value. The second byte represents the character’s attribute (i.e. color of foreground/background, blinking, intensity) The Video Controller reads out the character codes and attributes simultaneously from the video buffer. Each location in the video hardware’s display buffer maps to a location on the display screen. The first byte of the display buffer maps to the top, leftmost point on the screen. As memory addresses increase, the screen location moves from left to right & top to bottom. Rev. 2.0 Sys MFG Training/Employee Development

12 Putting a character on the screen
PC Peripherals for Technicians Mar 1998 Putting a character on the screen Examining the contents of the video buffer shows how the data corresponds to the characters on the screen AMIBIOS (C) American Megatrends, Inc BIOS Version CA3C KB Please Wait... Image on screen >byte 0b8000p length 40 (ITP cmd to display memory) 0x b8000P d 'A.M.I.B.' 0x b8008P f 'I.O.S. .' 0x b8010P '(.C.).1.' 0x b8018P ' ' 0x b8020P d 'A.m.e.r.' 0x b8028P e 07 'i.c.a.n.' 0x b8030P d ' .M.e.g.' 0x b8038P 'a.t.r.e.' Video Buffer Each Character Code is followed by it’s Attribute Byte Rev. 2.0 Sys MFG Training/Employee Development

13 Putting a character on the screen
PC Peripherals for Technicians Mar 1998 Putting a character on the screen Viewing the Video Buffer as Bit Planes Bit Plane 1 2000 bytes (7D0h) Bit Plane 0 C.0 B8000 C.1 B8002 C.79 B809E C.80 B80A0 C.81 B80A1 C.159 CHARACTER ATTRIBUTE A.0 B8001 A.1 B8003 A.79 B809F C.0. = Character position B8000 A.0. = Attribute position B8001 Rev. 2.0 Sys MFG Training/Employee Development

14 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation First we’ll describe Font Generation from the Character Byte, then color generation using the Palette & the Attribute Byte. The number of text lines displayed depends on the vertical resolution: e.g. - The default text mode 03h (720 x 400) has 400 raster lines. The 9x16 FONT with a character matrix height of 16 pixels, produces 25 lines of text in mode 03h. 400 / 16 = 25 text lines and / 9 = 80 characters / line Other modes such as the 132x43 VGA text mode 54h (1056 x 350) use different character sets such as the 8 x 8 character matrix displaying 43 lines of text. e.g / 8 = 43 text lines (Mode 54h: 1056 x 350) e.g / 8 = 132 characters (Mode 54h: 1056 x 350) Rev. 2.0 Sys MFG Training/Employee Development

15 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation = Foreground color = Background color Character Box - Pixel pattern for “A” 9 X 16 VGA text-mode character box * The right-hand column of pixels is a duplicate of the pattern in Column 0 Data = 38h binary Bit Pattern of font as stored in memory 15 * 2 4 5 9 1 3 6 7 8 10 11 12 13 14 00 38 6C C6 FE Characters can be 9 dots wide in some modes and 8 dots wide in others. Default VGA Text Video Mode 3 Character Row #’s Note: The 9th pixel is usually blank except for ASCII codes C0h-DFh These characters (used for drawing frames & borders) create unbroken horizontal lines that can be connected without any space in between them. Rev. 2.0 Sys MFG Training/Employee Development

16 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation Because the 8-bit ASCII codes can’t be directly displayed on the the screen, they are translated by the hardware Alphanumeric Character Generation circuitry into the pixel patterns corresponding to those codes. e.g. 41h = “A” Regardless of the fonts character size, 32 (20h) bytes is reserved for each of the 256 characters. The BIOS contains a default table of character bit patterns. Each character table occupies 8 KB of memory. 32 bytes/ character * 256 characters = 8192 bytes. Up to 8 character sets can be resident in Bit Plane 2. 8 * 8KB = 64KB (A AFFFF) Rev. 2.0 Sys MFG Training/Employee Development

17 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation 32 (20h) bytes are reserved for each of the 256 character fonts Character Generator would use ASCII code of 41h to get the start address of the bit patterns for font “A” to display. e.g. 41h x 20h = 820h (offset from base of A0000h) Attribute Controller (Palette) CRT Character Gen [Lookup Table] (Bit Plane 2) e.g. A0823 Character Row (e.g. 3) Latch Memory Addr (e.g. B8000) Dots (41h) Character Memory Bit Plane 0 (07h) Attribute Memory Bit Plane 1 (e.g. B8001) Video Buffer (DRAM) R G B Rev. 2.0 Sys MFG Training/Employee Development

18 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation The Character Generator uses a Bit plane 2 as a Lookup Table to translate the ASCII value into a matrix of dots called a character box or cell to display on the screen. The default font is automatically copied from ROM to video memory map 2 when a TEXT display mode is selected via the BIOS. Direct access by the CPU to Bit plane 2 is not allowed when the Video Controller is programmed during POST. Bit plane 2 (which is loaded by the BIOS during POST) is accessed internally by the Video Controller hardware and is not normally visible to the programmer. To be able to read the bit pattern, it is necessary to re-program the video controller so the automatic odd/even addressing shuffle in text mode is not utilized. Rev. 2.0 Sys MFG Training/Employee Development

19 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation The 32 bytes stored in Bit Plane 2 for ASCII code 41 are: 0x a0820P c c6 c6 fe '...8l...' 0x a0828P c6 c6 c6 c ' ' 0x a0830P ' ' 0x a0838P ' ' Note: Address A0823h contain 38h ( binary) The above pattern was read after programming the Video Controller to read Map 2 (not normally visible to the programmer). 32 (20h) bytes are reserved for each character. The start address is calculated as follows for “A” (41h): A0000h + (20h * 41h) => A0000h + 820h => A0820h The start address calculated for “a” (61h) would be: A0000h + (20h * 61h) => A0000h +C20h => A0C20h Rev. 2.0 Sys MFG Training/Employee Development

20 Text Mode Character Generation
PC Peripherals for Technicians Mar 1998 Text Mode Character Generation Character Fonts - Bit Plane 2 9 X 16 VGA text-mode character box 15 * 2 4 5 9 = Foreground color = Background color 1 3 6 7 8 10 11 12 13 14 0a082b 0a082d 0a082e 0a0820 0a0821 0a0823 0a0822 0a0824 0a0825 0a0826 0a0827 0a0828 0a0829 0a082a 0a082c 0a082f 00 38 6C C6 FE Character Generator would use ASCII code of 41h to get the start address of the bit patterns for font “A” to display. e.g. 41h x 20h = 820h NOTE: Offset of each scan line from start address of ASCII 41h. e.g. 4th scan line (Char Row 3) addr => 820+3= 823h A0823h = 38h ( binary) To display 1 row of characters, the CRTC reads out 80 8-bit codes from character memory 16 times in succession for an 80 x 25 display. Rev. 2.0 Sys MFG Training/Employee Development

21 Color Generation - Text Mode 3
PC Peripherals for Technicians Mar 1998 Color Generation - Text Mode 3 Now we’ll describe the Attribute Byte and Color Generation In alphanumeric modes, the microprocessor writes each symbol to the video buffer as a series of 2 bytes. e.g. B800:0 = 41h, B800:1 = 07h Low-order byte = (41h); High-order byte (07h) Low-order byte 8-bit character code 4-bit foreground attribute 4-bit background attribute High-order byte Rev. 2.0 Sys MFG Training/Employee Development

22 Color Generation - Text Mode 3
PC Peripherals for Technicians Mar 1998 Color Generation - Text Mode 3 The second byte represents the character’s attribute (i.e. color of foreground/background, blinking, intensity) Video Buffer (DRAM) Attribute Controller (Palette) CRT Character Gen [Lookup Table] (Bit Plane 2) e.g. A0820 Character Row Latch Memory Addr Dots (41h) Character Memory Bit Plane 0 (e.g. B8000) (07h) Attribute Memory Bit Plane 1 (e.g. B8001) R G B Each attribute nibble selects registers in the color palette Rev. 2.0 Sys MFG Training/Employee Development

23 Color Generation - Text Mode 3
PC Peripherals for Technicians Mar 1998 Color Generation - Text Mode 3 ATTRIBUTE BYTE: The Video hardware translates the attribute nibbles into the indicated foreground & background colors. e.g. [ ] -> 07h = Normal (white on black) e.g. [ ] -> 0Fh = High Intensity e.g. [ ] -> 81h = Blinking Blue Attribute Bits 7 - Blinking (Note: No intensity component) 6 - Background color - Red component 5 - Background color - Green component 4 - Background color - Blue component 3 - Foreground color - Intensity component 2 - Foreground color - Red component 1 - Foreground color - Green component 0 - Foreground color - Blue component Rev. 2.0 Sys MFG Training/Employee Development

24 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette The color palette is a lookup table consisting of 16 six-bit values in the Attribute Controller. Port 3C0, 3C1 Offset 00-0Fh (16 registers) Each character can be displayed in any of 16 foreground colors (bits 3-0) and 8 background colors (bits 6-4). One reason for using a color palette is that the total number of possible colors can be greater than the number of colors that can be displayed simultaneously 16 colors simultaneously out of 64 colors combinations. A total of 64 colors combinations are available with 6 bits. (26 = 64) With 16 registers, 16 colors can be loaded into the Palette Registers at the same time. Rev. 2.0 Sys MFG Training/Employee Development

25 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette Each of the 16 Palette Registers contains six bits. On earlier EGA cards, these 6 bits directly correspond to the signals going to the monitor. The EGA TTL level monitor color signal pins were: RED, red, GREEN, green, BLUE, blue where each color had 2 signals, one representing a brighter, more intense display (r,g,b) and the other for a normal display (RGB). Note: VGA uses analog signal levels and the 6 bits in the Palette Registers are inputs to the Video DAC (Digital to Analog Converter) which can produce the same colors as on a TTL EGA system. Rev. 2.0 Sys MFG Training/Employee Development

26 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette X X r g b R G B BLUE GREEN RED blue green red X X => Green Memory Buffer Example: B8000 = 41 (ASCII Capital A) B8001 = 52 (Attribute) Foreground Pixels = 2 Background Pixels = 5 Produces Green Character “A” on magenta background TO DAC e.g. - Attribute Nibble = 2h: Palette = 2h = xx b xx => Green (G) Foreground Pixels e.g. - Attribute Nibble = 5h: Palette = 5h = xx b xx b => Magenta (R+B) ~ purple Rev. 2.0 Sys MFG Training/Employee Development

27 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette X X r g b R G B BLUE GREEN RED blue green red X X => White Memory Buffer Example: B8000 = 41 (ASCII Capital A) B8001 = 07 (Attribute) Foreground Pixels = 7 Background Pixels = 0 Produces White Character “A” on black background TO DAC e.g. - Attribute Nibble = 7h: Palette = 7h = xx b xx b => White (R+G+B) Foreground Pixels e.g. - Attribute Nibble = 0h: Palette = 0h = xx b xx => Black (no colors) Background Pixels Rev. 2.0 Sys MFG Training/Employee Development

28 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette RED, red, GREEN, green, BLUE, blue where each color has 2 signals, one representing a brighter, more intense display (r,g,b) and the other for a normal display (R,G,B). Note: r, g, & b, are all selected when Bit 3 of foreground Attribute nibble is a one. e.g. - 9h = 1001b for “light blue” [intense] X X r g b R G B I R G B X X r g b R G B BLUE GREEN RED blue green red X X => Light Blue Light Blue (r+g+b + B) [XX ] white + Blue Rev. 2.0 Sys MFG Training/Employee Development

29 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette The following 2 tables show the relationship between the Attribute nibble value, the Palette Register value, and the color displayed. (Values loaded by BIOS) Attribute Nibble Palette Value Default Color 0h 00h Black [ xx ] 1h 01h Blue (B) [ xx ] 2h 02h Green (G) [ xx ] 3h 03h Cyan (G+B) [ xx ] 4h 04h Red (R) [ xx ] 5h 05h Magenta (R+B) [ xx ] 6h 14h Brown (g+R) [ xx ] 7h 07h White (R+G+B) [ xx ] e.g., Black Background Modified Brown e.g., White Foreground Rev. 2.0 Sys MFG Training/Employee Development

30 Color Generation - The Palette
PC Peripherals for Technicians Mar 1998 Color Generation - The Palette Relationship between the Attribute nibble value, the Palette Register value, and the color displayed. (Cont.) Note: r, g, & b are all selected when Bit 3 of foreground Attribute nibble is a one. e.g., 9h = 1001b for “light blue” [intense] Attribute Nibble Palette Value Default Color 8h 38h Dim White (r+g+b) [xx ] Dark Gray 9h 39h Light Blue (r+g+b+B) [xx ] Ah 3Ah Light Green (r+g+b+G) [xx ] Bh 3Bh Light Cyan (r+g+b+G+B ) [xx ] Ch 3Ch Light Red (r+g+b+R) [xx ] Dh 3Dh Lt Magenta (r+g+b+R+B) [xx ] Eh 3Eh Yellow (r+g+b+R+G) [xx ] Fh 3Fh Int. White (r+g+b +R+G+B)[xx ] Rev. 2.0 Sys MFG Training/Employee Development

31 Colors: The Digital to Analog Converter
PC Peripherals for Technicians Mar 1998 Colors: The Digital to Analog Converter VGA uses ANALOG SIGNAL LEVELS to drive the monitor, and the 6 bits in the Palette Registers are inputs to the Video DAC. The 6-bit Palette Register output combined with 2 bits from a Color Select register to form an 8-bit value passed to the DAC. 4-bit Attribute From Video Buffer (1 of 16 Registers) 6-bits (bits 0-5) r,g,b,R,G,B (1 of 64 8-bits (1 of 256 [FFh] [4 banks of 64 [3Fh] colors] bits 6 & 7 (Mode 3=00) Attr Ctlr Palette Registers 3C0, 3C1 Offsets 00-0Fh Attribute Controller Color Select Register Ports 3C0, 3C1 Offset Bits 3 & 2 (1 of 4 banks) VIDEO DAC 3C7, 3C8, 3C9 00-FFh [Note: 00-3Fh w/ 6 bits] R G B To Monitor Analog Output V Attribute Mode Control Reg Offset Bits 7 = 0 (Palette Size Select - 16 color 4 banks of 64 entries) Additional information NOT covered in class Rev. 2.0 Sys MFG Training/Employee Development

32 Colors: The Digital to Analog Converter
PC Peripherals for Technicians Mar 1998 Colors: The Digital to Analog Converter The Video DAC use the 8-bit input to select one of its 256 color registers. Each of DAC 256 color registers contains an 18-bit RGB specification (6-bits for each color: 3 x 6 = 18) The 4-bit attribute value decodes into a set of three analog RGB values to the monitor. The larger the number contained in the DAC register, the greater the analog output voltage. By default, the Video BIOS initializes the first 64 DAC registers with RGB values to produce the the same 64 colors available on the EGA. The 6 bits from the Palette Registers select 1 of 64 (00 - 3Fh) registers in the DAC. Rev. 2.0 Sys MFG Training/Employee Development

33 Colors: The Digital to Analog Converter
PC Peripherals for Technicians Mar 1998 Colors: The Digital to Analog Converter BIOS initializes the DAC to emulate EGA in Text Mode: 00h => XX b => 00t: Black (0 v - 0% Saturation) 15h => XX b => 21t: Dim (Low Intensity - 33% ) 2Ah => XX b => 42t: Normal (Medium Int. - 66%) 3Fh => XX b => 63t: High (High Intensity (0.7 v -100%) Palette Value - Color (Offset in DAC) DAC Red Green Blue 00 - Black 00 01 - Normal Blue (B) 2A 02 - Normal Green (G) 03 - Cyan (G+B) 04 - Normal Red (R) 05 - Magenta (R+B) 14 - Brown ( g+R) 15 07 - White (R+G+B) 39 - Light Blue ( r+g+b+B) 3F 3C - Light Red ( r+g+b+R) 3F - Bright White Note that the 64t bits are divided into 3 groups with a separation of 21t between each intensity level. The larger the number contained in the DAC register, the greater the analog output voltage. NOTE: This is only a partial list of the 256 DAC registers. Rev. 2.0 Sys MFG Training/Employee Development

34 Colors: The Digital to Analog Converter
PC Peripherals for Technicians Mar 1998 Colors: The Digital to Analog Converter I R G B X X Bit 3 1 Bit 2 Bit 1 Bit 0 Ch => 1100 From Video Buffer Foreground Color Value (e.g.-Low Nibble from B80001) Palette Reg Number (Ch) Palette Register Reg 15t Data = 3F Reg 15t Data = 3E Reg 13t Data = 3D Reg 12t Data = 3C Reg 03t Data = 03 Reg 02t Data = 02 Reg 01t Data = 01 Reg 00t Data = 00 Video DAC 3F A 00 2A 00 00 2A 2A 3F 3F 3F 3F 3F 15 3F F FFh=255t 254t 253t 252t 3Ch=060t 003t 002t 001t 000t Color # R G B Notes: 1- Attribute C hex produces Light Red (White + Red) 2- 3Ch=60t=xx Binary 60t -> decimal (base ten) 3Ch => xx 6 bits in Palette Reg selected by 0Ch address 3Ch => 3F 15 15 18 bits in DAC selected by 3Ch address I R G B Rev. 2.0 Sys MFG Training/Employee Development

35 PC Peripherals for Technicians
Mar 1998 REVIEW & SUMMARY WE HAVE DISCUSSED THE FOLLOWING: Video Display Modes in a Graphics System Video subsystems operate in multiple display modes which control certain aspects of the video operation. Text OR Graphics; Screen Resolution; Number of colors. Characteristics of VGA Mode 03h Video B8000h Character size = 9 x 16 Resolution = 720 pixels x 400 lines 80 Characters/line; 25 lines frame (screen) 4K of Memory used (2K chars * 2 bytes/char = 4K bytes) 15 2 4 5 9 1 3 6 7 8 10 11 12 13 14 Rev. 2.0 Sys MFG Training/Employee Development

36 PC Peripherals for Technicians
Mar 1998 REVIEW & SUMMARY The ASCII standard. The ASCII standard ensures that each of the common characters are assigned a unique 7 bit code that is the same, regardless of keyboard, computer or monitor. The Text Mode Video Buffer data format. In Text Mode each character is represented in the Video Buffer by a pair of bytes: The first byte represents the character’s ASCII value. The second byte represents the character’s attribute Each location in the video hardware’s display buffer maps to a location on the display screen. As memory addresses increase, the screen location moves from left to right & top to bottom. Rev. 2.0 Sys MFG Training/Employee Development

37 PC Peripherals for Technicians
Mar 1998 REVIEW & SUMMARY Text Mode character fonts. The Character Generator uses a Bit plane 2 as a Lookup Table to translate the ASCII value into a matrix of dots called a character box or cell to display on the screen. The font is automatically copied from ROM to video memory map 2 when a TEXT display mode is selected via the BIOS. The attribute byte. The Video hardware translates the attribute nibbles into the indicated foreground & background colors. Attribute Bits 7 - Blinking (Note: No intensity component) 6 - Background color - Red component 5 - Background color - Green component 4 - Background color - Blue component 3 - Foreground color - Intensity component 2 - Foreground color - Red component 1 - Foreground color - Green component 0 - Foreground color - Blue component Background Nibble Foreground Nibble Rev. 2.0 Sys MFG Training/Employee Development

38 PC Peripherals for Technicians
Mar 1998 REVIEW & SUMMARY The palette registers. Each of the 16 Palette Registers contains six bits. r, g, & b, are all selected when Bit 3 of foreground Attribute nibble is a one .e.g. - 9h = 1001b for “light blue” [intense] Color generation using the Video DAC. VGA uses analog signal levels to drive the monitor, and the 6 bits in the Palette Registers are inputs to the DAC. X X r g b R G B I R G B X X 4-bit Attribute From Video Buffer (1 of 16 Regs) 6-bits (bits 0-5) r,g,b,R,G,B (1 of 64 Registers) 8-bits (1 of 256 [FFh] [4 banks of 64 [3Fh] colors] bits 6 & 7 (Mode 3=00) Attr Ctlr Palette Registers 3C0, 3C1 Offsets 00-0Fh VIDEO DAC 3C7, 3C8, 3C9 00-FFh [Note: 00-3Fh w/ 6 bits] R G B To Monitor Analog Output V End of Chapter 3-2 Rev. 2.0 Sys MFG Training/Employee Development


Download ppt "PC Peripherals for Technicians"

Similar presentations


Ads by Google