【正文】
課程設計任務能夠圓滿完成,不僅有我自己的摸索,還要感謝同組人員 的合作以及同學的討論,更要感謝老師的指導。同時也讓我明白了理論也很重要,之后我應該更要加強對理論的學習。在制作時遇到液晶屏沒顯示,時序圖沒出來等多種問題,后來經過指導老師的提示,并且和同學的相互討論,試驗,最終將問題得以解決。 VHDL語言將液晶屏的功能的時序圖化為多種狀態(tài),使得程序能夠更清晰易懂。當屏蔽掉將 DATAIN 轉換為 ASCII碼值這段程序后,液晶屏上只有靜態(tài)顯示。 液晶屏能夠正常顯示之后,在波形仿真的時序圖上一直得不到想要的結果,經老師點撥之后,再經過自己的多次試驗發(fā)現需要設置 end time 等時間,最終得到與程序相符合的時序圖。 在編寫程序時要弄清楚液晶屏的顯示過程,要仔細閱讀用戶指令集,清楚每條指令是做什么。經反復研究發(fā)現,要想成功發(fā)送數據,那么每個狀態(tài)的時間應當大于液晶屏資料說明中的并行時序圖中的Tc=1200ns,否則變化的太快,數據來不及發(fā)送,就會出現故障。經過電壓表測量后,焊接電路沒有問題,后發(fā)現是 FPGA 芯片出故障,有可能是下載程序時 操作失誤所引起的。 15 上圖中可以很明顯的看到顯示模塊程序的 S1 這個狀態(tài),根據程序來觀察時序圖,發(fā)現時序與程序一致,并且滿足液晶屏要顯示文字的條件。 end process。 end case。 end if。 data_t:=0。 if t_1=100 then t_1:=0。 end if。 elsif t_1100 then e=39。 elsif t_12*3 then lcd_data=disp_time(data_t)。rw=39。rs=39。 when s9= if t_11*3 then e=39。current_s=s9。039。 elsif t_15*3 then 14 lcd_data=x90。rw=39。rs=39。 if t_11*3 then e=39。 end if。 data_t:=0。 if t_1=100 then t_1:=0。 end if。 elsif t_1100 then e=39。 elsif t_12*3 then lcd_data=data_buf0(data_t)。rw=39。rs=39。 when s7= if t_11*3 then e=39。current_s=s7。039。 elsif t_12*3 then lcd_data=x80。rw=39。rs=39。 if t_11*3 then e=39。 end if。 data_t:=0。 if t_1=100 then t_1:=0。 end if。 elsif t_1100 then e=39。 elsif t_12*3 then lcd_data=data_buf2(data_t)。rw=39。rs=39。 when s5= if t_11*3 then e=39。current_s=s5。039。 elsif t_12*3 then lcd_data=x88。rw=39。rs=39。 if t_11*3 then e=39。 end if。 data_t:=0。 if t_1=100 then t_1:=0。 end if。 elsif t_1100 then e=39。 elsif t_12*3 then lcd_data=data_buf1(data_t)。rw=39。rs=39。 when s3= if t_11*3 then e=39。current_s=s3。039。 elsif t_12*3 then lcd_data=x90。rw=39。rs=39。 12 if t_11*3 then e=39。 end if。 elsif t_1=10*3 then t_1:=0。 elsif t_110*3 then e=39。039。039。139。 when s1=t_1:=t_1+1。current_s=s1。139。139。039。t1:=t1+1。e=39。rs=39。)then case current_s is when s0=rw=39。event and clk_100k=39。 variable data_t:integer range 0 to 480