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.

LCD Problem with Genesys Virtex 5 Eval Board

Status
Not open for further replies.

halunke86

Newbie level 5
Joined
Nov 4, 2010
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
Hello,

I have a problem with writing values to the LCD display of the Genesys Virtex5 evalboard which uses a ST7066U lcd driver.
I succeeded to initialize the LCD, but when I want to write a letter into the DDRAM, but when booting the FPGA, the cursor moves for some microseconds one digit to the right an then returns to the start.
I guess that I follow the giving timing specs (write data setup time is 80ns and data hold time is 300ns)
Does anyone sees an error in my code or can explain why the code doesn't work?

Code:
-- needed constants

constant H_ASCII			: std_logic_vector := "01001000";
constant tc 				: integer := 72;				-- Enable cycle time (=720ns)
constant tpw 				: integer := 48; 				-- Enable high time (=480ns)
-- ... 
-- disp_entr is the last action of the initialisation
when disp_entr => 		lcd_rs <= '0';
										lcd_rw <= '0';
										lcd_db <= DB_DISPENTR;
										if cnt < delay_37us then
											cnt <= cnt + 1;
											current_state <= disp_entr;
										elsif cnt = delay_37us then
											cnt <= cnt + 1;
											lcd_e <= '1';
											current_state <= disp_entr;
										else
											lcd_e <= '0';
											cnt <= 0;
											current_state <= word1;
										end if;	
		when word1 => 				lcd_rw <= '0';
										lcd_rs <= '1';
										lcd_db <= H_ASCII;
										if cnt < tpw then
											lcd_e <= '1';
											cnt <= cnt + 1;
											current_state <= word1;
										elsif cnt >= twdsu and cnt < tc  then
											lcd_e <= '0';
											cnt <= cnt + 1;
											current_state <= word1;
										else
											cnt <= 0;
											current_state <= idle;
										end if;
										
		when idle =>			   current_state <= idle;

Thx for your help

Benny
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top