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.

display a word on the "Virtex 4" display(eg: VHDL)

Status
Not open for further replies.

dollard

Newbie level 2
Joined
Nov 24, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
virtex 4 display

I am in my second month of learning VHDL and now I want to have a program in VHDL using 8bit LCD display (virtex 4).

Can somebody please help, with a program that can display a word on the "Virtex 4" display(eg: VHDL).

thanks.
 

I addition, if you refer to a Xilinx or third party Development Kit, they have example code that shows how to use the on board resources.
 

If you will use ML40x board you can use Microblase CPU. With Microblaze you can find project that work with LCD. If you need use VGA - you find core for it that work like addition part of Microblaze.
 

Re: display a word on the "Virtex 4" display(eg: V

thanks for your help.
please do you have better idee?
i habe one eg.but it don't work mit my Virtex-4 LC system board.

Added after 5 minutes:

i have lcd initialisation.Nown i want to write(VHDL) on the LCD.

thanks.



LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY lcd_controller IS
PORT(
clk : IN STD_LOGIC; --system clock
reset_n : IN STD_LOGIC; --active low reinitializes lcd
lcd_enable : IN STD_LOGIC; --latches data into lcd controller
lcd_bus : IN STD_LOGIC_VECTOR(9 DOWNTO 0); --data and control signals
busy : OUT STD_LOGIC; --lcd controller busy/idle feedback
rw, rs, e : OUT STD_LOGIC; --read/write, setup/data, and enable signals for lcd
lcd_data : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)); --data signals for lcd
END lcd_controller;

ARCHITECTURE controller OF lcd_controller IS
TYPE CONTROL IS(power_up, initialize, ready, send_data);
SIGNAL state : CONTROL;
BEGIN
PROCESS(clk)
VARIABLE clk_count : INTEGER RANGE 0 TO 2500000; --clock event counter for timing
BEGIN

IF(clk'EVENT and clk = '1') THEN
CASE state IS
--wait 50 ms to ensure Vdd has risen and required LCD wait is met
WHEN power_up =>
busy <= '1';
IF(clk_count < 2500000) THEN --wait 50 ms
clk_count := clk_count + 1;
state <= power_up;
ELSE
clk_count := 0;
rs <= '0';
rw <= '0';
lcd_data <= "00110000";
state <= initialize;
END IF;
--cycle through initialization sequence
WHEN initialize =>
busy <= '1';
clk_count := clk_count + 1;
IF(clk_count < 500) THEN --function set
lcd_data <= "00111100";
e <= '1';
state <= initialize;
ELSIF(clk_count < 3000) THEN --wait 50 us
lcd_data <= "00000000";
e <= '0';
state <= initialize;
ELSIF(clk_count < 3500) THEN --display on/off control
lcd_data <= "00001100";
e <= '1';
state <= initialize;
ELSIF(clk_count < 6000) THEN --wait 50 us
lcd_data <= "00000000";
e <= '0';
state <= initialize;
ELSIF(clk_count < 6500) THEN --display clear
lcd_data <= "00000001";
e <= '1';
state <= initialize;
ELSIF(clk_count < 106500) THEN --wait 2 ms
lcd_data <= "00000000";
e <= '0';
state <= initialize;
ELSIF(clk_count < 107000) THEN --entry mode set
lcd_data <= "00000110";
e <= '1';
state <= initialize;
ELSIF(clk_count < 110000) THEN --wait 60 us
lcd_data <= "00000000";
e <= '0';
state <= initialize;
ELSE
clk_count := 0;
busy <= '0';
state <= ready;

END IF;
--wait for the enable signal and then latch in the instruction
WHEN ready =>
IF(lcd_enable = '1') THEN
busy <= '1';
rs <= lcd_bus(9);
rw <= lcd_bus(8);
lcd_data <= lcd_bus(7 DOWNTO 0);
clk_count := 0;
state <= send_data;
ELSE
busy <= '0';
rs <= '0';
rw <= '0';
lcd_data <= "00000000";
clk_count := 0;
state <= ready;
END IF;
--send instruction to lcd
WHEN send_data =>
IF(clk_count < 2500) THEN
busy <= '1';
IF(clk_count > 100) THEN
e <= '0';
ELSE
e <= '1';
rs <= lcd_bus(9);
rw <= lcd_bus(8);
lcd_data <= lcd_bus(7 DOWNTO 0);
END IF;
clk_count := clk_count + 1;
state <= send_data;
ELSE
clk_count := 0;
busy <= '0';
state <= ready;
END IF;
END CASE;
--reset
IF(reset_n = '0') THEN
state <= power_up;
END IF;
END IF;
END PROCESS;
END controller;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top