Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEL 3705 / 3705L Digital Logic Design

Similar presentations


Presentation on theme: "EEL 3705 / 3705L Digital Logic Design"— Presentation transcript:

1 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 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

2 M. Frank, EEL3705 Digital Logic, Fall 2006
Character Codes ASCII, Unicode 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

3 The ASCII Character Code American Standard Code for Information Interchange
Standards ANSI INCITS (R2002), ANSI X (R1997), ISO Control code glyphs; normally not printed. From ANSI X , ISO Meanings of control codes are defined at: ~jkorpela/chars/ c0.html optional 8th bit may be 0, or used for parity or for code extensions 11/10/2018 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. 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

5 M. Frank, EEL3705 Digital Logic, Fall 2006
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. H e l o , W r d ! 48 65 6c 6f 2c 20 57 72 64 21 1f 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

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

7 Goal of Next Example: Make the FLEX Display my ASCII Table!
11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

8 M. Frank, EEL3705 Digital Logic, Fall 2006
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 write ports are registered – this is actually unnecessary. 11/10/2018 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 : ; 1 : ; 2 : ; 3 : ; 4 : ; 5 : ; 6 : ; 7 : ; END; Encode pixel bits in a .mif file used to initialize a ROM module for the font data. 1 2 3 4 5 6 7 8 9 descender area vertical spacing 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

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

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

12 Display circuit for 128-character color font ASCII table
Uses a 1,024×6 bit font pixel ROM and a 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. 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

13 Successful Color Font Display (VGA_font_color project)
ASCII Table repeats across screen 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

14 Close-Up Photo of One ASCII Table
11/10/2018 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  11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

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

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

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

19 M. Frank, EEL3705 Digital Logic, Fall 2006
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 the normally non- printing characters, especially SP (␣)... Activate the suppress_space option with a pushbutton… 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

20 M. Frank, EEL3705 Digital Logic, Fall 2006
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 in examples 11/10/2018 M. Frank, EEL3705 Digital Logic, Fall 2006


Download ppt "EEL 3705 / 3705L Digital Logic Design"

Similar presentations


Ads by Google