labview driver for MCP2221 in windows 7 - Page 1
Forum section: electronics / projects

author: cdwijs
author_rank: Regular Contributor
timestamp: July 25, 2016, 12:32:18 pm
content: Hi All,I have taken on the challenge to create a driver for the MCP2221  in labview, in windows 7 enterprize. I seems like I can't install the labview driver instead of the windows driver. Without it, I cannot use labview to talk to the MCP2221I have found a guide from national instruments . I have done & seen the following things:1) Create the INF File Using the Driver Development Wizard. This works without issues, I get 2 .inf files, one for windowsXP, and one for windows 7,8 and 10.2) Install the INF files and the USB device. Copy the .inf file to C:\WINDOWS\INF. This goes without problems.3) Right-click on the INF file in C:\WINDOWS\INF and click Install. Then I get the pop-up "UAC c:\windows\system32\InfDefaultInstall.exe" A .PNF file should be created, but this does not happen.4) I connect my MCP2221 to my PC. Devices and Printers shows me "MCP2221 USB-I2C/UART Combo". Right-click->Hardware gives 4 lines:HID-compliant deviceUSB Composite DeviceUSB Input DeviceUSB Serial Port (COM4)5) I open Device manager, Human Interface Device->HID-compliant device. Next I go to Details, and Hardware IDs:HID\VID_04D8&PID_00DD&MI_026) I have installed MCP2221Terminal.  This shows the same VID and PID numbers: 1 Device Connected (VID: 0x4D8, PID: 0xDD)7) I open Device manager, Human Interface Device->HID-compliant device. Driver->Update Driver->browse->C:\windows\inf. Then I get the following message: "The best driver software for your device is already installed. Windows has determined the driver software for your device is up to date. HID-compliant device"I have local administrator rights on this PChttp://www.microchip.com/wwwproducts/en/MCP2221http://www.ni.com/tutorial/4478/en/http://ww1.microchip.com/downloads/en/DeviceDoc/MCP2221Terminal.zipCheers,Cedric

author: cdwijs
author_rank: Regular Contributor
timestamp: July 25, 2016, 12:50:03 pm
content: I have not read the guide correctly. When I do the correct steps I see the following:1) Device manager->Human interface devices->HID-compliant device->properties->Details->Hardware ID's->HID\VID_04D8&PID_00DD&MI_022) Device manager->Human interface devices->HID-compliant device->properties->Driver->Update Driver->Browse my computer for driver software->Let me pick from a list of device drivers on my computer->Have Disk->Browse->prefix.inf->open->OK. Now the following message comes up: "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems." Then click cancel to close all the panels.My windows version is Windows 7 Enterprise Service pack 1, 64 bitThe NI-Visa version is not shown, but the manual (May 2014, 370131R-01) states windows7 64 bit is supported for USB.The contents of prefix.inf:Code:;===========================================================================; This file was generated using:; NI-VISA Driver Development Wizard version 5.3;===========================================================================;; This file is for use with Windows 8/7/Vista. This will not work on Windows; XP. This Windows Setup Information File contains the information; NI-VISA needs in order to access your instrument. Do not modify the; contents of this file unless you are sure about what you are doing.;;===========================================================================;; Windows Vista/7 Installation:; To apply the contents of this file to a system's settings, right-click; this file and choose "Install". If the device was plugged in before this; file is installed, the device will need to be removed from the "Unknown; Devices" class in the Windows Device Manager.;;===========================================================================;; Windows 8 Installation:; To apply the contents of this file to a system's settings, a catalog file; must be generated and signed using either a personal certificate or a; certificate obtained from a Certificate Authority (CA). For detailed; instructions on how to install your INF on Windows 8, visit; http://ni.com/info and enter the Info Code INFWin8.;;===========================================================================;; Removal:; At installation, Windows copies the file into the %SystemRoot%\inf; directory using the alternate filename oem##.inf. You may have; to search all the files to find the one from which this is copied.; Remove that file and its associated .pnf file (if it exists) from; %SystemRoot%\inf. Either reboot the computer, or perform a; "Scan for hardware changes" from the Windows Device Manager.;;===========================================================================Signature=$WINDOWS NT$Class=visaUsbDeviceClassGUID={A3330EDF-239D-4206-833B-1D58952613D5}Provider=%Vendor0%DriverVer=07/25/2016,1.0CatalogFile=prefix.cat;===========================================================================; Default Installer;===========================================================================CopyINF=prefix.inf;===========================================================================; Class Installer;===========================================================================AddReg=AddClass_AddRegHKR,,,0,%DeviceClassString%HKR,,Icon,,"-20";===========================================================================%Vendor1%=USBList,NTamd64%USB\VID_04D8&PID_00DD.DeviceDesc%=WinUsb_Inst, USB\VID_04D8&PID_00DD[USBList.NTamd64]%USB\VID_04D8&PID_00DD.DeviceDesc%=WinUsb_Inst, USB\VID_04D8&PID_00DDHKR,,NoSetupUI,,1Include = winusb.infNeeds = WINUSB.NT[WinUsb_Inst.hw]AddReg=WinUsb_Inst_HW_AddReg[WinUsb_Inst.Services]Addservice = WinUsb, 0x00000002, WinUsb_AddServiceDisplayName = %WinUsb_Service_DisplayName%ServiceType = %SERVICE_KERNEL_DRIVER%StartType = %SERVICE_DEMAND_START%ErrorControl = %SERVICE_ERROR_NORMAL%ServiceBinary = %12%\WinUSB.sysHKR,,DeviceInterfaceGUIDs, 0x10000,"{761ED34A-CCFA-416b-94BB-33486DB1F5D5}"Vendor0="Device Manufacturer Name"Vendor1="Device Manufacturer Name"USB\VID_04D8&PID_00DD.DeviceDesc="Device Model Name"DeviceClassString="NI-VISA USB Devices"WinUsb_Service_DisplayName="WinUSB Driver"SERVICE_BOOT_START = 0x0SERVICE_SYSTEM_START = 0x1SERVICE_AUTO_START = 0x2SERVICE_DEMAND_START = 0x3SERVICE_DISABLED = 0x4SERVICE_KERNEL_DRIVER = 0x1SERVICE_ERROR_IGNORE = 0x0SERVICE_ERROR_NORMAL = 0x1SERVICE_ERROR_SEVERE = 0x2SERVICE_ERROR_CRITICAL = 0x3Cheers,Cedric

author: cdwijs
author_rank: Regular Contributor
timestamp: July 25, 2016, 01:56:00 pm
content: Hi All, I forgot the checkbox "Composite device". Below are the correct steps, I hope this helps anybody. My problem is fixed (for now :-)1) Disconnect the MCP22212) Open NI-VISA Driver Wizzard, choose USB, next, choose Other, then the following message comes up: "It is recommended that you connect your USB device before running the Driver Wizzard in order to ensure compatibility with VISA. Would you still like to install the driver for the unconnected device?" Choose yes. Enter "4D8" and "dd" at vendor ID and Product ID. edit Manufacturer and model name, so it will be obvious this driver is used. Click the checkbox  composite device? and enter 4 for number of interfaces. Then click next. Enter a prefix name, and location for the inf file. Next-> Install the generated files on this computer. enter "yes" to the UAC prompt, and then choose "Install this driver software anyway" to the windows security prompt.3) Connect the MCP2221. The device manager now shows 2 lines under "NI-VISA USB Devices"Cheers,Cedric