【正文】
end Behavioral。 寫(xiě)入字符 年 when others = null。80H Current_State=write_LCD_Data。 LCD_Data=cgram(conv_integer(t1))。40H Current_State=write_cgram。06H Current_State=set_dcb。039。 LCD_RS=39。then Current_State=set_dlnf。 end process。 if(Count = 0)then Clk_Out = not Clk_Out。)then Count = (others = 39。039。 signal LCD_Clk : std_logic。 constant cgram:ram2:=( (00001000), (00001111), (00010010), (00001111), (00001010), (00011111), (00000010), (00000010))。 液晶數(shù)據(jù)信號(hào) end LCD1602。 寄存器選擇信號(hào) LCD_RW : out std_logic。 use 。 功能 : FGAD驅(qū)動(dòng) LCD顯示中文字符 年 。 end process。 when readram = state=idle。 elsif(counter/=40 and counter81)then state=writeram。 when setddram = state=writeram。 when switchmode = state=clear。 end if。 state=idle。139。)then case state is when idle = if(flag=39。 div_counter=0。)then state=idle。 00 when state=setfunction else 01000000 when state =setcgram else 10000000 when state =setddram and counter =0 else 11000000 when state =setddram and counter /=0 else data_in when state = writeram else zzzzzzzz。00 when state = shift else 001 amp。open_cur amp。 data =00000001 when state =clear else 00000010 when state =returncursor else 000001amp。 lcd_rw = 39。 lcd_rs = 39。)then lcd_e= not lcd_e。039。 end process。event and clkdiv=39。039。 end if。 elsif(tc_clkt39。 process(tc_clkt,reset) begin if(reset=39。 tc_clkt=39。 else clkt=clkt+1。 elsif(clk39。 signal tc_clkt: std_logic。 signal clk_int: std_logic。 signal da