【正文】
485 converter.V. SEVERAL POINTS FOR ATTENTION IN THE DESIGN The program of CAN munication interruption and UART receiving interruption must be short enough. Otherwise, the munication efficiency will be influenced. There must be proper delay between each frame of data if some CAN note send message continuously, or else overflow error is easy to happen. Some requirements for programming of the time segments must be satisfied in order to avoid munication failure.1) Prop Seg + Phase Seg 1 = Phase Seg 22) Prop Seg + Phase Seg 1 = TDELAY3) Phase Seg 2 Sync Jump Width In order to close speaker, not only the VCC pin, but also the OSC1 and OSC2 pins must be changed to low level, otherwise some LM246 couldn’t work normally. To avoid disturbance of touch screen, the key values must be taken 3 groups at least.VI. CONCLUSION The bustible gas alarm system has high stability, nodes capabilities and its interface is friendly. PC can be added to the system via CAN adapter to realize displaying, setting and other functions. Now the product is going into mass production.。s node sets corresponding shielding and acceptance bits. Such a method can distinguish 127 CAN nodes and fully meet the requirements. Register TXBnEID8 stores sender39。s resolution is 1024*1024. The enable signal of printer, fault indicating lights, alarm lights are decoded by GAL16V8. GAL is a new electrically erasable and programmable PLD device. By using GAL, the control bees easier and security of program bees better. The output signal of printer and all indicator lights and several control signals are extended by parallel bus bining 74AHC573. The input signal is realized by parallel bus bining 74AHC245. LM246 is used to give three alarm signals. The alarming circuit is as Fig4. ATmega16 MCU is chosen as the converter39。 converter。現(xiàn)在產(chǎn)品已進(jìn)入批量生產(chǎn)。1) Prop Seg + Phase Seg 1 = Phase Seg 22) Prop Seg + Phase Seg 1 = TDELAY 3) Phase Seg 2 Sync Jump Width 以關(guān)閉揚(yáng)聲器,不僅VCC引腳,但也必須改變低水平的OSC1和OSC2引腳,否則一些LM246不能正常工作。圖7 程序CAN/485轉(zhuǎn)換器的程序流程圖 設(shè)計(jì)需要注意的幾個(gè)問題 必須足夠短的CAN通信中斷和UART接收中斷程序。2. CAN/485轉(zhuǎn)換器的軟件設(shè)計(jì) 接收信號(hào)變換器主控制器由基于CAN總線的中斷。注冊(cè)TXBnSIDH被用作節(jié)點(diǎn)的ID,和接收器的節(jié)點(diǎn)設(shè)置相應(yīng)的屏蔽和驗(yàn)收位。鍵值檢測(cè)和處理部分的主要功能是檢測(cè)天氣推觸摸屏,然后回應(yīng)。在這個(gè)過(guò)程中,系統(tǒng)檢測(cè)到電源狀態(tài),關(guān)鍵價(jià)值和讀取參數(shù)。3)1/8單位負(fù)載高達(dá)256總線上的節(jié)點(diǎn)。 RS485總線部分顯示圖如圖5。圖4 報(bào)警示意圖CAN/485轉(zhuǎn)換器 ATmega16單片機(jī)被選擇作為轉(zhuǎn)換器的核心,它具有較高的性能價(jià)格比,并具有16KB閃存,256字節(jié)的E2PROM,1KB的RAM,因此它非常適合用于CAN/485轉(zhuǎn)換。打印機(jī)和所有指示燈和幾個(gè)控制信號(hào)的輸出信號(hào)通過(guò)并行總線相結(jié)合74AHC573延長(zhǎng)。觸摸屏顯示的分辨率是1024 * 1024。通過(guò)USART1的智能終端連接到彩色液晶顯示終端連接到MCU的。MCU的通訊是通過(guò)行業(yè)標(biāo)準(zhǔn)的數(shù)據(jù)傳輸速率且高達(dá)5 Mb / s的實(shí)施串行外設(shè)接口。MCP2515的是一個(gè)完整的控制器區(qū)域網(wǎng)絡(luò)(CAN)。例如:它可以讀取和寫入10億次,很長(zhǎng)一段時(shí)間的記錄數(shù)據(jù),其讀寫速度與常見的E2PROM相比要快得多。它包含128KB閃存,TWI,SPI和JTAG接口(用于仿真調(diào)試和下載程序)。使用脈沖的方法來(lái)檢測(cè)商用電源,備用電源和充電狀態(tài)。主控制器擴(kuò)展了32KB的E2PROM記錄歷史、系統(tǒng)參數(shù)和32KB SDRAM記錄實(shí)時(shí)濃度信息。一方面,濃度實(shí)時(shí)信息顯示。從氣體探測(cè)器,聯(lián)動(dòng)模塊接收數(shù)據(jù),并與基于CAN總線的主控制器通信。探測(cè)器將數(shù)據(jù)傳輸?shù)较鄳?yīng)的CAN/485轉(zhuǎn)換器基于RS485總線。設(shè)計(jì)CAN/485轉(zhuǎn)換器的最大數(shù)量為32,根據(jù)每個(gè)CAN/485轉(zhuǎn)換器,它可以有33個(gè)氣體探測(cè)器或聯(lián)動(dòng)模塊。根據(jù)不同的核心價(jià)值也回應(yīng)并實(shí)施相應(yīng)觸摸屏功能。二、系統(tǒng)的原理和功能系統(tǒng)原理 該系統(tǒng)的整個(gè)結(jié)構(gòu)描述如圖1。在本文中,這一計(jì)劃是主控制器+CAN/ 485轉(zhuǎn)換器+燃?xì)馓綔y(cè)器。雖然有許多可燃?xì)怏w報(bào)警系統(tǒng)在市場(chǎng)上,他們中的大多數(shù)都有非常高的錯(cuò)誤信息和低性能。MCP2515。主要介紹mcp2515的特點(diǎn)。結(jié)合總線RS 4