#include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uint a,b,c,d=0; void delay(c) { for for(a=0;a<c;a++) for(b=0;b<12;b++); }; uchar tab[]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,
標(biāo)簽: AVR 單片機(jī) 數(shù)碼管
上傳時(shí)間: 2013-10-21
上傳用戶:13788529953
在理論分析循環(huán)碼編碼和譯碼基本原理的基礎(chǔ)上,提出了基于單片機(jī)系統(tǒng)的(24,16)循環(huán)碼軟件實(shí)現(xiàn)編碼、譯碼的方案。仿真結(jié)果表明(24,16)循環(huán)碼能有效地克服來(lái)自通訊信道的干擾,保證數(shù)據(jù)通信的可靠及系統(tǒng)的穩(wěn)定,使誤碼率大幅度降低。本論文對(duì)(24,16)循環(huán)碼的研究結(jié)果表明,可以有效地降低錯(cuò)誤概率和提高系統(tǒng)的吞吐量,實(shí)現(xiàn)糾錯(cuò)僅需要在接收端增加有限的存儲(chǔ)空間和計(jì)算復(fù)雜度,具有一定的實(shí)用價(jià)值。 Abstract: Based on analyzing the theory of encoding and decoding of cyclic code, this paper showed the schemes of encoding and decoding of(24,16)cyclic code by the software and based on microcontroller. Simulation results show that using (24,16) cyclic codes can effectively overcome the interference from communication channel, ensure the reliability and stability of data communication systems, and reduce the bit error rate greatly. The results of this paper show that by using the (24,16) cyclic code, the error rate can be reduced and the system throughput can be improved. Meanwhile, the system only needs to enlarge limited storage space and computation the complexity at the receiving end to realize error correction. Thus the (24,16) cyclic code has a practical value.
標(biāo)簽: 24 16 單片機(jī)系統(tǒng) 循環(huán)碼
上傳時(shí)間: 2013-11-09
上傳用戶:gaoliangncepu
針對(duì)科研實(shí)驗(yàn)中對(duì)拉壓千斤頂加載過(guò)程控制的需要,采用ATmega128單片機(jī)控制步進(jìn)電機(jī)進(jìn)而實(shí)現(xiàn)對(duì)執(zhí)行系統(tǒng)的電動(dòng)泵站實(shí)行自動(dòng)控制。對(duì)力和位移的數(shù)據(jù)采集與處理及用步進(jìn)電機(jī)控制電動(dòng)泵站手柄的技術(shù)細(xì)節(jié)作了重點(diǎn)描述。通過(guò)單片機(jī)的A/D變換器對(duì)AMP放大模塊采集的電橋信號(hào)作量化處理,千斤頂?shù)牟倏厥直恢靡离妱?dòng)油泵閥門開啟的方向和大小作若干定位,單片機(jī)根據(jù)力或位移傳感器信號(hào),實(shí)時(shí)控制步進(jìn)電機(jī)驅(qū)動(dòng)手柄旋轉(zhuǎn)到相應(yīng)操控位置。 Abstract: This article describes the use of ATmega128 AVR microcontroller series of DBS electric pumping stations and QF100/200 separate twoway hydraulic jack to automate the process of manipulating the work of the technical content. Articles on force and displacement data acquisition and processing, and stepper motor control electric pump with the handle of the key technical details were described. Through the MCU’s A / D converter module is collected on the AMP amplification quantify the signal bridge, jack handle position control valve opening according to the direction of electric pumps for a number of positioning and size of the microcontroller based on force or displacement sensor signals, real-time control stepper motor drive control handle rotate to the appropriate location.
標(biāo)簽: AVR 單片機(jī) 閉環(huán)控制
上傳時(shí)間: 2014-01-16
上傳用戶:hasan2015
為解決電致變色器件的顏色變化受外界環(huán)境顏色控制的問(wèn)題,設(shè)計(jì)了一種基于單片機(jī)的便攜式顏色自適應(yīng)識(shí)別電路。與傳統(tǒng)顏色識(shí)別電路相比較,該電路利用數(shù)字式的顏色傳感器來(lái)獲取外界環(huán)境顏色,產(chǎn)生的數(shù)字顏色信號(hào)易于單片機(jī)進(jìn)行處理。在電路中,下位機(jī)部分主要負(fù)責(zé)獲取電致變色器件變色參數(shù)及控制電致變色器件的顏色變化;而上位機(jī)部分主要負(fù)責(zé)把下位機(jī)獲取的電致變色器件變色參數(shù)進(jìn)行電壓到顏色的曲線擬合,并通過(guò)藍(lán)牙通信把擬合曲線參數(shù)傳遞給下位機(jī)。結(jié)果表明,該電路能自動(dòng)根據(jù)環(huán)境顏色提供-4~4 V范圍步進(jìn)為0.1 V的電壓來(lái)驅(qū)動(dòng)電致變色器件的顏色顯示,與傳統(tǒng)的顏色識(shí)別電路設(shè)計(jì)相比,識(shí)別的精度和速度都得到了明顯改善。 Abstract: In this paper, a portable adaptive circuit for color identification(PACCI) based on MCU was designed. Compared to the traditional color identification circuit, the PACCI adopts digital sensor to detect the color data from external environment and further generate digital color data, which can be processed easily by MCU. In PACCI, the slave is mainly responsible for detecting the color parameters of the corresponding elcreochromic device and further driving it. For the master, which is mainly responsible for the color curve fitting based on the parameters of the electrochromic device, and transmits the fitting parameters to the slave through the bluetooth device. The results show that the PACCI can provide the basis voltage range from -4V to 4V automatically based on the colors of external environment with step as 0.1V to drive the corresponding electrochromic device. Compared to the traditional color recognition circuit, the recognition accuracy and speed of PACCI have been improved significantly.
上傳時(shí)間: 2013-11-09
上傳用戶:franktu
為提高電容測(cè)量精度,針對(duì)電容式傳感器的工作原理設(shè)計(jì)了基于PIC16LF874單片機(jī)電容測(cè)量模塊。簡(jiǎn)單闡述了電容測(cè)量電路的應(yīng)用背景和國(guó)內(nèi)外研究現(xiàn)狀,介紹了美國(guó)Microchip公司PIC16LF874單片機(jī)的特性。電容式傳感器輸出的動(dòng)態(tài)微弱電容信號(hào)通過(guò)PS021型電容數(shù)字轉(zhuǎn)換器把模擬量數(shù)據(jù)轉(zhuǎn)換成數(shù)字量數(shù)據(jù),所測(cè)數(shù)據(jù)由PIC16LF874單片機(jī)應(yīng)用程序進(jìn)行處理、顯示和保存。實(shí)驗(yàn)結(jié)果表明,固定電容標(biāo)稱值為10~20 pF 的測(cè)量值相對(duì)誤差在1%以內(nèi),同時(shí)也可知被測(cè)電容容值越大,測(cè)量值和標(biāo)稱值相對(duì)誤差越小。 Abstract: To improve the accuracy of capacitance measurement,aimed at the principle of work of mercury capacitance acceleration transducer,the design of micro capacitance measurement circuit is based on the key PIC16LF874 chip. Briefly discusses the application of the capacitance measuring circuit for the background and status of foreign researchers,focusing on the United States PIC16LF874 microcontroller features. Capacitive sensor outputed signal through the dynamics of weak PS021-chip capacitors (capacitancedigital converter) to convert analog data into digital data,the measured data from the PIC16LF874 microcontroller application process, display and preservation. Experimental results show that the fixed capacitor 10pF ~ 20pF nominal value of the measured value of relative error is within 1%,but also it canbe seen the value of the measured capacitance larger,measuring value and the nominal value of relative error smaller.
上傳時(shí)間: 2013-10-29
上傳用戶:wojiaohs
以太網(wǎng)和CAN總線應(yīng)用廣泛,但由于其通信協(xié)議不同,兩種總線器件間無(wú)法進(jìn)行數(shù)據(jù)通信,因此,設(shè)計(jì)了基于CP2200與C8051F040的以太網(wǎng)總線與CAN總線接口轉(zhuǎn)換電路,并給出部分相關(guān)硬件電路與軟件設(shè)計(jì)分析。在保證數(shù)據(jù)完整和協(xié)議可靠的前提下,通過(guò)握手協(xié)議和簡(jiǎn)化的以太網(wǎng)協(xié)議,不僅實(shí)現(xiàn)了以太網(wǎng)數(shù)據(jù)與CAN數(shù)據(jù)的轉(zhuǎn)發(fā),同時(shí)還順利的解決了以太網(wǎng)的高速性與CAN的低速率沖突,以及兩者數(shù)據(jù)包之間的大小不同的矛盾。 Abstract: In the development of actual application, Ethernet and CAN bus are used very extensively. Owing to its various communication protocols, the communicating between two kinds of bus device can’t be carried out. Therefore, in order to solve this problem, the Ethernet-CAN bus interface circuit based on CP2200 and C8051F040 was designed in this paper, and part of the related hardware circuit and software design analysis were given. On the condition of data’s integrity and protocols’reliability, through the handshaking protocols and the simplified the Ethernet protocol, not only the data switching between CAN and Ethernet was realized, but also the differ in velocity and packet size was solved.
標(biāo)簽: C8051F040 CAN 以太網(wǎng) 轉(zhuǎn)換
上傳時(shí)間: 2013-10-15
上傳用戶:Ants
詳細(xì)介紹工控軟件組態(tài)王與單片機(jī)多機(jī)串口通訊的設(shè)計(jì)原理。分析組態(tài)王提供的直接與單片機(jī)串口通信方法的優(yōu)點(diǎn),給出系統(tǒng)基于RS-485總線傳輸?shù)慕涌陔娐吩韴D。根據(jù)組態(tài)王提供的通訊協(xié)議和單片機(jī)多機(jī)串口通訊的原理,給出程序設(shè)計(jì)流程與思路。 Abstract: In this paper,the design principle of communication between multi-SCM and KingView by serial ports is described in detail.We analysis the advantage of method supplied by KingView,by which KingView can communicate with serial ports of SCM directly,and provide the system’s interface circuit based on the RS-485transmission line.We provide flow diagram of programming and thinking on the basis of communication protocol supplied by KingView and principle of communication among multi-SCM through serial ports.
標(biāo)簽: 工控軟件 單片機(jī) 串口通訊 多機(jī)
上傳時(shí)間: 2013-12-19
上傳用戶:tecman
針對(duì)目前汽車追尾事件頻發(fā)問(wèn)題,提出一種防汽車車前和車后追尾的安全裝置設(shè)計(jì)。該設(shè)計(jì)以高性能、低功耗的8位AVR微處理器ATmega8L為核心,結(jié)合霍爾式車速傳感器、激光雷達(dá)測(cè)距裝置和MMA7260QT加速度傳感器,能夠兼顧車前和車后,摒棄以往設(shè)計(jì)中只考慮車前或車后單一性缺點(diǎn),尤其適用于高速、夜晚或新手行車。 Abstract: Aiming at the high frequency of vehicle rear-end collision,a safe device design of anti-vehicle rear-end collision is presented.In the design,the high-performance,low-power8-bit AVR microprocessor ATmega8L is utilized as a core combined with Hall-type speed sensor,laser-radar ranging devices and the acceleration sensor MMA7260QT.The design considers both the front and back of a car,and overcomes the drawbacks of former designs in which only the front or the back of the car is considered,so it is especially suitable for high-speed,night or the beginner’s driving.
上傳時(shí)間: 2013-10-14
上傳用戶:GavinNeko
實(shí)時(shí)時(shí)鐘是微機(jī)保護(hù)裝置的重要部件,在討論P(yáng)CF8583結(jié)構(gòu)與功能的基礎(chǔ)上,提出采用dsPIC33F系列微處理器與串行I2C時(shí)鐘PCF8583的接口設(shè)計(jì)方案,給出了相應(yīng)的接口電路與軟件流程。該設(shè)計(jì)方案結(jié)構(gòu)簡(jiǎn)單,可靠性高,開發(fā)周期短,具有一定的實(shí)用與參考價(jià)值。所設(shè)計(jì)的微機(jī)保護(hù)裝置已投入現(xiàn)場(chǎng)運(yùn)行,效果良好。 Abstract: Real-time clock chip is an important part in microcomputer protection device.Based on discussing the structure and function of PCF8583,a new interface scheme which uses dsPIC33F microprocessor and serial clock chip(I2C)PCF8583is proposed.The method of the circuit design and the main software flow are introduced in this paper.The scheme has simple structure,higher reliability and shorter exploitation cycle,so has definite practicality or reference value.The microcomputer protection device has been put into operation with better effects.
標(biāo)簽: 8583 PCF 串行時(shí)鐘 中的應(yīng)用
上傳時(shí)間: 2013-11-18
上傳用戶:Thuan
介紹一種基于CAN總線的牽引變電站自動(dòng)化系統(tǒng)通訊規(guī)約的設(shè)計(jì),CAN通訊規(guī)約采用標(biāo)準(zhǔn)幀,報(bào)文采用主動(dòng)發(fā)送和發(fā)送查詢兩種處理形式。該設(shè)計(jì)在城市輕軌與地鐵牽引變電站中的應(yīng)用表明:可實(shí)現(xiàn)間隔層和通訊處理層的數(shù)據(jù)快速、可靠的交換,提高牽引變電站的安全性和穩(wěn)定性 。 Abstract: This paper firstly presents a kind of design dealing with communicational protocol to the traction substation automation system based on CAN bus,and then comes up with the ideas that all frames of CAN communicational protocol should adopt the standard frame,and that messages be processed by two ways:sending initiatively and sending quiries.Subway and light rail application shows that the use of the CAN bus is possible to exchange data quickly and reliably between the layers of the middle and the communicational processing,hence to improve the safety and stability of traction substations.
上傳時(shí)間: 2013-11-07
上傳用戶:bs2005
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1