Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to Display Text on the Monitor???

Status
Not open for further replies.

xstal

Full Member level 2
Full Member level 2
Joined
Oct 12, 2006
Messages
138
Helped
20
Reputation
40
Reaction score
0
Trophy points
1,296
Location
USA
Activity points
2,197
storing bios font 8x8

Hello Friends.....

Could you please tell me how can we convert "text data" obtained from a keypad into image format that can be displayed onto the CRT or LCD monitor using a simple VGA Controller??

Basically I want to display text data on the LCD or CRT monitor and I want to develop a VGA Controller for the same. I am stuck how do we convert the text data into pixels...

Thanks.
 

character rom vga spartan 3e

We need not to bother about converting text data into pixels. The controller of LCD will take of that. We just need to write data into memory of LCD. Go through the data sheet of any particular LCD, u will get to know more about it.
 
spartan keyboard input vga display

Hi xstal, Where is your "VGA Controller"? Do you want to create the controller inside an FPGA?

Since this is an FPGA forum, I'm wondering if you already have an FPGA development board with a keyboard input port and a VGA output port, and you want to configure the FPGA so your keyboard typing appears on the display, similar to a traditional dumb terminal. That would be a good educational project. If that's true, then which FPGA board do you have? The board manufacturer (or someone else) may already have an example project similar to what you need.

gck, I think xstal is talking about a big LCD computer monitor, and not a small alphanumeric LCD display module.
 

    xstal

    Points: 2
    Helpful Answer Positive Rating
8x8 character sets

Hi Echo47,

True, I am talking about the big computer monitor. I have Spartan 3 kit with a 15 pin VGA port. I also have an example project of a VGA Controller.

In that example project of VGA Controller they have shown how the RGB data is sent along with the required timing signals (Hsync. and Vsync.). But the data they are displaying, is already stored in a video memory. The controller is taking the data from the memory and sending it to the VGA port along with appropriate timing signals. That Part is understood.

I want to write the video memory from my Keyboard, so that I am able to display the text what I type from the keypad. Therefore i will have to convert the text data into pixel format. How to go about it??

Thanks,
 

frame buffer display text

I have a Spartan-3 Starter Kit too.

The common way to design a text display is to build a horizontal/vertical counter chain that divides the visible area of the screen into character cells (a popular size is 80x25 cells). Next, you build some sort of controller that writes your keyboard ASCII codes into an 80x25 two-port RAM text frame buffer. Now your counter chain refreshes the video display by repeatedly reading the rows and columns of the 80x25 RAM buffer. You feed the RAM's ASCII code output, and the current scan line number, into the address inputs of a character-shape ROM. The ROM contains bit-mapped images of the entire ASCII character set. (You can find a nice character set in your computer's VGA BIOS.) The character shape ROM outputs one word at a time (usually 8 to 12 bits wide), representing one row of pixels across the width of the character. You feed the ROM word into a high-speed parallel-to-serial shift register, and send its output pixels to your CRT display.

That should be a pretty small chunk of HDL code, except for the bulky character shape ROM. I searched the web for an simple clean example, but no luck yet.
 

    xstal

    Points: 2
    Helpful Answer Positive Rating
how to display the * into charaters

i have done this project during my undergraduate studies last year.

echo47 has given quite a detailed answer to your questions but i just want to add a few things. first have a look at the article that i have attached. then have a look at the lab assignments of the SJSU EE178 course (**broken link removed**).

once you have done this, you will get a pretty good idea of how a VGA controller can be used to display characters on a VGA monitor.
 
rom hex editor 8x12

Here's some hastily written code, so beware of bugs and clumsiness.
It automatically types characters to the screen. No keyboard input.
It assumes you are using Xilinx ISE and the Xilinx/Digilent Spartan-3 Starter Kit.

UPDATE: I moved my Verilog source code into an attachment, to reduce clutter.
 
sjsu ee178

Hi echo47.... thanks for your quality responses.

I have gone through your code. For which monitor have you generated the VGA timing? Where did you get this Character ROM? Have you written it yourself or is it some standard graphics for a particular font?

Anyway thanks a lot for the help. I have got the idea of character ROM which I think is a ghraphics task .... I can take the text data from the keyboard, use the ASCII value as an address for the bitmap of the character typed, fetch the character bitmap from rom and store it into the RAM buffer, and then display it along with the timing signals..... refreshing counters will be used to keep the frame alive.....

Thanks.
 

how to display a text in monitor

