⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_control_rtl_v3.vhd

📁 LCD display driver for xilinx fpga
💻 VHD
📖 第 1 页 / 共 3 页
字号:
                   lcd_data  <= function_set_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init6;		   count     <= 0;		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init6 => -- wait for 40 祍		 if(count = (t_pulse_c + t_next_pulse_c)) then		   lcd_data  <= entry_mode_c(7 downto 4);                   lcd_rw    <= '0';		   		   state_lcd <= init7;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';		   count     <= count + 1;		   		   		 else		   count     <= count + 1;		 end if;	       when init7 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= entry_mode_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init8;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;		 	       when init8 => -- wait for 40 祍		 if(count = (t_pulse_c + t_next_pulse_c)) then		   lcd_data  <= display_control_c(7 downto 4);                   lcd_rw    <= '0';		   		   state_lcd <= init9;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init9 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= display_control_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init10;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init10 => -- wait for 40 祍		 if(count = (t_pulse_c + t_next_pulse_c)) then		   lcd_data  <= clear_display_c(7 downto 4);                   lcd_rw    <= '0';		   		   state_lcd <= init11;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init11 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= clear_display_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init12;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init12 => -- wait for 1.64 ms		 if(count = (t_pulse_c + t_clear_display_c)) then		   lcd_data  <= set_ddram_address_c(7 downto 4);                   lcd_rw    <= '0';		   		   state_lcd <= init13;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init13 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= set_ddram_address_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init14;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init14 => -- wait for 40 祍		 if(count = (t_pulse_c + t_next_pulse_c)) then		   lcd_data  <= data_1_c(7 downto 4);                   lcd_rw    <= '0';		                      lcd_rs    <= '1';		   		   state_lcd <= init15;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init15 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= data_1_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init16;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;		 	       when init16 => -- wait for 40 祍		 if(count = (t_pulse_c + t_next_pulse_c)) then		   lcd_data  <= data_2_c(7 downto 4);                   lcd_rw    <= '0';		   		   state_lcd <= init17;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init17 => -- wait for 1 祍		 if(count = (t_pulse_c + t_upper_lower_c)) then		   lcd_data  <= data_2_c(3 downto 0);                   lcd_rw    <= '0';		   		   state_lcd <= init18;		   count     <= 0;		   		 elsif (count = t_pulse_c) then		                      lcd_rw    <= '1';   		   count     <= count + 1;		   		 elsif (count = (t_pulse_c - t_hold_c)) then		   lcd_e     <= '0';		   		   count     <= count + 1;		   		 elsif (count = t_setup_c) then		   lcd_e     <= '1';   		   count     <= count + 1;		   		 else		   count     <= count + 1;		 end if;	       when init18 => -- wait for 1.64 ms		 if(count = (t_pulse_c + t_clear_display_c)) then		   lcd_data  <= set_ddram_address_c2(7 downto 4);		                      lcd_rs    <= '0';		   		                      lcd_rw    <= '0';		   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -