【正文】
BKGD=MODC PE6= MODB PE5= MODA PK7= ROMCTL ROMONBIT 模式簡介 0 0 0 1 特殊單片模式, BDM 有效 0 0 1 0 1 仿真擴展窄模式, BDM 有效 1 0 0 1 0 0 特殊測試模式, BDM 有效 0 1 1 0 1 仿真擴展寬模式, BDM 有效 1 0 1 0 0 1 普通單片模 式, BDM 有效 1 0 1 0 0 普通擴展窄模式, BDM 有效 1 1 1 1 0 1 特殊設備模式, BDM 有效;但是如果進行總線操作,講引起總線沖突,所以一定不能使用總線 1 1 1 0 0 普通擴展寬模式 1 1 本系統(tǒng)中的 MC9S12DG128 單片機 MC9S12DG128 有 8 路 PWM 輸出,本系統(tǒng)利用 PWM 輸出來控制兩輪轉速,實現(xiàn)差速控制;豐富的數(shù)字 I/O 口可以接碰撞傳感器、紅外避障傳感器等,可編程的上升沿或下降沿觸發(fā)可用來檢測樓梯,另外它的定時器功能 可以精確進行定時中斷,為 自動掃地機 提供精確周期來完成采集信號、決策、行走等。 PS2/RXD1:通用輸入或輸出 引腳;可作為串行通信接口 1 的接收引腳。同時也可以配 置為 SPI1 的時鐘引腳 SCK1。 PM3/TX_BF/TXCAN1/TXCAN0/:通用輸入或輸出引腳;可以配置為 Byteflight 模塊的 TX_BF 信號,即數(shù)據(jù)發(fā)送引腳;也可以配置為 CAN1 或 CAN0 的數(shù)據(jù)發(fā)送引腳;還可以配置為 SPI0 的從模式選擇引腳。 PH0/KWH0/MISO1: 通用輸入或輸出引腳;可以配置為中斷輸入信號,該中斷使 單片機 退出停止或等待模式;同時也可以配置為 SPI1 的主模式的輸入( MI)引腳,或者從模式的輸出( SO)引腳,即配置為 MISO。 TEST:測試引腳,僅有輸入功能,專為測試預留。整個清掃工作結束后,該機器人會釋放負離子,凈化空氣,充當空氣清新機的功能。 2021 年 5 月日本的日立公司亮相的 智能真空機器人,其身長直徑 25cm,身高 13cm,總重 4kg,是世界上當時最小的吸塵機器人。 “ Roomba” 可以運行三種模式: S 模式,清掃大約 3~ 4 平方米,工作 20 分鐘; M 模式,清掃大約 6~ 7 平方米,工作 30 分鐘; L 模式,清掃大約 8 平方米以上,工作 40 分鐘。我國首臺低級智能 自動掃地機 兩年以后成功問世。服務機器人有著比較明顯的特征:適合具體的方式、環(huán)境以及任務過程的一個機器人系統(tǒng),活動范圍廣,非結構環(huán)境下移動性,所以大多數(shù)機器人是移動機器人。它的任務是清潔房間地面,主要處理地面的灰塵,對大尺寸的物體不進行處理,它對家具和人都是安全的,且具備一定得自我保護能力。 本科畢業(yè)設計說明書 掃地機的 數(shù)據(jù) 控制系統(tǒng)設計 THE DESIGN OF AUTOMATIC SWEEPING MACHINE DATA CONTROL SYSTEM 學院(部): 電氣與信息工程學院 專業(yè)班級: 電氣 學生姓名: 指導教師: 年 月 日 安徽理工大學 畢業(yè)設計 I 掃地機的 數(shù)據(jù) 控制系統(tǒng)設計 摘要 自動掃地機屬于服務機器人的一種, 隨著社會的發(fā)展需要, 服務機器人 已經滲透了我們的生活、工作和經濟方面,并且起到了很大的作用。 關鍵詞: 自動掃地機 ,單片機, 紅外遙控 , 自動行走 安徽理工大學 畢業(yè)設計 II THE DESIGN OF AUTOMATIC SWEEPING MACHINE DATA CONTROL SYSTEM ABSTRACT Automatic sweeping machine is one part of the serving robot. With the development of society, the serving robot has infiltrated our lives, work and the economy, and has played a significant role. Automatic sweeping is being researched and developed in the countries all over the world, and which is being used widely in the west developed countries. Despite the current areas of research and development at home and abroad in this aspect has made certain achievements, there are still many key technical problems need to be solved or improved. For example, path planning is one of the important technical. This paper presents the system integration and overview of autonomous cleaning robot which is based on MC9S12DG128 singlechip. The real time characteristic and function of the system are in good condition. The system consists four segments: information collection module, the decision module, cleaning module, motion control module. Several sensors such as collision sensor, infrared distance sensors detect the surrounding obstacles while cleaning. The realization of wireless remote manual control function is posed of an infrared receiving head. Two driven wheels are driven by two DC motors bining. It adopts the improved 井 shaped path traversal method. Experiments show that the control system run well and the robot have the ability to clean the floor automatically. KEYWARDS: automatic sweeping machine, singlechip, infrared remote control, automatic move 安徽理工大學 畢業(yè)設計 i 目 錄 摘要 ............................................................................................................................................. I ABSTRACT .............................................................................................................................. II 1 緒論 ........................................................................................................................................ 1 概述 .............................................................................................................................. 1 選題依據(jù)和意義 ........................................................................................................... 1 國內外自動掃地機的發(fā)展現(xiàn)狀 .................................................................................. 2 2 MC9S12DG128 單片機簡介 .................................................................................................. 4 前言 ............................................................................................................................... 4 引腳說明 ....................................................................................................................... 4 操作模式 ...................................................................................................................... 7 本系統(tǒng)中的 MC9S12DG128 單片 機 .......................................................................... 7 3 系統(tǒng)總體設計 ........................................................................................................................ 9 自動掃地機系統(tǒng)組成 ................................................................................................... 9 信息采集模塊 ..................................................................................................... 9 控制模塊 ............................................................................................................. 9 運動模塊 ........................................................................................................... 10 清掃模塊 .......................................................................................................... 10 自動掃地機系統(tǒng)總體設計 ........................................................................................ 10 自動掃地機功能設計 ....................................................................................... 10 自動掃地機硬件框架 ....................................................................................... 11 自動掃地機軟件框架 .........................................