1 / 20

EEL 3705 / 3705L Digital Logic Design

EEL 3705 / 3705L Digital Logic Design. Spring 2007 Instructor: Dr. Michael Frank Modules #90-99 (Extra Slides): Design Examples Module #92: VGA Text Output – ASCII Character Generator. Character Codes. ASCII, Unicode.

borst
Download Presentation

EEL 3705 / 3705L Digital Logic Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EEL 3705 / 3705LDigital Logic Design Spring 2007Instructor: Dr. Michael FrankModules #90-99 (Extra Slides): Design Examples Module #92: VGA Text Output –ASCII Character Generator M. Frank, EEL3705 Digital Logic, Fall 2006

  2. Character Codes ASCII, Unicode M. Frank, EEL3705 Digital Logic, Fall 2006

  3. The ASCII Character CodeAmerican Standard Code for Information Interchange Standards ANSI INCITS 4-1986 (R2002), ANSI X3.4-1986 (R1997), ISO 646-1983 Control codeglyphs; normally not printed. From ANSI X3.32-1973,ISO 2047-1975 Meanings ofcontrol codes are defined at:http://www.cs.tut.fi/~jkorpela/chars/c0.html optional8th bit may be 0, or used for parity or for code extensions M. Frank, EEL3705 Digital Logic, Fall 2006

  4. Symbols I’ll Use for the Non-Printing ASCII Control Characters You can insert any of these special symbols into MS Word documents using the Insert Symbol menu command and a Unicode font such as Arial Unicode MS. M. Frank, EEL3705 Digital Logic, Fall 2006

  5. ASCII Code Example • Represent the string “Hello, World!” in ASCII code as a sequence of hexadecimal digits. Use the unit separator (∫) control character to delimit the end of the string. • Or, written out as a single enormous number, this is: 4865,6C6C,6F2C,2057,6F72,6C64,211F16. • Writing commas between every 4 hex digits for readability. M. Frank, EEL3705 Digital Logic, Fall 2006

  6. VGA Text DisplayProgramming Examples Character Generator and Text Page Display for the FLEX 10K M. Frank, EEL3705 Digital Logic, Fall 2006

  7. Goal of Next Example: Make the FLEXDisplay my ASCII Table! M. Frank, EEL3705 Digital Logic, Fall 2006

  8. VGA_char: Initial circuit for testing ability to display text characters • Uses the same VGA_driver module. • Down-samples to 320×240 resolution. • Fills display w. an 80×24 array of null symbols “∅” . • Each glyph rendered as 6×10 fat (2×2) pixels. • White text on black background. Read and writeports are registered – this is actuallyunnecessary. M. Frank, EEL3705 Digital Logic, Fall 2006

  9. Design & Entry of Text Character Font • Hand-draw each character glyph as a 6×8 block of pixels within an 8×10 pixel character space. NUL_glyph.mif file DEPTH = 8; WIDTH = 6; ADDRESS_RADIX = HEX; DATA_RADIX = BIN; CONTENT BEGIN 0 : 001101; 1 : 010010; 2 : 100101; 3 : 101001; 4 : 010010; 5 : 101100; 6 : 000000; 7 : 000000; END; • Encode pixel bits in a .mif file used to initialize a ROM module for the font data. descenderarea verticalspacing M. Frank, EEL3705 Digital Logic, Fall 2006

  10. Output of VGA_char Example M. Frank, EEL3705 Digital Logic, Fall 2006

  11. Design for a complete 128-character ASCII font including color glyphs for control pictures M. Frank, EEL3705 Digital Logic, Fall 2006

  12. Display circuit for 128-character color font ASCII table Uses a 1,024×6 bitfont pixel ROM anda 128×3 bit (rgb) font color ROM. Note: We set the first two columns of each character (rather than the last 2) to be 0. This gives an extra 2 clock cycles of “breathing room” while the character pixel/color information is being fetched from ROM. M. Frank, EEL3705 Digital Logic, Fall 2006

  13. Successful Color Font Display(VGA_font_color project) ASCII Tablerepeatsacross screen M. Frank, EEL3705 Digital Logic, Fall 2006

  14. Close-Up Photo of One ASCII Table M. Frank, EEL3705 Digital Logic, Fall 2006

  15. Next example: Display a screenful of arbitrary text For example, here is a screen design mocked up as a table in MS Word  M. Frank, EEL3705 Digital Logic, Fall 2006

  16. Use SciTE and HexEdit to create an ASCII text file containing the raw character data DEL character M. Frank, EEL3705 Digital Logic, Fall 2006

  17. Write a short C program to convert the raw text data to MIF file format M. Frank, EEL3705 Digital Logic, Fall 2006

  18. Modify logic design to fetch the character codes to display from a ROM M. Frank, EEL3705 Digital Logic, Fall 2006

  19. Screenshot showing successful display of the custom 40×24-character page of text Feature idea for next version:provide the option not to explicitly draw all of thenormally non-printing characters, especially SP (␣)...Activate the suppress_space option with a pushbutton… M. Frank, EEL3705 Digital Logic, Fall 2006

  20. Ideas for Further Work • Use the ROM to initialize a RAM with modifiable character data. • Make display of control characters a selectable option • Create a PS/2 keyboard decoder • Implement a simple word-processing application • Develop a simple machine language interpreter for a character-encoded instruction set. • Then program some simple video games based on the text display! • Also create some videogames in pure logic based on more direct use of the VGA driver (pong, etc.) Done inexamples M. Frank, EEL3705 Digital Logic, Fall 2006

More Related