【正文】
2020 屆 分類號 : TP311 單位代碼: 10452 畢業(yè)設(shè)計 (論文 ) 基于單片機的 IC 卡讀寫系統(tǒng)的實現(xiàn) 姓 名 學(xué) 號 年 級 專 業(yè) 系 (院) 指導(dǎo)教師 2020 年 4 月 20 日畢業(yè)論 文:基于單片機的 IC 卡讀寫系統(tǒng)的實現(xiàn) 摘 要 隨著社會的發(fā)展和現(xiàn)代化程度的不斷發(fā)展, 人們 的信息數(shù)量和種類都在加倍地增長,每天都要處理很多和個人有關(guān)的信息,而這些信息管理非常不便 。 因此 IC 卡應(yīng)運而生 ,IC卡使用范圍十分廣泛,它有助于我們解決問題,使我們的生活變得方便。 首先論述課題的 研究背景,課題的設(shè)計和意義,設(shè)計要求,硬件的工作原理,并給出和介紹了 基于 AT89C51 單片機 的 IC 卡 讀寫系統(tǒng) 的內(nèi)部結(jié)構(gòu)和原理圖, 闡述了本次畢業(yè)設(shè)計所采用的各硬件 電路 和各個接口模塊的功能及工作過程。本系統(tǒng)是以 C 語言來實現(xiàn)軟件設(shè)計, 指令的執(zhí)行速度快。最后具體描述了各個功能模塊的軟、硬件調(diào)試與分析,撰寫的主導(dǎo)思想是軟、硬件結(jié)合,以硬件為基礎(chǔ), 軟件為主體 ,來進行各功能模塊的編寫。 基于AT89C51 單片機的 IC 卡儲容量大,安全保密性好,使用方便,具有數(shù)據(jù)處理能力,使用壽命更長 ,它除了涵蓋傳統(tǒng)磁卡的全部功能外,還拓展到許多磁卡所不勝的領(lǐng)域。因此, 基于單片機 IC 卡讀寫器設(shè)計的研究是一個非常有意義的 課題。 關(guān)鍵詞: AT89C51 單片機; IC 卡;讀寫系統(tǒng);數(shù)據(jù)交換;串口通 信畢業(yè)論文:基于單片機的 IC 卡讀寫系統(tǒng)的實現(xiàn) Abstract With the development of the society and the continuous development of the modernized level, people39。s number and variety of information in the double growth, every day to deal with a lot of personal information, and the information management is very inconvenience. So arises at the historic moment, IC card IC card using range is very wide, it can help us solve the problem, make our life bee convenient. First discusses the research background, design and significance of topics, design requirements, the working principle of the hardware is based on AT89C51 singlechip microputer as the core, and introduces the internal structure of IC card and the principle of figure, elaborated this graduate design using the hardware interface technology and the function of each interface module and working process. This system is based on C language to achieve software design, instruction execution speed is fast. Last it describes the various functional modules of software and hardware debugging and analysis, the dominant idea of writing is the bination of software and hardware, on the basis of the hardware and software as the main body, to the preparation of the each function module. IC card readwrite system based on singlechip puter storage capacity, safety and privacy is good, easy to use, with data processing ability, long service life, in addition to cover the whole function of the traditional magic card, it has extended to many fields of magic CARDS are by. Based on SCM IC card readwrite device design research is a very meaningful topic. Keywords: AT89C51 singlechip microputer。 IC card。 Reading and writing systems。 Data exchange。 A serial port munication畢業(yè)論文:基于單片機的 IC 卡讀寫系統(tǒng)的實現(xiàn) 目 錄 前 言 ...................................................................... 1 課題研 究的背景 ....................................................... 1 課題設(shè)計的目的和意義 ................................................. 1 課題的設(shè)計要求 ....................................................... 1 課題的工作原理 ....................................................... 1 第一章 IC 卡芯片 方案選擇 ................................................... 3 IC 卡選取和單片機的選取 ............................................. 3 IC 卡芯片 的特點 ................................................ 3 引腳配置 ...................................................... 3 芯片功能 ...................................................... 4 IC 卡傳送協(xié)議 ................................................. 5 芯片的操作命令 ................................................ 6 存儲芯片的選擇 ..................................................... 7 第二章 系統(tǒng)的工作機制 ....................................................... 9 通訊傳輸機制 ....................................................... 9 命令處理流程 ....................................................... 9 防沖突處理流程 .................................................... 10 數(shù)據(jù)傳輸?shù)耐暾院桶踩? .......................................... 11 認(rèn)證過程 ..................................................... 11 通信命令及響應(yīng)格式 ................................................ 11 IC 卡讀寫系統(tǒng)涉及的關(guān)鍵技術(shù) ........................................ 12 . 信號發(fā)射技術(shù) ................................................. 12 防沖突問題 ................................................... 13 第三章 系統(tǒng)硬件電路設(shè)計 ................................................... 14 硬件設(shè)計方案 ...................................................... 14 硬件設(shè)計注意事項 .................................................. 14 主控器 ........................................................ 15 硬件組成 .......................................................... 15 通信接口 .......................................................... 15 AT89C51 端口功能 ................................................... 16 IC 卡讀寫系統(tǒng)的工作距離 ............................................ 16 電路設(shè)計與讀寫控制 ................................................ 17 單片機與計算機的硬件接口 ..................................... 17 串口通訊電路 ................................................. 17 LCD 顯示電路 ....................................................... 18 整體電路圖 ........................................................ 19 第四章 系統(tǒng)軟件設(shè)計的實現(xiàn) ................................................. 20 軟件設(shè)計思路 ...................................................... 20 軟件設(shè)計原理 ....................................... 錯誤 !未定義書簽。 IC 卡讀寫器的軟件設(shè)計 .............................................. 20 系統(tǒng)主程序 ................................................... 20 中斷子程序 ................................................... 22 串口通訊子程序 ............................................... 22 畢業(yè)論文:基于單片機的 IC 卡讀寫系統(tǒng)的實現(xiàn) IC 卡的插入 /退出識別與上電 /下電控制技術(shù) ...................... 23 第五章 系統(tǒng)的 仿真 測試 .................................................... 26 系統(tǒng)仿真 .......................................................... 26 proteus 工作界面 ............................................. 26