Hi xstal, The output is basically 800x600 with 72 Hz vertical and 48 kHz horizontal, standard VESA timing, so it should work with any common computer monitor. I tested it with two different monitors.

A long time ago, I used a memory hex editor to extract that character set from my computer's graphics card BIOS. I modified several character shapes to suit my application.

You have described another way to design the system: when you receive an ASCII code, you copy the character's bitmap from the ROM into a graphics frame buffer. That design allows you to mix graphics and text, but it requires larger RAM (probably not enough inside your small FPGA), the text writing speed will be slower, and it's more difficult to edit the displayed text.
 

10 * 12 display character bitmap

hello echo47,
a very nice discussion going on....But i have one query?

What r the modification to be done in a character's bitmap ROM to change the size(font) of the character. Say if the font size default is 8x8 and i have to change it to 10x8 ,what changes i have to do in charcter'bitmap rom?.
 

dos 8x14 font fon

Hi Cool_designer, Does 10x8 mean 10 wide by 8 high, or the other way around?

To change from 8x8 to 10x8, try leaving the character ROM unchanged, and simply put two extra blank pixels between the characters. That may still look acceptable.

If you really need to create larger character shapes, you could design them yourself on graph paper and then translate them into binary (very tedious), or use font design software (somewhat less tedious). Also try searching the internet, and you might get lucky. Of course, you also need to modify the counter chains to generate the new size character cells.

When I extracted the character set from my computer's graphics card BIOS, I noticed that the BIOS included 8x10 size (8 wide by 10 high), 8x12, 8x14, and maybe some others.

My Verilog example uses the 8x14 set plus two extra blank pixels to fit the 8x16 character cells of my simple counter chain. I could have spent a little extra time to create a fancier counter chain with 8x14 character cells.
 

hello echo47,

Thanks for ur reply.
I got 8x8 character rom with xilinx spartan 3 development kit.But still i am not able to get character rom for 8x12,8x14 and 8x16 character size.
how can i extract character bios rom from my computer 8x12, 8x14 8x16 etc.
Is their any standard utility used to extract charcter rom from the pc.
I am able to get some *.fon & cpi file from my pc but was not able to extract the character rom data from it.Generating my own caracter rom manualy will be too hectic.It will be gr8 if u can help me on this.
 

Hi Cool_designer,

My Verilog example (see above) contains an 8x16 character set. It was originally an 8x14 set, I simply added two blank rows.

Here are the 8x10, 8x12, and 8x14 character sets that I extracted many years ago from a VGA BIOS. I formatted them info C char arrays, and modified several of the characters to suit my application. You can use a text editor to reformat them into HDL syntax. It's also pretty easy to delete two rows from the 8x10 set to create an 8x8 set.

I've never seen a utility that automatically extracts VGA BIOS character sets. You can use a DOS memory hex editor, or write a small DOS program, that grabs 32K bytes of memory from C000:0000 through C000:7FFF, the common VGA BIOS region. (You can run it from DOS or a Windows Command Prompt.) Then search the 32K data for character sets.
 
  • Like
Reactions: ggwtf

    ggwtf

    Points: 2
    Helpful Answer Positive Rating
Hi xstal ! Were you able to accomplish this? I'm involved on a pretty much similiar task that you are trying to do, that means taking data from the keyboard and showing on the VGA monitor. I have a Spartan 3E too.

I've been looking on the web for a similar approach but no luck so far, so if you have made progress on this matter it would be very appreciated if you can share with me this code.

Thanks!
Pedro
 

I found a PS/2 keyboard ASCII input module on OpenCores:
https://www.opencores.org/cvsweb.cg...eyboard.v?rev=1.1.1.1;content-type=text/plain

The keyboard module outputs dot characters when you press the shift/ctrl/alt keys. I don't know why. I didn't try to debug it.

I hooked it into my Spartan-3 Starter Kit example code. You type on the keyboard, and the text appears on the VGA display. It simply types left-to-right, and wraps at end of line. No fancy cursor controls.

You may need to move the jumper to apply +3.3V or +5V to your keyboard.

It might also work on a Spartan-3E Starter Kit, if you reassign the FPGA pin numbers.
 

hi juz like to ask.. wif this exact same project.. if u wanna include microblaze.. how do u actually do it wif the help of XPS..
 

hi i've got a vhdl code to display the keyboard characters on a VGA monitor. but this uses a hyper terminal to test the keyboard. how do i modify the codes to use LEDs instead ??? pls help ...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top