亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁(yè)| 資源下載| 資源專輯| 精品軟件
登錄| 注冊(cè)

no-crashes-allowed

  • 1A SIMPLE STEP-DOWN SWITCHING

    The TL2575 and TL2575HV represent superior alternatives to popular three-terminal linear regulators. Due totheir high efficiency, the devices significantly reduce the size of the heatsink and, in many cases, no heatsink isrequired. Optimized for use with standard series of inductors available from several different manufacturers, theTL2575 and TL2575HV greatly simplify the design of switch-mode power supplies by requiring a minimaladdition of only four to six external components for operation.

    標(biāo)簽: STEP-DOWN SWITCHING SIMPLE 1A

    上傳時(shí)間: 2013-11-20

    上傳用戶:jelenecheung

  • 水位監(jiān)測(cè)報(bào)警系統(tǒng)原理

    摘要:本水位監(jiān)測(cè)報(bào)警器使用5V低壓直流電源(也可以用3節(jié)5號(hào)電池代替)就可以對(duì)5~15厘米的水位進(jìn)行監(jiān)測(cè),用LED顯示和數(shù)碼管顯示水位,并可以對(duì)不再此范圍內(nèi)的水位發(fā)出報(bào)警。主要采用CD4066、74LS86、74LS32、CD4511芯片,再加上數(shù)碼管、蜂鳴器、發(fā)光二極管、電阻這些器件組成一個(gè)簡(jiǎn)單而靈敏的監(jiān)測(cè)報(bào)警電路,操作簡(jiǎn)單,接通電源即可工作。因?yàn)榇蟛糠蛛娐凡捎脭?shù)字電路,所以本水位監(jiān)測(cè)報(bào)警器還具有耗能低、準(zhǔn)確性高的特點(diǎn)。關(guān)鍵字:譯碼電路    報(bào)警電路    監(jiān)測(cè)電路 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)測(cè)報(bào)警 系統(tǒng)原理

    上傳時(shí)間: 2013-11-05

    上傳用戶:王慶才

  • USB Demonstration for DK3200 w

    The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 MicrocontrollerCore. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementationof the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision1.1.This application note describes a demonstration program that has been written for the DK3200 hardwaredemonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to workwith the device, using the HID class as a ready-made device driver for the USB connection.IN-APPLICATION-PROGRAMMING (IAP) AND IN-SYSTEM-PROGRAMMING (ISP)Since the μPSD contains two independent Flash memory arrays, the Micro Controller Unit (MCU) can executecode from one memory while erasing and programming the other. Product firmware updates in thefield can be reliably performed over any communication channel (such as CAN, Ethernet, UART, J1850)using this unique architecture. For In-Application-Programming (IAP), all code is updated through theMCU. The main advantage for the user is that the firmware can be updated remotely. The target applicationruns and takes care on its own program code and data memory.IAP is not the only method to program the firmware in μPSD devices. They can also be programmed usingIn-System-Programming (ISP). A IEEE1149.1-compliant JTAG interface is included on the μPSD. Withthis, the entire device can be rapidly programmed while soldered to the circuit board (Main Flash memory,Secondary Boot Flash memory, the PLD, and all configuration areas). This requires no MCU participation.The MCU is completely bypassed. So, the μPSD can be programmed or reprogrammed any time, anywhere, even when completely uncommitted.Both methods take place with the device in its normal hardware environment, soldered to a printed circuitboard. The IAP method cannot be used without previous use of ISP, because IAP utilizes a small amountof resident code to receive the service commands, and to perform the desired operations.

    標(biāo)簽: Demonstration 3200 USB for

    上傳時(shí)間: 2014-02-27

    上傳用戶:zhangzhenyu

  • Input Signal Rise and Fall Tim

    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

    上傳時(shí)間: 2013-10-23

    上傳用戶:copu

  • 介紹C16x系列微控制器的輸入信號(hào)升降時(shí)序圖及特性

    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.

    標(biāo)簽: C16x 微控制器 輸入信號(hào) 時(shí)序圖

    上傳時(shí)間: 2014-04-02

    上傳用戶:han_zh

  • 68HC05K0 Infra-red Remote Cont

    The MC68HC05K0 is a low cost, low pin countsingle chip microcomputer with 504 bytes of userROM and 32 bytes of RAM. The MC68HC05K0 isa member of the 68HC05K series of devices whichare available in 16-pin DIL or SOIC packages.It uses the same CPU as the other devices in the68HC05 family and has the same instructions andregisters. Additionally, the device has a 15-stagemulti-function timer and 10 general purposebi-directional I/0 lines. A mask option is availablefor software programmable pull-downs on all ofthe I/O pins and four of the pins are capable ofgenerating interrupts.The device is ideally suited for remote-controlkeyboard applications because the pull-downs andthe interrupt drivers on the port pins allowkeyboards to be built without any externalcomponents except the keys themselves. There isno need for external pull-up or pull-down resistors,or diodes for wired-OR interrupts, as these featuresare already designed into the device.

    標(biāo)簽: Infra-red Remote Cont 05K

    上傳時(shí)間: 2014-01-24

    上傳用戶:zl5712176

  • 驅(qū)動(dòng)程序與應(yīng)用程序的接口

    有兩種方式可以讓設(shè)備和應(yīng)用程序之間聯(lián)系:1. 通過(guò)為設(shè)備創(chuàng)建的一個(gè)符號(hào)鏈;2. 通過(guò)輸出到一個(gè)接口WDM驅(qū)動(dòng)程序建議使用輸出到一個(gè)接口而不推薦使用創(chuàng)建符號(hào)鏈的方法。這個(gè)接口保證PDO的安全,也保證安全地創(chuàng)建一個(gè)惟一的、獨(dú)立于語(yǔ)言的訪問(wèn)設(shè)備的方法。一個(gè)應(yīng)用程序使用Win32APIs來(lái)調(diào)用設(shè)備。在某個(gè)Win32 APIs和設(shè)備對(duì)象的分發(fā)函數(shù)之間存在一個(gè)映射關(guān)系。獲得對(duì)設(shè)備對(duì)象訪問(wèn)的第一步就是打開一個(gè)設(shè)備對(duì)象的句柄。 用符號(hào)鏈打開一個(gè)設(shè)備的句柄為了打開一個(gè)設(shè)備,應(yīng)用程序需要使用CreateFile。如果該設(shè)備有一個(gè)符號(hào)鏈出口,應(yīng)用程序可以用下面這個(gè)例子的形式打開句柄:hDevice = CreateFile("\\\\.\\OMNIPORT3",  GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ,  NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL ,NULL);文件路徑名的前綴“\\.\”告訴系統(tǒng)本調(diào)用希望打開一個(gè)設(shè)備。這個(gè)設(shè)備必須有一個(gè)符號(hào)鏈,以便應(yīng)用程序能夠打開它。有關(guān)細(xì)節(jié)查看有關(guān)Kdevice和CreateLink的內(nèi)容。在上述調(diào)用中第一個(gè)參數(shù)中前綴后的部分就是這個(gè)符號(hào)鏈的名字。注意:CreatFile中的第一個(gè)參數(shù)不是Windows 98/2000中驅(qū)動(dòng)程序(.sys文件)的路徑。是到設(shè)備對(duì)象的符號(hào)鏈。如果使用DriverWizard產(chǎn)生驅(qū)動(dòng)程序,它通常使用類KunitizedName來(lái)構(gòu)成設(shè)備的符號(hào)鏈。這意味著符號(hào)鏈名有一個(gè)附加的數(shù)字,通常是0。例如:如果鏈接名稱的主干是L“TestDevice”那么在CreateFile中的串就該是“\\\\.\\TestDevice0”。如果應(yīng)用程序需要被覆蓋的I/O,第六個(gè)參數(shù)(Flags)必須或上FILE_FLAG_OVERLAPPED。 使用一個(gè)輸出接口打開句柄用這種方式打開一個(gè)句柄會(huì)稍微麻煩一些。DriverWorks庫(kù)提供兩個(gè)助手類來(lái)使獲得對(duì)該接口的訪問(wèn)容易一些,這兩個(gè)類是CDeviceInterface, 和 CdeviceInterfaceClass。CdeviceInterfaceClass類封裝了一個(gè)設(shè)備信息集,該信息集包含了特殊類中的所有設(shè)備接口信息。應(yīng)用程序能有用CdeviceInterfaceClass類的一個(gè)實(shí)例來(lái)獲得一個(gè)或更多的CdeviceInterface類的實(shí)例。CdeviceInterface類是一個(gè)單一設(shè)備接口的抽象。它的成員函數(shù)DevicePath()返回一個(gè)路徑名的指針,該指針可以在CreateFile中使用來(lái)打開設(shè)備。下面用一個(gè)小例子來(lái)顯示這些類最基本的使用方法:extern GUID TestGuid;HANDLE OpenByInterface(  GUID* pClassGuid,  DWORD instance,  PDWORD pError){  CDeviceInterfaceClass DevClass(pClassGuid, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  CDeviceInterface DevInterface(&DevClass, instance, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  cout << "The device path is "    << DevInterface.DevicePath()    << endl;   HANDLE hDev;  hDev = CreateFile(   DevInterface.DevicePath(),    GENERIC_READ | GENERIC_WRITE,    FILE_SHARE_READ | FILE_SHARE_WRITE,    NULL,    OPEN_EXISTING,    FILE_ATTRIBUTE_NORMAL,    NULL  );  if (hDev == INVALID_HANDLE_VALUE)    *pError = GetLastError();  return hDev;} 在設(shè)備中執(zhí)行I/O操作一旦應(yīng)用程序獲得一個(gè)有效的設(shè)備句柄,它就能使用Win32 APIs來(lái)產(chǎn)生到設(shè)備對(duì)象的IRPs。下面的表顯示了這種對(duì)應(yīng)關(guān)系。Win32 API  DRIVER_FUNCTION_xxxIRP_MJ_xxx  KDevice subclass member function CreateFile  CREATE  Create ReadFile  READ  Read WriteFile  WRITE  Write DeviceIoControl  DEVICE_CONTROL  DeviceControl CloseHandle  CLOSECLEANUP  CloseCleanUp 需要解釋一下設(shè)備類成員的Close和CleanUp:CreateFile使內(nèi)核為設(shè)備創(chuàng)建一個(gè)新的文件對(duì)象。這使得多個(gè)句柄可以映射同一個(gè)文件對(duì)象。當(dāng)這個(gè)文件對(duì)象的最后一個(gè)用戶級(jí)句柄被撤銷后,I/O管理器調(diào)用CleanUp。當(dāng)沒(méi)有任何用戶級(jí)和核心級(jí)的對(duì)文件對(duì)象的訪問(wèn)的時(shí)候,I/O管理器調(diào)用Close。如果被打開的設(shè)備不支持指定的功能,則調(diào)用相應(yīng)的Win32將引起錯(cuò)誤(無(wú)效功能)。以前為Windows95編寫的VxD的應(yīng)用程序代碼中可能會(huì)在打開設(shè)備的時(shí)候使用FILE_FLAG_DELETE_ON_CLOSE屬性。在Windows NT/2000中,建議不要使用這個(gè)屬性,因?yàn)樗鼘?dǎo)致沒(méi)有特權(quán)的用戶企圖打開這個(gè)設(shè)備,這是不可能成功的。I/O管理器將ReadFile和WriteFile的buff參數(shù)轉(zhuǎn)換成IRP域的方法依賴于設(shè)備對(duì)象的屬性。當(dāng)設(shè)備設(shè)置DO_DIRECT_IO標(biāo)志,I/O管理器將buff鎖住在存儲(chǔ)器中,并且創(chuàng)建了一個(gè)存儲(chǔ)在IRP中的MDL域。一個(gè)設(shè)備可以通過(guò)調(diào)用Kirp::Mdl來(lái)存取MDL。當(dāng)設(shè)備設(shè)置DO_BUFFERED_IO標(biāo)志,設(shè)備對(duì)象分別通過(guò)KIrp::BufferedReadDest或 KIrp::BufferedWriteSource為讀或?qū)懖僮鳙@得buff地址。當(dāng)設(shè)備不設(shè)置DO_BUFFERED_IO標(biāo)志也不設(shè)置DO_DIRECT_IO,內(nèi)核設(shè)置IRP 的UserBuffer域來(lái)對(duì)應(yīng)ReadFile或WriteFile中的buff參數(shù)。然而,存儲(chǔ)區(qū)并沒(méi)有被鎖住而且地址只對(duì)調(diào)用進(jìn)程有效。驅(qū)動(dòng)程序可以使用KIrp::UserBuffer來(lái)存取IRP域。對(duì)于DeviceIoControl調(diào)用,buffer參數(shù)的轉(zhuǎn)換依賴于特殊的I/O控制代碼,它不在設(shè)備對(duì)象的特性中。宏CTL_CODE(在winioctl.h中定義)用來(lái)構(gòu)造控制代碼。這個(gè)宏的其中一個(gè)參數(shù)指明緩沖方法是METHOD_BUFFERED, METHOD_IN_DIRECT, METHOD_OUT_DIRECT, 或METHOD_NEITHER。下面的表顯示了這些方法和與之對(duì)應(yīng)的能獲得輸入緩沖與輸出緩沖的KIrp中的成員函數(shù):Method  Input Buffer Parameter  Output Buffer Parameter METHOD_BUFFERED  KIrp::IoctlBuffer KIrp::IoctlBuffer METHOD_IN_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_OUT_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_NEITHER  KIrp::IoctlType3InputBuffer KIrp::UserBuffer 如果控制代碼指明METHOD_BUFFERED,系統(tǒng)分配一個(gè)單一的緩沖來(lái)作為輸入與輸出。驅(qū)動(dòng)程序必須在向輸出緩沖放數(shù)據(jù)之前拷貝輸入數(shù)據(jù)。驅(qū)動(dòng)程序通過(guò)調(diào)用KIrp::IoctlBuffer獲得緩沖地址。在完成時(shí),I/O管理器從系統(tǒng)緩沖拷貝數(shù)據(jù)到提供給Ring 3級(jí)調(diào)用者使用的緩沖中。驅(qū)動(dòng)程序必須在結(jié)束前存儲(chǔ)拷貝到IRP的Information成員中的數(shù)據(jù)個(gè)數(shù)。如果控制代碼不指明METHOD_IN_DIRECT或METHOD_OUT_DIRECT,則DeviceIoControl的參數(shù)呈現(xiàn)不同的含義。參數(shù)InputBuffer被拷貝到一個(gè)系統(tǒng)緩沖,這個(gè)緩沖驅(qū)動(dòng)程序可以通過(guò)調(diào)用KIrp::IoctlBuffer。參數(shù)OutputBuffer被映射到KMemory對(duì)象,驅(qū)動(dòng)程序?qū)@個(gè)對(duì)象的訪問(wèn)通過(guò)調(diào)用KIrp::Mdl來(lái)實(shí)現(xiàn)。對(duì)于METHOD_OUT_DIRECT,調(diào)用者必須有對(duì)緩沖的寫訪問(wèn)權(quán)限。注意,對(duì)METHOD_NEITHER,內(nèi)核只提供虛擬地址;它不會(huì)做映射來(lái)配置緩沖。虛擬地址只對(duì)調(diào)用進(jìn)程有效。這里是一個(gè)用METHOD_BUFFERED的例子:首先,使用宏CTL_CODE來(lái)定義一個(gè)IOCTL代碼:#define IOCTL_MYDEV_GET_FIRMWARE_REV \CTL_CODE (FILE_DEVICE_UNKNOWN,0,METHOD_BUFFERED,FILE_ANY_ACCESS)現(xiàn)在使用一個(gè)DeviceIoControl調(diào)用:BOOLEAN b;CHAR FirmwareRev[60];ULONG FirmwareRevSize;b = DeviceIoControl(hDevice, IOCTL_MYDEV_GET_VERSION_STRING,  NULL, // no input  注意,這里放的是包含有執(zhí)行操作命令的字符串指針  0, FirmwareRev,      //這里是output串指針,存放從驅(qū)動(dòng)程序中返回的字符串。sizeof(FirmwareRev),& FirmwareRevSize,  NULL // not overlapped I/O );如果輸出緩沖足夠大,設(shè)備拷貝串到里面并將拷貝的資結(jié)束設(shè)置到FirmwareRevSize中。在驅(qū)動(dòng)程序中,代碼看起來(lái)如下所示:const char* FIRMWARE_REV = "FW 16.33 v5";NTSTATUS MyDevice::DeviceControl( KIrp I ){  ULONG fwLength=0;  switch ( I.IoctlCode() )  {    case IOCTL_MYDEV_GET_FIRMWARE_REV:      fwLength = strlen(FIRMWARE_REV)+1;      if (I.IoctlOutputBufferSize() >= fwLength)      {        strcpy((PCHAR)I.IoctlBuffer(),FIRMWARE_REV);        I.Information() = fwLength;         return I.Complete(STATUS_SUCCESS);      }      else      {              }    case . . .   } }

    標(biāo)簽: 驅(qū)動(dòng)程序 應(yīng)用程序 接口

    上傳時(shí)間: 2013-10-17

    上傳用戶:gai928943

  • DS1820 C51 子程序 (一線數(shù)據(jù)傳輸)

    //芯片資料請(qǐng)到www.elecfans.com查找 //DS1820 C51 子程序//這里以11.0592M晶體為例,不同的晶體速度可能需要調(diào)整延時(shí)的時(shí)間//sbit DQ =P2^1;//根據(jù)實(shí)際情況定義端口 typedef unsigned char byte;typedef unsigned int  word; //延時(shí)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 總線上讀取一個(gè)字節(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 總線上寫一個(gè)字節(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;}

    標(biāo)簽: 1820 C51 DS 程序

    上傳時(shí)間: 2013-11-03

    上傳用戶:hongmo

  • RS232串行接口電平轉(zhuǎn)接器

    RS-232-C 是PC 機(jī)常用的串行接口,由于信號(hào)電平值較高,易損壞接口電路的芯片,與TTL電平不兼容故需使用電平轉(zhuǎn)換電路方能與TTL 電路連接。本產(chǎn)品(轉(zhuǎn)接器),可以實(shí)現(xiàn)任意電平下(0.8~15)的UART串行接口到RS-232-C/E接口的無(wú)源電平轉(zhuǎn)接, 使用非常方便可靠。 什么是RS-232-C 接口?采用RS-232-C 接口有何特點(diǎn)?傳輸電纜長(zhǎng)度如何考慮?答: 計(jì)算機(jī)與計(jì)算機(jī)或計(jì)算機(jī)與終端之間的數(shù)據(jù)傳送可以采用串行通訊和并行通訊二種方式。由于串行通訊方式具有使用線路少、成本低,特別是在遠(yuǎn)程傳輸時(shí),避免了多條線路特性的不一致而被廣泛采用。 在串行通訊時(shí),要求通訊雙方都采用一個(gè)標(biāo)準(zhǔn)接口,使不同 的設(shè)備可以方便地連接起來(lái)進(jìn)行通訊。 RS-232-C接口(又稱 EIA RS-232-C)是目前最常用的一種串行通訊接口。它是在1970 年由美國(guó)電子工業(yè)協(xié)會(huì)(EIA)聯(lián)合貝爾系統(tǒng)、 調(diào)制解調(diào)器廠家及計(jì)算機(jī)終端生產(chǎn)廠家共同制定的用于串行通訊的標(biāo)準(zhǔn)。它的全名是“數(shù)據(jù)終端設(shè)備(DTE)和數(shù)據(jù)通訊設(shè)備(DCE)之間串行二進(jìn)制數(shù)據(jù)交換接口技術(shù)標(biāo)準(zhǔn)”該標(biāo)準(zhǔn)規(guī)定采用一個(gè)25 個(gè)腳的 DB25 連接器,對(duì)連接器的每個(gè)引腳的信號(hào)內(nèi)容加以規(guī)定,還對(duì)各種信號(hào)的電平加以規(guī)定。(1) 接口的信號(hào)內(nèi)容實(shí)際上RS-232-C 的25 條引線中有許多是很少使用的,在計(jì)算機(jī)與終端通訊中一般只使用3-9 條引線。(2) 接口的電氣特性 在RS-232-C 中任何一條信號(hào)線的電壓均為負(fù)邏輯關(guān)系。即:邏輯“1”,-5— -15V;邏輯“0” +5— +15V 。噪聲容限為2V。即 要求接收器能識(shí)別低至+3V 的信號(hào)作為邏輯“0”,高到-3V的信號(hào) 作為邏輯“1”(3) 接口的物理結(jié)構(gòu) RS-232-C 接口連接器一般使用型號(hào)為DB-25 的25 芯插頭座,通常插頭在DCE 端,插座在DTE端. 一些設(shè)備與PC 機(jī)連接的RS-232-C 接口,因?yàn)椴皇褂脤?duì)方的傳送控制信號(hào),只需三條接口線,即“發(fā)送數(shù)據(jù)”、“接收數(shù)據(jù)”和“信號(hào)地”。所以采用DB-9 的9 芯插頭座,傳輸線采用屏蔽雙絞線。(4) 傳輸電纜長(zhǎng)度由RS-232C 標(biāo)準(zhǔn)規(guī)定在碼元畸變小于4%的情況下,傳輸電纜長(zhǎng)度應(yīng)為50 英尺,其實(shí)這個(gè)4%的碼元畸變是很保守的,在實(shí)際應(yīng)用中,約有99%的用戶是按碼元畸變10-20%的范圍工作的,所以實(shí)際使用中最大距離會(huì)遠(yuǎn)超過(guò)50 英尺,美國(guó)DEC 公司曾規(guī)定允許碼元畸變?yōu)?0%而得出附表2 的實(shí)驗(yàn)結(jié)果。其中1 號(hào)電纜為屏蔽電纜,型號(hào)為DECP.NO.9107723 內(nèi)有三對(duì)雙絞線,每對(duì)由22# AWG 組成,其外覆以屏蔽網(wǎng)。2 號(hào)電纜為不帶屏蔽的電纜。 2. 什么是RS-485 接口?它比RS-232-C 接口相比有何特點(diǎn)?答: 由于RS-232-C 接口標(biāo)準(zhǔn)出現(xiàn)較早,難免有不足之處,主要有以下四點(diǎn):(1) 接口的信號(hào)電平值較高,易損壞接口電路的芯片,又因?yàn)榕cTTL 電平不兼容故需使用電平轉(zhuǎn)換電路方能與TTL 電路連接。(2) 傳輸速率較低,在異步傳輸時(shí),波特率為20Kbps。(3) 接口使用一根信號(hào)線和一根信號(hào)返回線而構(gòu)成共地的傳輸形式, 這種共地傳輸容易產(chǎn)生共模干擾,所以抗噪聲干擾性弱。(4) 傳輸距離有限,最大傳輸距離標(biāo)準(zhǔn)值為50 英尺,實(shí)際上也只能 用在50 米左右。針對(duì)RS-232-C 的不足,于是就不斷出現(xiàn)了一些新的接口標(biāo)準(zhǔn),RS-485 就是其中之一,它具有以下特點(diǎn):1. RS-485 的電氣特性:邏輯“1”以兩線間的電壓差為+(2—6) V 表示;邏輯“0”以兩線間的電壓差為-(2—6)V 表示。接口信號(hào)電平比RS-232-C 降低了,就不易損壞接口電路的芯片, 且該電平與TTL 電平兼容,可方便與TTL 電路連接。2. RS-485 的數(shù)據(jù)最高傳輸速率為10Mbps3. RS-485 接口是采用平衡驅(qū)動(dòng)器和差分接收器的組合,抗共模干能力增強(qiáng),即抗噪聲干擾性好。4. RS-485 接口的最大傳輸距離標(biāo)準(zhǔn)值為4000 英尺,實(shí)際上可達(dá) 3000 米,另外RS-232-C接口在總線上只允許連接1 個(gè)收發(fā)器, 即單站能力。而RS-485 接口在總線上是允許連接多達(dá)128 個(gè)收發(fā)器。即具有多站能力,這樣用戶可以利用單一的RS-485 接口方便地建立起設(shè)備網(wǎng)絡(luò)。因RS-485 接口具有良好的抗噪聲干擾性,長(zhǎng)的傳輸距離和多站能力等上述優(yōu)點(diǎn)就使其成為首選的串行接口。 因?yàn)镽S485 接口組成的半雙工網(wǎng)絡(luò),一般只需二根連線,所以RS485接口均采用屏蔽雙絞線傳輸。 RS485 接口連接器采用DB-9 的9 芯插頭座,與智能終端RS485接口采用DB-9(孔),與鍵盤連接的鍵盤接口RS485 采用DB-9(針)。3. 采用RS485 接口時(shí),傳輸電纜的長(zhǎng)度如何考慮?答: 在使用RS485 接口時(shí),對(duì)于特定的傳輸線經(jīng),從發(fā)生器到負(fù)載其數(shù)據(jù)信號(hào)傳輸所允許的最大電纜長(zhǎng)度是數(shù)據(jù)信號(hào)速率的函數(shù),這個(gè) 長(zhǎng)度數(shù)據(jù)主要是受信號(hào)失真及噪聲等影響所限制。下圖所示的最大電纜長(zhǎng)度與信號(hào)速率的關(guān)系曲線是使用24AWG 銅芯雙絞電話電纜(線 徑為0.51mm),線間旁路電容為52.5PF/M,終端負(fù)載電阻為100 歐 時(shí)所得出。(曲線引自GB11014-89 附錄A)。由圖中可知,當(dāng)數(shù)據(jù)信 號(hào)速率降低到90Kbit/S 以下時(shí),假定最大允許的信號(hào)損失為6dBV 時(shí), 則電纜長(zhǎng)度被限制在1200M。實(shí)際上,圖中的曲線是很保守的,在實(shí) 用時(shí)是完全可以取得比它大的電纜長(zhǎng)度。 當(dāng)使用不同線徑的電纜。則取得的最大電纜長(zhǎng)度是不相同的。例 如:當(dāng)數(shù)據(jù)信號(hào)速率為600Kbit/S 時(shí),采用24AWG 電纜,由圖可知最 大電纜長(zhǎng)度是200m,若采用19AWG 電纜(線徑為0。91mm)則電纜長(zhǎng) 度將可以大于200m; 若采用28AWG 電纜(線徑為0。32mm)則電纜 長(zhǎng)度只能小于200m。

    標(biāo)簽: 232 RS 串行接口 電平

    上傳時(shí)間: 2013-10-11

    上傳用戶:時(shí)代電子小智

  • PLC TM卡開發(fā)系統(tǒng)匯編程序(ATM8051)

    PLC TM卡開發(fā)系統(tǒng)匯編程序(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

    標(biāo)簽: 8051 PLC ATM TM卡

    上傳時(shí)間: 2014-03-24

    上傳用戶:448949

主站蜘蛛池模板: 巴青县| 遂平县| 鹤峰县| 彭州市| 射洪县| 托里县| 建昌县| 望都县| 高尔夫| 德昌县| 噶尔县| 铜川市| 阳城县| 错那县| 通化市| 那曲县| 台东县| 阳高县| 磐安县| 福贡县| 偏关县| 习水县| 桃园县| 江孜县| 通江县| 天气| 鄂州市| 镇康县| 建水县| 和顺县| 道孚县| 尉犁县| 健康| 岳西县| 平乡县| 天气| 利津县| 扬中市| 徐州市| 交口县| 芦溪县|