PICcoder.co.uk Forum  


::post new topic::
<< Start < Prev 1 2 3 4 Next > End >>
Re:Windows not recognizing
Date: 2006/04/05 17:26 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
If its stopping working when your hand is going near it, it is most likely a static problem, check the usb connection between the cable and pic is relatively short, and that all pins which shouls be connect are, its most likely a floating pin is being affected by your hand
Mat
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 11:04 By: Minh Thanh Status: Visitor  
 
Yeah, it's working now. Thanks for your advice. But i think you should place a comment in your tut that "USB is very sensivity, so in your board the USB header must be as musch as nearest from the PIC".

Thanks again. ^_^
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 11:13 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Glad to hear it! It was just a sudden thought i had last night, i will update the article accordingly. Mat
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 13:36 By: Minh Thanh Status: Visitor  
 
I try to declare MPUSBAPI in VB 2005 express, but ive found this declaration did not work:

Public Const VID_PID_NORM = "vid_04d8&pid_000c"
Public Const VID_PID_BOOT = "vid_04d8&pid_000b"
Public Const END_POINT = "MCHP_EP1"

Declare Ansi Function MPUSBOpen Lib "MPUSBAPI.DLL" Alias "_MPUSBOpen" (ByVal DeviceInstance As UInteger, ByVal VID_PID As String, ByVal EndPoint As String, ByVal Direction As UInteger, ByVal Reserved As UInteger) As UInteger

and then i call:

OutPipe = MPUSBOpen(0, VID_PID_NORM, END_POINT, 1, 0)

It does not work because OutPipe = 0xffffffff (INVALID_HANDLE_VALUE)

so i think my declaration was wrong. I successully call MPUSBGetDeviceCount
It return 1 or 0 when i plug or unplug the board.

Sorry if i post this at wrong thread.
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 13:50 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Hi, Sorry im no expert on VB.net, I am hoping to write an interface for it shortly , at the moment this may be useful for you.

Mat
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 15:09 By: Minh Thanh Status: Visitor  
 
Oh it don't work. VB6.0 says about calling convention, and they example is not accessible. But i will try with google.

Thanks again. I will post later when i finish an interface with VB.NET
reply | quote

Re:Windows not recognizing
Date: 2006/04/06 15:18 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Good luck with it. You could always write an article on it
Mat
reply | quote

Re:Windows not recognizing
Date: 2006/04/07 02:59 By: Minh Thanh Status: Visitor  
 
Yeah, at last i've solved the problem. A bit stupid i am with VB.NET. But with VB6 the compiled DLL of microchip does not work. So i have modified it a liitle.
And now everything ok. I would like to include my code in your arctile, because i've found many guys had the same problem with me.

Thanks again.
reply | quote

Re:Windows not recognizing
Date: 2006/04/07 08:10 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Great email me the code, (mat at piccoder dot co dot uk) and ill include it, or write another short article on using vb.net.Thanks a lot Mat
reply | quote

Re:Windows not recognizing
Date: 2006/06/17 16:07 By: majestrix Status: User  
Karma: 0  
Posts: 29
graphgraph
i'm having the same prob with vb.net.. i dont know which .dll to use now..?? ...ummm, Mat, u wrote that article on solving this prob..?? if so pls direct me there. or else, may i know how the problem is solved and it would be great if i get the dll (my email is hasan_mg@hotmail.com)
thanks.
reply | quote

Re:Windows not recognizing .dll
Date: 2006/06/25 15:50 By: recursos Status: Visitor  
 
Me too, I got stuck with Visual C# 2005 Express and "mpusbapi.dll"
(see my post:
my post in "articles")
did you find how to add a reference the "mpusbapi.dll"?
Rec

Post edited by: mat, at: 2006/06/26 14:29
reply | quote

<< Start < Prev 1 2 3 4 Next > End >>
::post new topic::