Calculates if the brackets in a sentence are correctly close. Input consists, one per line, sentences with brackets, and output say YES if its correctly close, or NO int if its not saying where is the error. Input: ()[]<>(**) (*) (ASA Output: YES NO 2 NO 4
標(biāo)簽: Calculates correctly brackets consists
上傳時(shí)間: 2013-12-13
上傳用戶:aig85
This approach, we feel, came very close to obtaining an image from the camera OV7620. Before we tried to capture a camera signal, we successfully transferred a test image from the FPGA s onboard RAM modules through RS232 to the PC program. This file do it.
標(biāo)簽: obtaining approach Before camera
上傳時(shí)間: 2017-09-11
上傳用戶:youmo81
Firmware that controls a sliding door via a GSM modem (Open and close the door)
標(biāo)簽: door Firmware controls sliding
上傳時(shí)間: 2014-11-24
上傳用戶:ANRAN
This document was developed under the Standard Hardware and Reliability Program (SHARP) TechnologyIndependent Representation of Electronic Products (TIREP) project. It is intended for use by VHSIC HardwareDescription Language (VHDL) design engineers and is offered as guidance for the development of VHDL modelswhich are compliant with the VHDL Data Item Description (DID DI-EGDS-80811) and which can be providedto manufacturing engineering personnel for the development of production data and the subsequent productionof hardware. Most VHDL modeling performed to date has been concentrated at either the component level orat the conceptual system level. The assembly and sub-assembly levels have been largely disregarded. Under theSHARP TIREP project, an attempt has been made to help close this gap. The TIREP models are based upon lowcomplexity Standard Electronic Modules (SEM) of the format A configuration. Although these modules are quitesimple, it is felt that the lessons learned offer guidance which can readily be applied to a wide range of assemblytypes and complexities.
標(biāo)簽: Modelling Guide Navy VHDL
上傳時(shí)間: 2014-12-23
上傳用戶:xinhaoshan2016
OPTOELECTRONICS CIRCUIT COLLECTION AVALANCHE PHOTODIODE BIAS SUPPLY 1Provides an output voltage of 0V to +80V for reverse biasingan avalanche photodiode to control its gain. This circuit canalso be reconfigured to supply a 0V to –80V output.LINEAR TEC DRIVER–1This is a bridge-tied load (BTL) linear amplifier for drivinga thermoelectric cooler (TEC). It operates on a single +5Vsupply and can drive ±2A into a common TEC.LINEAR TEC DRIVER–2This is very similar to DRIVER–1 but its power output stagewas modified to operate from a single +3.3V supply in orderto increase its efficiency. Driving this amplifier from astandard +2.5V referenced signal causes the output transistorsto have unequal power dissipation.LINEAR TEC DRIVER–3This BTL TEC driver power output stage achieves very highefficiency by swinging very close to its supply rails, ±2.5V.This driver can also drive ±2A into a common TEC. Operationis shown with the power output stage operating on±1.5V supplies. Under these conditions, this linear amplifiercan achieve very high efficiency. Application ReportThe following collection of analog circuits may be useful in electro-optics applications such as optical networkingsystems. This page summarizes their salient characteristics.
標(biāo)簽: 光電轉(zhuǎn)換 電路設(shè)計(jì)
上傳時(shí)間: 2013-10-27
上傳用戶:落花無(wú)痕
Abstract: We can apply a BiCMOS integrated circuit with only resistors and no transistors to solve adifficult design problem. The mythically perfect operational amplifier's gain and temperature coefficient aredependent on external resistor values. Maxim precision resistor arrays are manufactured together on asingle die and then automatically trimmed, to ensure close ratio matching. This guarantees that theoperational amplifier (op amp) gain and temperature coefficient are predictable and reliable, even withlarge production volumes.
上傳時(shí)間: 2014-11-30
上傳用戶:ynzfm
Designers spend much time combating thermal effects incircuitry. The close relationship between temperature andelectronic devices is the source of more design headachesthan any other consideration.
標(biāo)簽: 測(cè)量 控制電路 管理技術(shù)
上傳時(shí)間: 2013-10-17
上傳用戶:風(fēng)之驕子
When a system designer specifies a nonisolated dc/dc powermodule, considering the needed input voltage range isequally as important as considering the required performanceattributes and features. Generally, nonisolated moduleshave either a narrow or a wide input voltage range. Narrowinputmodules typically have a nominal input voltage of3.3, 5, or 12 V. For systems that operate from a tightlyregulated input bus—such as those that do not use batterybackup—a narrow-input module is often adequate sincethe input remains fairly stable.Offering greater flexibility, wide-input modules operatewithin a range of 7 to 36 V, which includes the popular12- or 24-V industrial bus. This enables a single module tobe used for generating multiple voltages. These modulesare ideal for industrial controls, HVAC systems, vehicles,medical instrumentation, and other applications that usea loosely regulated distribution bus. In addition, systemspowered by a rectifier/battery charger with lead-acidbattery backup almost always require wide-input modules.System designers who choose power supplies may wantto take a close look at the latest generation of wide-inputdc/dc modules.
標(biāo)簽: Wide-input modules offer dc
上傳時(shí)間: 2014-12-24
上傳用戶:dragonhaixm
在汽車發(fā)動(dòng)機(jī)起動(dòng)時(shí),若發(fā)動(dòng)機(jī)起動(dòng)后起動(dòng)機(jī)不能及時(shí)斷電,將會(huì)燒毀起動(dòng)機(jī)或損壞飛輪齒環(huán);若變速器不在空檔位置起動(dòng),則起動(dòng)機(jī)的瞬間動(dòng)力將使汽車位移,還可能引起交通事故和人身安全。為此介紹一種利用NXP P89LPC901單片機(jī)控制的汽車起動(dòng)保護(hù)控制器,通過(guò)檢測(cè)汽車起動(dòng)開(kāi)關(guān)、變速箱檔位、發(fā)動(dòng)機(jī)轉(zhuǎn)速,實(shí)現(xiàn)對(duì)汽車發(fā)動(dòng)機(jī)起動(dòng)過(guò)程檢測(cè)和保護(hù)。起動(dòng)保護(hù)控制器在發(fā)動(dòng)機(jī)起動(dòng)過(guò)程中通過(guò)采用逐個(gè)關(guān)閉打開(kāi)負(fù)載系統(tǒng),解決汽車發(fā)動(dòng)機(jī)過(guò)程中因起動(dòng)電流大而對(duì)汽車電源的沖擊影響,延長(zhǎng)了電瓶壽命。 Abstract: When the automotive engine is started, the engine start motor and flywheel gear may be damaged, even traffic accidents and personal safeties may be caused by wrong operation or other factors.In order to ensure the automotive engine can be started normally and safely,it is necessary that the protecting measures and methods are considered in the automotive electrical control system.This paper introduces a kind of the automotive engine starting protect controller based on NXP P89LPC901 MCU.The controller can protect the engine starting process by detecting the starter key switch,transmission stall and engine speed.Through the use of close and open load system,the controller can solve the impact on automotive power because of the high-current load in the process of the automobile engine starting, and extend battery life.
上傳時(shí)間: 2013-10-15
上傳用戶:mikesering
有兩種方式可以讓設(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)的第一步就是打開(kāi)一個(gè)設(shè)備對(duì)象的句柄。 用符號(hào)鏈打開(kāi)一個(gè)設(shè)備的句柄為了打開(kāi)一個(gè)設(shè)備,應(yīng)用程序需要使用CreateFile。如果該設(shè)備有一個(gè)符號(hào)鏈出口,應(yīng)用程序可以用下面這個(gè)例子的形式打開(kāi)句柄:hDevice = CreateFile("\\\\.\\OMNIPORT3", GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL ,NULL);文件路徑名的前綴“\\.\”告訴系統(tǒng)本調(diào)用希望打開(kāi)一個(gè)設(shè)備。這個(gè)設(shè)備必須有一個(gè)符號(hào)鏈,以便應(yīng)用程序能夠打開(kāi)它。有關(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è)輸出接口打開(kāi)句柄用這種方式打開(kāi)一個(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)打開(kā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。如果被打開(kāi)的設(shè)備不支持指定的功能,則調(diào)用相應(yīng)的Win32將引起錯(cuò)誤(無(wú)效功能)。以前為Windows95編寫的VxD的應(yīng)用程序代碼中可能會(huì)在打開(kāi)設(shè)備的時(shí)候使用FILE_FLAG_DELETE_ON_close屬性。在Windows NT/2000中,建議不要使用這個(gè)屬性,因?yàn)樗鼘?dǎo)致沒(méi)有特權(quán)的用戶企圖打開(kāi)這個(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
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1