【正文】
isrow loadoneline sendoneline P2 0x10disrow P2 0x20disrow col col 0word word32if word 1280 word 0 顯示部分程序兩個字節(jié)合并為一個字節(jié)uchar two_onebyte uchar h1uchar h2 uchar temptempcolif col 8 tempcol colelse tempcol col8temp h1 tempcol h2 8tempcol temp tempreturn temp 裝載數(shù)據(jù)void loadoneline void uchar sr_highr_lowuint tempfor s 0s 5s temp 32s2disrowr_low uchar tempr_high uchar temp 8 BUFF[2s] read 0xa0r_highr_low0xa1 temp 32s2disrow1r_low uchar tempr_high uchar temp 8 BUFF[2s1] read 0xa0r_highr_low0xa1 發(fā)送數(shù)據(jù)void sendoneline void char suchar incif col 8 inc 0else inc 1 for s 10incs 0incs SBUF two_onebyte BUFF[s]BUFF[s1] while TI TI 0 中斷函數(shù)void serial_int void interrupt 4 uchar tempw_highw_lowuint t 0ES 0while 1 LED 1delay1 50 while RI temp SBUFRI 0WP 0w_low uchar tw_high uchar t 8 write 0xa0w_highw_lowtemp delay1 10 WP 1tLED 0delay1 50 if t 320 ES 1break 附錄3 上位機(jī)程序Option ExplicitDim i jDim TheFileName As StringDim zw 1 To 32000 As BytePrivate Sub Command1_Click Dim textbuffer As StringDim onelinetext As StringCommonDialog1Filter text file txt txtCommonDialog1Action 1TheFileName CommonDialog1FileNameForm1Caption LED信息顯示屏 TheFileNametextbuffer If TheFileName ThenOpen TheFileName For Input As 1If LOF 1 2048 ThenDo Until EOF 1 Line Input 1 onelinetexttextbuffer textbuffer onelinetext Chr 13 Chr 10 LoopClose 1Text1Text textbufferElseMsgBox 文件過長 vbExclamation vbOKOnly 文件操作Close 1End IfEnd IfTheFileName End SubPrivate Sub Command2_Click On Error GoTo error1CommonDialog1Filter text file txt txtCommonDialog1Action 2TheFileName CommonDialog1FileNameForm1Caption LED信息顯示屏傳送軟件 TheFileNameIf TheFileName ThenOpen TheFileName For Output As 1Print 1 Text1TextClose 1End IfTheFileName Exit Suberror1MsgBox 文本寫入錯誤 vbExclamation vbOKCancel 文件操作End SubPrivate Sub Command3_Click Dim li 1j Len Text2Text If LenB StrConv Text2Text vbFromUnicode 2047 ThenMsgBox 文字內(nèi)容過長 vbExclamation vbOKOnly 通信數(shù)據(jù)錯誤ElseOn Error Resume NextMSComm1PortOpen TrueIf MSComm1PortOpen False ThenMsgBox 所選用的串行端口已被其它設(shè)備所使用 vbExclamation vbOKOnly 通信端口信息ElseMSComm1PortOpen TrueTimer1Enabled TrueCommand3Enabled FalseEnd IfEnd IfEnd SubPrivate Sub Command4_Click EndEnd SubPrivate Sub Command5_Click Dim pIf Len Text1Text 4 ThenMsgBox 輸入漢字個數(shù)不符合規(guī)則Text1Text ElseDim ff As Stringff CALL_LED Text1Text p Len Text1Text 32For i 1 To p Step 1Text2Text Text2Text 0x Hex zw i If i Mod 16 0 ThenText2Text Text2Text Chr 13 Chr 10 End IfNext iEnd IfEnd SubPrivate Function CALL_LED ledstring As String Dim AA CC bb m n kk Len Text1Text For m 1 To k Step 1AA Hex Asc Mid ledstring m 1 CC Asc Mid ledstring m 1 If CC 256 And CC 0 Thenbb CC 16For n 1 To 16 Step 1Open E\畢業(yè)設(shè)計(jì)\上位機(jī)VB\vb程序\ASC16 For Binary As 1Get 1 bb n zw 32 m 1 n Close 1Next nElsebb 94 CLng H Mid AA 1 2 HA1 CLng H Mid AA 3 2 HA1 32For n 1 To 32 Step 1Open E\畢業(yè)設(shè)計(jì)\上位機(jī)VB\vb程序\HZK16 For Binary As 1Get 1 bb n zw 32 m 1 n Close 1Next nEnd IfNext mEnd FunctionPrivate Sub Command6_Click Text1Text Text2Text End SubPrivate Sub Form_Load MSComm1CommPort 1End SubPrivate Sub opt1_click MSComm1CommPort 1End SubPrivate Sub opt2_click MSComm1CommPort 11End SubPrivate Sub Text1_Change j Len Text1Text i Text1SelStarti 16 Int i 16 1label1Caption 總字符數(shù) jEnd SubPrivate Sub text1_keyup keycode As Integer shift As Integer j Len Text1Text i Text1SelStarti 16 Int i 16 1label1Caption 總字符數(shù) jEnd SubPrivate Sub Timer1_Timer If i Mod 2 0 Thenlabel1Caption Mid Text1Text i 2 End IfMSComm1Output Mid Text2Text i 1 i i 1If i j 1 ThenMSComm1Output Chr 255 Chr 255 Timer1Enabled FalseMSComm1PortOpen FalseCommand3Enabled TrueEnd IfEnd Sub外文資料Based on STC89C52 LED dot matrix display Chinese charactersLED Light Emitting Diode lightemitting diode is a solid state semiconductor devices which can be directly converted into electricity to light LED is the heart of a semiconductor chip the chip is attached to one end of a stent is the negative side the other end of the power of the cathode the entire chip package to be epoxy resin Semiconductor chip is posed of two parts part of the Ptype semiconductor it inside the holedominated the other side is the Ntype semiconductor here is mainly electronic But linking the two semiconductors among them the formation of a PN junction When the current through the wires role in this chip will be pushing eP P zone in the hole with electronic posite and then to be issued in the form of photon energy and this is the principle of LED luminescence The wavelength of light that is the color of light is formed by the PN 。室外屏視角大于177?!井厴I(yè)設(shè)計(jì)論文】基于單片機(jī)的LED漢字點(diǎn)陣顯示屏的設(shè)計(jì)畢業(yè)論文 僅供參考支持原創(chuàng)鄙視抄襲畢 業(yè) 設(shè) 計(jì)設(shè)計(jì)題目基于單片機(jī)的LED漢字點(diǎn)陣顯示屏的設(shè)計(jì)系 別_________________________班 級_________________________姓 名_________________________指 導(dǎo) 教 師_________________________2000年6月10日基于單片機(jī)的LED漢字點(diǎn)陣顯示屏單片LED點(diǎn)陣顯示屏Proteus仿真顯示屏驅(qū)動電路LED dot matrix display Chinese characters Based on MCUAbstract This article introduces the design and implementation of the dot matrix display of LED Chinese characters It introduces the principle of display and the design o