摘要:本水位監(jiān)測報警器使用5V低壓直流電源(也可以用3節(jié)5號電池代替)就可以對5~15厘米的水位進(jìn)行監(jiān)測,用LED顯示和數(shù)碼管顯示水位,并可以對不再此范圍內(nèi)的水位發(fā)出報警。主要采用CD4066、74LS86、74LS32、CD4511芯片,再加上數(shù)碼管、蜂鳴器、發(fā)光二極管、電阻這些器件組成一個簡單而靈敏的監(jiān)測報警電路,操作簡單,接通電源即可工作。因?yàn)榇蟛糠蛛娐凡捎脭?shù)字電路,所以本水位監(jiān)測報警器還具有耗能低、準(zhǔn)確性高的特點(diǎn)。關(guān)鍵字:譯碼電路 報警電路 監(jiān)測電路 Abstract: The water level alarm monitoring the use of 5 V low-voltage DC power (can also use three batteries replaced on the 5th) will be able to 5 to 15 centimeters of water level monitoring, with LED display and digital display of water level, and this can no longer Within the scope of a water level alarm. Mainly CD4066, 74LS86, 74LS32, CD4511 chips, coupled with digital control, buzzer, light-emitting diode, the resistance of these devices composed of a simple and sensitive monitoring alarm circuits. Because the majority of circuits using digital circuitry, so the water level monitored alarm system also has low energy consumption, high accuracy of the characteristics. Keyword: Decoding circuit alarm circuit monitoring circuit
標(biāo)簽: 水位 監(jiān)測報警 系統(tǒng)原理
上傳時間: 2013-11-05
上傳用戶:王慶才
基于單片機(jī)控制的二氧化碳濃度測試計:基于CDM4161二氧化碳?xì)怏w濃度測試模塊以及ATtiny26單片機(jī),提出了一種二氧化碳濃度測試計的設(shè)計方案。該方案具有硬件電路簡單、成本低、可靠性高、測量準(zhǔn)確等優(yōu)點(diǎn),具有較高的實(shí)用價值。 Abstract: Abstract:A desigh scheme of CO2 concentration meter based on CDM4161carbon dioxide concentration test module and ATtiny26micro-controller is presented in this paper.The design scheme features simple hardware circuit,low-cost,high reli-ability,accurate measurement and it has a high practical value.
上傳時間: 2013-11-14
上傳用戶:zjwangyichao
The C500 microcontroller family usually provides only one on-chip synchronous serialchannel (SSC). If a second SSC is required, an emulation of the missing interface mayhelp to avoid an external hardware solution with additional electronic components.The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using optimized SW routines with a performance up to 25KBaud in Slave Mode with half duplex transmission and an overhead less than 60% atSAB C513 with 12 MHz. Due to the implementation in C this performance is not the limitof the chip. A pure implementation in assembler will result in a strong reduction of theCPU load and therefore increase the maximum speed of the interface. In addition,microcontrollers like the SAB C505 will speed up the interface by a factor of two becauseof an optimized architecture compared with the SAB C513.Moreover, this solution lays stress on using as few on-chip hardware resources aspossible. A more excessive consumption of those resources will result in a highermaximum speed of the emulated interface.Due to the restricted performance of an 8 bit microcontroller a pin compatible solution isprovided only; the internal register based programming interface is replaced by a set ofsubroutine calls.The attached source files also contain a test shell, which demonstrates how to exchangeinformation between an on-chip HW-SSC and the emulated SW-SSC via 5 external wiresin different operation modes. It is based on the SAB C513 (Siemens 8 bit microcontroller).A table with load measurements is presented to give an indication for the fraction of CPUperformance required by software for emulating the SSC.
標(biāo)簽: synchronous Emulating serial
上傳時間: 2014-01-31
上傳用戶:z1191176801
The Infineon TriCore provides an Interrupt System with a high safety standard. Thisdocument contains some instructions on how to initiate an Interrupt from an externaldevice. First it will show you how to trigger an Interrupt Service Request by an impulseon Port 0 or Port 1. Then in the second part of the document you can find hints how todebounce impulses to enable the use of a simple switch as input device.Authors: Thomas Bliem, CQ Nguyen / Infineon SMI MD Apps
標(biāo)簽: TriCore 外部設(shè)備 中斷 微控制器
上傳時間: 2013-11-05
上傳用戶:uuuuuuu
All inputs of the C16x family have Schmitt-Trigger input characteristics. These Schmitt-Triggers are intended to always provide proper internal low and high levels, even if anundefined voltage level (between TTL-VIL and TTL-VIH) is externally applied to the pin.The hysteresis of these inputs, however, is very small, and can not be properly used in anapplication to suppress signal noise, and to shape slow rising/falling input transitions.Thus, it must be taken care that rising/falling input signals pass the undefined area of theTTL-specification between VIL and VIH with a sufficient rise/fall time, as generally usualand specified for TTL components (e.g. 74LS series: gates 1V/us, clock inputs 20V/us).The effect of the implemented Schmitt-Trigger is that even if the input signal remains inthe undefined area, well defined low/high levels are generated internally. Note that allinput signals are evaluated at specific sample points (depending on the input and theperipheral function connected to it), at that signal transitions are detected if twoconsecutive samples show different levels. Thus, only the current level of an input signalat these sample points is relevant, that means, the necessary rise/fall times of the inputsignal is only dependant on the sample rate, that is the distance in time between twoconsecutive evaluation time points. If an input signal, for instance, is sampled throughsoftware every 10us, it is irrelevant, which input level would be seen between thesamples. Thus, it would be allowable for the signal to take 10us to pass through theundefined area. Due to the sample rate of 10us, it is assured that only one sample canoccur while the signal is within the undefined area, and no incorrect transition will bedetected. For inputs which are connected to a peripheral function, e.g. capture inputs, thesample rate is determined by the clock cycle of the peripheral unit. In the case of theCAPCOM unit this means a sample rate of 400ns @ 20MHz CPU clock. This requiresinput signals to pass through the undefined area within these 400ns in order to avoidmultiple capture events.For input signals, which do not provide the required rise/fall times, external circuitry mustbe used to shape the signal transitions.In the attached diagram, the effect of the sample rate is shown. The numbers 1 to 5 in thediagram represent possible sample points. Waveform a) shows the result if the inputsignal transition time through the undefined TTL-level area is less than the time distancebetween the sample points (sampling at 1, 2, 3, and 4). Waveform b) can be the result ifthe sampling is performed more than once within the undefined area (sampling at 1, 2, 5,3, and 4).Sample points:1. Evaluation of the signal clearly results in a low level2. Either a low or a high level can be sampled here. If low is sampled, no transition willbe detected. If the sample results in a high level, a transition is detected, and anappropriate action (e.g. capture) might take place.3. Evaluation here clearly results in a high level. If the previous sample 2) had alreadydetected a high, there is no change. If the previous sample 2) showed a low, atransition from low to high is detected now.
標(biāo)簽: Signal Input Fall Rise
上傳時間: 2013-10-23
上傳用戶:copu
All inputs of the C16x family have Schmitt-Trigger input characteristics. These Schmitt-Triggers are intended to always provide proper internal low and high levels, even if anundefined voltage level (between TTL-VIL and TTL-VIH) is externally applied to the pin.The hysteresis of these inputs, however, is very small, and can not be properly used in anapplication to suppress signal noise, and to shape slow rising/falling input transitions.Thus, it must be taken care that rising/falling input signals pass the undefined area of theTTL-specification between VIL and VIH with a sufficient rise/fall time, as generally usualand specified for TTL components (e.g. 74LS series: gates 1V/us, clock inputs 20V/us).The effect of the implemented Schmitt-Trigger is that even if the input signal remains inthe undefined area, well defined low/high levels are generated internally. Note that allinput signals are evaluated at specific sample points (depending on the input and theperipheral function connected to it), at that signal transitions are detected if twoconsecutive samples show different levels. Thus, only the current level of an input signalat these sample points is relevant, that means, the necessary rise/fall times of the inputsignal is only dependant on the sample rate, that is the distance in time between twoconsecutive evaluation time points. If an input signal, for instance, is sampled throughsoftware every 10us, it is irrelevant, which input level would be seen between thesamples. Thus, it would be allowable for the signal to take 10us to pass through theundefined area. Due to the sample rate of 10us, it is assured that only one sample canoccur while the signal is within the undefined area, and no incorrect transition will bedetected. For inputs which are connected to a peripheral function, e.g. capture inputs, thesample rate is determined by the clock cycle of the peripheral unit. In the case of theCAPCOM unit this means a sample rate of 400ns @ 20MHz CPU clock. This requiresinput signals to pass through the undefined area within these 400ns in order to avoidmultiple capture events.
上傳時間: 2014-04-02
上傳用戶:han_zh
提出了一個由AT89C52單片機(jī)控制步進(jìn)電機(jī)的實(shí)例??梢酝ㄟ^鍵盤輸入相關(guān)數(shù)據(jù), 并根據(jù)需要, 實(shí)時對步進(jìn)電機(jī)工作方式進(jìn)行設(shè)置, 具有實(shí)時性和交互性的特點(diǎn)。該系統(tǒng)可應(yīng)用于步進(jìn)電機(jī)控制的大多數(shù)場合。實(shí)踐表明, 系統(tǒng)性能優(yōu)于傳統(tǒng)的步進(jìn)電機(jī)控制器。關(guān)鍵詞: 單片機(jī); 步進(jìn)電動機(jī); 直流固態(tài)繼電器; 實(shí)時控制Con trol System of Stepp ingMotor Ba sed on AT89C52 ChipM icrocomputerMENGWu2sheng, L ILiang (College of Automatization, Northwestern Polytechnical Unversity, Xipan 710072, China)ABSTRACT: A stepp ing motor control system based on AT89C52 chip microcomputer was described.The data can be inputwith keyboard, and stepp ingmotorwas controlled by these data. According to the demand, users can set the workingmodel of stepp ingmotor in real2time. This system can be widely used in stepp ing motor controlling. The p ractice showed that the performance of this system outdid the tradi tional stepp ing motor controller.KEY WORDS: Chip microcomputer; Stepp ingmotor; DCSSR; Real2time control
標(biāo)簽: Control System ingMot Stepp
上傳時間: 2013-11-19
上傳用戶:leesuper
//芯片資料請到www.elecfans.com查找 //DS1820 C51 子程序//這里以11.0592M晶體為例,不同的晶體速度可能需要調(diào)整延時的時間//sbit DQ =P2^1;//根據(jù)實(shí)際情況定義端口 typedef unsigned char byte;typedef unsigned int word; //延時void delay(word useconds){ for(;useconds>0;useconds--);} //復(fù)位byte ow_reset(void){ byte presence; DQ = 0; //pull DQ line low delay(29); // leave it low for 480us DQ = 1; // allow line to return high delay(3); // wait for presence presence = DQ; // get presence signal delay(25); // wait for end of timeslot return(presence); // presence signal returned} // 0=presence, 1 = no part //從 1-wire 總線上讀取一個字節(jié)byte read_byte(void){ byte i; byte value = 0; for (i=8;i>0;i--) { value>>=1; DQ = 0; // pull DQ low to start timeslot DQ = 1; // then return high delay(1); //for (i=0; i<3; i++); if(DQ)value|=0x80; delay(6); // wait for rest of timeslot } return(value);} //向 1-WIRE 總線上寫一個字節(jié)void write_byte(char val){ byte i; for (i=8; i>0; i--) // writes byte, one bit at a time { DQ = 0; // pull DQ low to start timeslot DQ = val&0x01; delay(5); // hold value for remainder of timeslot DQ = 1; val=val/2; } delay(5);} //讀取溫度char Read_Temperature(void){ union{ byte c[2]; int x; }temp; ow_reset(); write_byte(0xCC); // Skip ROM write_byte(0xBE); // Read Scratch Pad temp.c[1]=read_byte(); temp.c[0]=read_byte(); ow_reset(); write_byte(0xCC); //Skip ROM write_byte(0x44); // Start Conversion return temp.x/2;}
上傳時間: 2013-11-03
上傳用戶:hongmo
//遙控解碼子程序,LC7461,用戶碼為11C//external interrupt0void isr_4(){ unsigned char r_count;//定義解碼的個數(shù) unsigned long use_data=0;//定義16位的用戶碼,只用到13位 unsigned long use_code=0;//定義16位的用戶反碼,只用到13位 unsigned long data=0;//定義16位數(shù)據(jù)碼,包括8位數(shù)據(jù)碼和反碼 unsigned char data_h=0;//數(shù)據(jù)反碼 unsigned char data_l=0;//數(shù)據(jù)碼 _clrwdt();// _delay(7000);//7461解碼,延時7000// _delay(7000);//7461解碼,延時7000//_delay(7000);//7461解碼,延時7000 if(remote==1) goto error; while(remote==0);//wait to high //_delay(9744);count_delay=0; while(count_delay<143); if(remote==1) goto error; /////用戶碼解碼use_data//////////add////////////////////////// for(r_count=13;r_count>0;r_count--) { while(remote==0);//wait to high count_delay=0; while(count_delay<24);//_delay(1680); _c=remote; if(_c==1) { _lrrc(&use_data); count_delay=0; while(count_delay<32);//_delay(2200);//wait to low } else _lrrc(&use_data); } _nop(); //if(remote==1) //_delay(1680);//wait to low while(remote==1);//wait to low _nop(); ////////用戶碼解碼finish/////////add/////////add//////// /////用戶碼反碼解碼use_code//////////add////////////////////////// for(r_count=13;r_count>0;r_count--) { while(remote==0);//wait to high count_delay=0; while(count_delay<24);//_delay(1680); _c=remote; if(_c==1) { _lrrc(&use_code); count_delay=0; while(count_delay<32);//_delay(2200);//wait to low } else _lrrc(&use_code); } _nop(); //if(remote==1) // _delay(1680);//wait to low while(remote==1);//wait to low _nop(); ////////用戶碼反碼解碼finish/////////add/////////add//////// ////數(shù)據(jù)碼解碼開始////data_l為用戶碼,data_h為數(shù)據(jù)碼反碼//////////// for(r_count=16;r_count>0;r_count--) { while(remote==0);//wait to high count_delay=0; while(count_delay<24);//_delay(1680); _c=remote; if(_c==1) { _lrrc(&data); count_delay=0; while(count_delay<32);//_delay(2200);//wait to low } else _lrrc(&data); } ////數(shù)據(jù)碼解碼結(jié)束//////////////////////////////////////////////// data_l=data; data_h=data>>8; ///用戶碼////// use_data>>=3; use_code>>=3; use_code=~use_code; //////// ////如果用戶碼等與0x11c并且數(shù)據(jù)碼和數(shù)據(jù)反碼都校驗(yàn)一致,解碼成功 //if((~data_h==data_l)&&use_data==0x11c)//使用用戶碼 //跳過用戶碼 if(~data_h==data_l)//如果數(shù)據(jù)碼和數(shù)據(jù)反碼(取反后)相等,解碼正確 { _nop(); r_data=data_l;//r_data為解出的最終數(shù)據(jù)碼 } //否則解碼不成功 _nop(); _nop();error: //r_data=nocode; _nop(); _nop(); _nop();}
上傳時間: 2014-03-27
上傳用戶:shenlan
基于多點(diǎn)網(wǎng)絡(luò)的水廠自動監(jiān)控系統(tǒng)設(shè)計Design of MPI Based Automatic Monitoring and Control System in Water Works劉 美 俊(湖南工程學(xué)院,湘潭411101)摘要針對水廠工作水泵多、現(xiàn)場離控制站距離遠(yuǎn)的特點(diǎn),提出了一種基于MPI多點(diǎn)網(wǎng)絡(luò)的自動監(jiān)控系統(tǒng)的設(shè)計方法,分析了系統(tǒng)的工作原理,介紹了系統(tǒng)中數(shù)據(jù)的采集與處理、主站與從站的通信原理以及系統(tǒng)軟件的設(shè)計。由于這種系統(tǒng)的主、從站PLC之間采用MPI網(wǎng)絡(luò)通信,具有運(yùn)行可靠、性能價格比高的特點(diǎn),所以適用于中小規(guī)模水廠的分布式監(jiān)控場合。關(guān)鍵詞多點(diǎn)網(wǎng)絡(luò)主站從站監(jiān)控系統(tǒng)Abstract Ina ccordancew ithth efe atuersof w aterw orks,i. e. ,manyp umpsin o perationa ndth ep umps, farfor mt hec ontrolst ation,th em ethodo fdesigninga na utomati(〕monitoringa ndc ontorlsy stemb asedo nM PIis p resented.Th eo perationalpr incipleo fth esy stemi san alyzed,th ed atac olection,data processing; communication between master station and slave station as wel as design and system software are discussed. Because MPI network communicationis used among master station, slave stations and PLC, the system is reliable and high cost-efective. It is, suitable for smal and mediumsized water works for distrbuted monitoring and control.Keywords MPI Masterst ation Slaves tation Monitoringa ndc ontorlsy stem 自來 水 廠 的自動控制系統(tǒng)一般分為兩大部分,一對組態(tài)硬件要求較高,投資較大。相對而言,MPI網(wǎng)是水源地深水泵的工作控制,一是水廠區(qū)變頻恒壓供絡(luò)速度可達(dá)187.5 M bps,通過一級中繼器傳輸距離可水控制,兩部分的實(shí)際距離通常都比較遠(yuǎn)。某廠水源達(dá)Ikm 。根據(jù)水廠的具體情況,確定以MPI方式組地有3臺深井泵給水廠區(qū)的蓄水池供水。水廠區(qū)的成網(wǎng)絡(luò),主站PLC為S7-300系列的CPU3121FM,從任務(wù)是對水池的水進(jìn)行消毒處理后,通過加壓泵向管站為S7-200系列的CPU222。這樣既滿足了系統(tǒng)要路恒壓供水。選用Siemens公司的S7系列可編程控求,又相對于Profibus網(wǎng)絡(luò)節(jié)省了三分之一的成本,制器(PLC)和上位機(jī)組成實(shí)時數(shù)據(jù)采集和監(jiān)控系統(tǒng), 這種分布式監(jiān)控系統(tǒng)具有較高的性能價格比。系統(tǒng)對深水泵進(jìn)行遠(yuǎn)程控制,對供水泵采用變頻器進(jìn)行恒中PLC的物理層采用RS - 485接口,網(wǎng)絡(luò)延伸選用壓控制以保證整個水廠的電機(jī)設(shè)備安全、可靠地運(yùn)帶防雷保護(hù)的中繼器,使系統(tǒng)的安全運(yùn)行得到了保行。證。MPI網(wǎng)絡(luò)的拓?fù)浣Y(jié)構(gòu)如圖1所示。1 多點(diǎn)網(wǎng)絡(luò)(NWI)監(jiān)控系統(tǒng)的組成Sie me ns 公司S7系列PLC通常有MP」多點(diǎn)網(wǎng)絡(luò)與Profibus現(xiàn)場總線網(wǎng)絡(luò)兩種組網(wǎng)方式。Profibus現(xiàn)場總線的應(yīng)用目前較為普遍,通用性較好,它由Profibus一DP, Profibus一FMS, Profibus一PA組成。Profibus - DP型用于分散外設(shè)間的數(shù)據(jù)傳輸,傳輸速率為9.6kbps一12Mbps,主要用于現(xiàn)場控制器與分散1/0之間的通信,可滿足交直流調(diào)速系統(tǒng)快速響應(yīng)的時間要求,特別適合于加工自動化領(lǐng)域的應(yīng)用;Profibus - FMS主要解決車間級通信問題,完成中等傳輸速度的循環(huán)或非循環(huán)數(shù)據(jù)交換任務(wù),適用于紡織、樓宇自動化、可編程控制器、低壓開關(guān)等;Profibus - PA型采用了OSI模型的物理層和數(shù)據(jù)鏈路層,適用于過程自動化的總線類型。
標(biāo)簽: 多點(diǎn) 網(wǎng)絡(luò) 系統(tǒng)設(shè)計 自動監(jiān)控
上傳時間: 2013-10-09
上傳用戶:fac1003
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1