【正文】
tem and peripherals. Serial port in system and ACTS as a connection between peripheral tasks and in serial munications with RS485 and RS232 serial interface 4 technology most widely used, this topic mainly studies design of RS485 serial port, and in order to meet the RS485 munication standard MAXIM pany has designed a model named MAX488 for this chip, the chip connotation is a drive and a receiver, with low power consumption at the same time, single + 5 v power supply, the drive has overload protection, without external ponents, etc. AT89C2051 MCU when executing mands to failure, can through the chip IMP813 microcontroller reset. It can also be awaken singlechip puter from sleep mode or idle mode. In the present AT89 series singlechip microputer serial port munication technology in the current popular solution is to adopt RS485 interface. It takes one and two bus interface, USES a half duplex munication bus difference level of data transmission. Microputer to realize RS485 protocol munication generally summarized two methods can be used: the first USES the munication card, inserted on puter motherboard expansion slot。 第四代 :1971 年以來的大規(guī)模超大規(guī)模集成電路計(jì)算機(jī) ,它由大型向微型發(fā)展 ,性能價(jià)格比大大提高 。 所謂串行通信是指外設(shè)和計(jì)算機(jī)間使用一根數(shù)據(jù)信號(hào)線一位一位地傳輸數(shù)據(jù),每一位數(shù)據(jù)都占據(jù)一個(gè)固定的時(shí)間長(zhǎng)度。 (2) 串行通信可以分為兩種類型:同步通信和異步通信。 ② 數(shù)據(jù)位:數(shù)據(jù)位( D0D7)j 緊接在起始為后面,通常為 5到 8位,依據(jù)數(shù)據(jù)位由低到高的順序依次傳送。我們將這些組合稱為數(shù)據(jù)幀,或簡(jiǎn)稱為幀。 系統(tǒng)中采用 AT89C51 單片機(jī)作為下位機(jī), PC 機(jī)作為上位機(jī),兩者通過 RS232串行口收發(fā)數(shù)據(jù)。 在題目中涉及了波特率,波特率即數(shù)據(jù)傳送速率,表示每秒鐘傳送二進(jìn) 制代碼的位數(shù),它的單位是位 /秒( b/s),常用 bps表示。當(dāng)’’ 1”到“ 0”跳變時(shí),檢測(cè)器連 續(xù)采樣到 RXD線上低電平時(shí),便認(rèn)定 RXD 端出現(xiàn)起始位,繼而接收控制器開始工作,在每位傳送時(shí)間的第 9 三個(gè)脈沖狀態(tài)采樣 RXD 線,決定所接收的值為“ 0”或“ 1”。 在實(shí)現(xiàn)設(shè)計(jì)里面,系統(tǒng)的功能由硬件和軟件兩大部分協(xié)調(diào)完成,硬件部分主要完成信息的顯示;軟件主要完成信號(hào)的處理及控制功能等。 假設(shè)數(shù)據(jù)傳送的速率是 120 字符 /S,每個(gè)字符格式包含 10個(gè)代碼位 120 字符 /s, 10 位 /字符 =1200b/s=1200 波特。 本設(shè)計(jì)運(yùn)用單片機(jī)原理和微機(jī)接口技術(shù)等知識(shí)探討完成單片機(jī)與 PC 機(jī)的串行通信設(shè)計(jì)。在系統(tǒng)與外設(shè)之間充當(dāng)連接任務(wù)串口了而在串口通信技術(shù)中又以 RS485和 RS232串口技術(shù)應(yīng)用最為廣泛,本課題主要研究設(shè)計(jì) RS485 串口,而為了滿足 RS485 的通信標(biāo)準(zhǔn) MAXIM 公司為此就設(shè) 計(jì)了一款名為 MAX488 的芯片,該芯片內(nèi)涵一個(gè)驅(qū)動(dòng)器和一個(gè)接收器,同時(shí)具有低功耗、單 +5V電源供電、驅(qū)動(dòng)器有過載保護(hù)、無需外接元器件等特點(diǎn)。 ④ 停止位:位于字符幀的最后,表征字符的結(jié)束,它一定是高電平(邏輯9 “ 1”)。一次傳輸?shù)钠鹗嘉?、字符各位、校?yàn)位、停止位構(gòu)成一組完整的信息,稱為幀 (Frame)。串行數(shù)據(jù)在傳輸過程中,由于干擾可能引起信息的出錯(cuò)。 CPU芯片主要含有運(yùn)算器和控制器 . 運(yùn)算器 運(yùn)算器是用來對(duì)于數(shù)據(jù)進(jìn)行算朮運(yùn) 算 (加、減、乘、除等 )和邏輯運(yùn)算 (比較、移位、布爾運(yùn)算等 )的器件 .在運(yùn)算器中進(jìn)行運(yùn)算的數(shù)據(jù)取自內(nèi)存 ,運(yùn)算結(jié)果又送往內(nèi)存 ,這些操作都是在控制器的控制下進(jìn)行的 . 控制器 控制器是計(jì)算機(jī)的指揮中心 ,用來控制、指控整個(gè)計(jì)算機(jī)系統(tǒng)自動(dòng)、連續(xù)地運(yùn)行和各個(gè)部件之間協(xié)調(diào)一致地工作。 Software mainly plete signal processing and control function, etc. System hardware design adopts modular design, AT89C51 singlechip microputer as the core, the serial port munication circuit of control system. Software design using a query and receive interrupt way to plete 5 data, and further processing. During implementation behind also adopted, for example, and the simulation debugging, namely using Protues platform, virtual serial port software to create virtual COM port, a pair of interlinked MSC0mm software based serial debugging software tools such as PC and single chip puter serial munication system simulation. Involving the baud rate in the title, baud rate the data transfer rate, said every second transmission of binary digits, it is the unit of g bit/SEC (b/s), monly used BPS said. Baud rate is an important indicator of asynchronous munication, characterization data transmission speed, the higher the baud rate, the faster the speed of data transmission, the data tran