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
This application note demonstrates how to write an Inter Integrated Circuit bus driver (I2C) for the XA-S3 16-bitMicrocontroller from Philips Semiconductors.Not only the driver software is given. This note also contains a set of (example) interface routines and a smalldemo application program. All together it offers the user a quick start in writing a complete I2C system applicationwith the PXAS3x.The driver routines support interrupt driven single master transfers. Furthermore, the routines are suitable foruse in conjunction with real time operating systems.
上傳時間: 2013-11-02
上傳用戶:zw380105939
I2C interface, is a very powerful tool for system designers. Theintegrated protocols allow systems to be completely software defined.Software development time of different products can be reduced byassembling a library of reusable software modules. In addition, themultimaster capability allows rapid testing and alignment ofend-products via external connections to an assembly-line computer.The mask programmable 87LPC76X and its EPROM version, the87LPC76X, can operate as a master or a slave device on the I2Csmall area network. In addition to the efficient interface to thededicated function ICs in the I2C family, the on-board interfacefacilities I/O and RAM expansion, access to EEPROM andprocessor-to-processor communications.
標簽: microcontro Using 76X LPC
上傳時間: 2013-12-30
上傳用戶:Artemis
//芯片資料請到www.elecfans.com查找 //DS1820 C51 子程序//這里以11.0592M晶體為例,不同的晶體速度可能需要調整延時的時間//sbit DQ =P2^1;//根據實際情況定義端口 typedef unsigned char byte;typedef unsigned int word; //延時void delay(word useconds){ for(;useconds>0;useconds--);} //復位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 總線上讀取一個字節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 總線上寫一個字節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
#include <reg51.h>#include<intrins.h> #define BUSY1 (DQ1==0) sbit DQ1 = P0^4; unsigned char idata TMP; unsigned char idata TMP_d; unsigned char f; void wr_ds18_1(char dat);unsigned char rd_ds18_1(); /***************延時程序,單位us,大于10us*************/void time_delay(unsigned char time){ time=time-10; time=time/6; while(time!=0)time--;} /*****************************************************//* reset ds18b20 *//*****************************************************/void ds_reset_1(void){ unsigned char idata count=0; DQ1=0; time_delay(240); time_delay(240); DQ1=1; return;}
上傳時間: 2013-10-29
上傳用戶:sssnaxie
基于變頻調速的水平連鑄機拉坯輥速度控制系統Frequency Inverter Based Drawing RollerS peedC ontrolSy stem ofHorizontal Continuous Casting MachineA 偉劉沖旅巴(南 華 大 學電氣工程學院,衡陽421001)摘要拉坯輥速度控制是水平連鑄工藝的關鍵技術之一,采用變頻器實現水平連鑄機拉坯輥速度程序控制,由信號發生裝置給變頻器提供程控信號。現場應用表明該控制系統速度響應快,控制精度高,滿足了水平連鑄生產的需要。關鍵詞水平連鑄拉坯輥速度程序控制變頻器Absh'act Speedc ontorlof dr awingor leris on eo fth ek eyte chnologiesfo rho rizontalco ntinuousca stingm achine.Fo rth ispu rpose,fr equencyco nverterisad optedfo rdr awingor lersp eedp rogrammablec ontorlof ho rizontalco ntinuousca stingm achine,th ep rogrammableco ntorlsi gnalto fr equencyc onverteris provided場a signal generator. The results of application show that the response of system is rapid and the control accuracy is high enough to meet thedemand of production of horizontal continuous casting.Keywords Horizontalco ntinuousc asting Drawingor ler Speedp rogrammablec ontrol Ferquencyin verter 隨著 現 代 化工業生產對鋼材需求量的日益增加,連鑄生產能力已經成為衡量一個國家冶金工業發展水平的重要指標之一。近十幾年來,水平連鑄由于具有投資少、鑄坯直、見效快等多方面的優點,國內許多鋼鐵企業利用水平連鑄機來澆鑄特種合金鋼,發揮了其獨特的優勢并取得了較好的經濟效益〔1,2)0采用 水 平 連鑄機澆鑄特種合金鋼時,由于拉坯機是水平連鑄系統中的關鍵設備之一,拉坯機及其控制性能的好壞直接影響著連鑄坯的質量,因此,連鑄的拉坯技術便成為整個水平連鑄技術的核心。由于鋼的冶煉過程是在高溫下進行的,鋼水溫度的變化又容易影響鑄坯的質量和成材率,因此,如何能在高溫環境下控制好與鑄坯速度相關的參數(拉、推程量,中停時間和拉坯頻率等)對于確保連鑄作業的進一步高效化,延長系統的連續作業時間十分關鍵。因此,拉坯輥速度控制技術是連鑄生產過程控制領域中的關鍵技術之- [31
上傳時間: 2013-10-12
上傳用戶:gxy670166755
PLC TM卡開發系統匯編程序(ATM8051) ;***************** 定義管腳*************************SCL BIT P1.0SDA BIT P1.1GC BIT P1.2BZ BIT P3.6LEDI BIT P1.4LEDII BIT P1.5OK BIT 20H.1OUT1 BIT P1.3OUT2 BIT P1.0OUT3 BIT P1.1RXD BIT P3.0TXD BIT P3.1PCV BIT P3.2WPC BIT P3.3RPC BIT P3.5LEDR BIT P3.4LEDL BIT P3.6TM BIT P3.7;********************定義寄存器***********************ROMDTA EQU 30H;NUMBY EQU 61H;SLA EQU 60H;MTD EQU 2FH;MRD EQU 40H;TEMP EQU 50H;;ORG 00H;;INDEX:MOV P1, #00H;MOV P2, #0FFHMOV MTD ,#00HCALL REEMOV R0,40HCJNE R0,#01,NO;MOV P2,#1CHLJMP VIMEN MOV P2,#79HACALL TOUCHRESET ;JNC NO ;CALL READTM ;CJNE A,#01H,NO;NOPMOV MTD, #00HCALL WEENOPMOV P2,#4AHSETB BZCALL TIMECLR BZMOV PCON, #0FFHVIME:CALL TIME1CALL TOUCHRESETJNC VIMECALL READTMCJNE A, #01H,VIME;NOPNOPNOPIII: MOV MTD,#00HCALL REECALL BBJNB OK,NO1LJMP ZHUNO1:MOV MTD,#10H
上傳時間: 2014-03-24
上傳用戶:448949
用單片機配置FPGA—PLD設計技巧 Configuration/Program Method for Altera Device Configure the FLEX Device You can use any Micro-Controller to configure the FLEX device–the main idea is clocking in ONE BITof configuration data per CLOCK–start from the BIT 0The total Configuration time–e.g. 10K10 need 15K byte configuration file•calculation equation–10K10* 1.5= 15Kbyte–configuration time for the file itself•15*1024*8*clock = 122,880Clock•assume the CLOCK is 4MHz•122,880*1/4Mhz=30.72msec
上傳時間: 2013-10-09
上傳用戶:a67818601
自動檢測80C51 串行通訊中的波特率本文介紹一種在80C51 串行通訊應用中自動檢測波特率的方法。按照經驗,程序起動后所接收到的第1 個字符用于測量波特率。這種方法可以不用設定難于記憶的開關,還可以免去在有關應用中使用多種不同波特率的煩惱。人們可以設想:一種可靠地實現自動波特檢測的方法是可能的,它無須嚴格限制可被確認的字符。問題是:在各種的條件下,如何可以在大量允許出現的字符中找出波特率的定時間隔。顯然,最快捷的方法是檢測一個單獨位時間(single bit time),以確定接收波特率應該是多少。可是,在RS-232 模式下,許多ASCII 字符并不能測量出一個單獨位時間。對于大多數字符來說,只要波特率存在合理波動(這里的波特率是指標準波特率),從起始位到最后一位“可見”位的數據傳輸周期就會在一定范圍內發生變化。此外,許多系統采用8 位數據、無奇偶校驗的格式傳輸ASCII 字符。在這種格式里,普通ASCII 字節不會有MSB 設定
上傳時間: 2013-10-15
上傳用戶:shirleyYim
傳統的人工耳蝸語音處理器采用ASIC設計,投入成本高,可移植性差,設計了一種基于TMS320VC5509A的人工耳蝸語音處理器。該處理器采用雙麥克風接受語音信號,實現了語音信號的自適應噪聲消除和CIS (Continuous Interleaved Sampling) 方案。同一段語音由DSP采樣處理得到的刺激脈沖與MATLAB采樣處理的結果基本相同。實驗結果表明,基于DSP的人工耳蝸語音處理器能實現語音信號中噪聲的消除并得到良好的刺激脈沖。
上傳時間: 2013-10-22
上傳用戶:23333