Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 01:18:10 01:18


Login with username, password and session length


Pages: [1]
Print
Author Topic: PIC18F4550 USB VB.NET help needed  (Read 7258 times)
0 Members and 1 Guest are viewing this topic.
jayanthd
Guest
« on: September 02, 2012, 10:42:25 10:42 »

Check this link. http://www.edaboard.com/thread264350.html Please help me. I need some help coding the VB.NET app. The app will have 2 buttons. One to turn ON the led and another to turn OFF the led. There will be a text box and button to send text to LCD.

I need the VB.NET Code for that. I am using mcHID.dll for USB app
Logged
koky
Active Member
***
Offline Offline

Posts: 180

Thank You
-Given: 149
-Receive: 157


WWW
« Reply #1 on: September 02, 2012, 10:58:01 10:58 »

http://www.circuitvalley.com/2011/09/pic-18f-usb-io-board-with-analog.html

Logged
zed65
Newbie
*
Offline Offline

Posts: 29

Thank You
-Given: 45
-Receive: 37


« Reply #2 on: September 15, 2012, 09:52:58 09:52 »

Do you need to use the HID.dll or can you use the USB to serial?
Logged
dipchip
Junior Member
**
Offline Offline

Posts: 69

Thank You
-Given: 92
-Receive: 25



« Reply #3 on: September 15, 2012, 10:36:39 22:36 »

I suggest you check out the MCP2200, it's very close to what your are trying to accomplish. (no analog input though)
There is a visual studio demo app/source that shows how to talk to the chip.  You can find it all on Microchip's website.
It might very well be what you need.

--Chip
Logged
zed65
Newbie
*
Offline Offline

Posts: 29

Thank You
-Given: 45
-Receive: 37


« Reply #4 on: September 16, 2012, 10:48:02 10:48 »

If you can use the USB to serial, have a look at my simple demo: http://www.sonsivri.to/forum/index.php?topic=43772.0
You can easily modify it to do what you want.
Logged
electrojit
Active Member
***
Offline Offline

Posts: 178

Thank You
-Given: 233
-Receive: 285


« Reply #5 on: September 19, 2012, 05:29:49 05:29 »

May be this can give you a start point...
http://code.google.com/p/winusbnet/

Winusb with vb.net is really easy to use and simple example can be found here:
http://www.lvr.com/winusb.htm

And if you are working for winxp/7 32 bit... I guess libusb is also another option...

Regards,
electrojit
Logged
Gallymimu
Hero Member
*****
Offline Offline

Posts: 704

Thank You
-Given: 151
-Receive: 214


« Reply #6 on: September 20, 2012, 07:11:45 19:11 »

HID should be a pretty easy approach.  I can't help you with the .net part of it though.  The other suggestions of using USB to Serial are pretty good ideas.  Low volume electronics development often use these parts since you can very easily program for serial on both the PC and microprocessor side.

The MCP2200 is a decent part.  The more commonly used part is the FTDI FT232R but FTDI has cheaper parts that have most of the same functionality FT230 and FT231 though they have had some silicon issues of late.  The nice thing about FTDI is that the drivers are ubiquitous. That said HID drivers are also ubiquitous... 
Logged
Sisternicky
Inactive

Offline Offline

Posts: 1

Thank You
-Given: 0
-Receive: 0


« Reply #7 on: October 21, 2012, 10:20:18 10:20 »

I believe that your problem is to import the unmanaged myHID.dll into VB.NET?
If so, you can download the PInvoker Addin from www.pinvoker.com. It's a free plugin for Visual Studio that allows you to create PInvoke Calls to unmanaged functions and put them e.g. in a .NET Class to use with your .NET Programs.

To Communicate with HID is fairly simple. While I don't know myHID, the usual approach is:
  • Know your VID and PID
  • Your HID Wrapper can enumerate all the HID Devices with specified VID and PID on the bus, then select the correct one
  • Open the connection
  • Send / Receive predefinded HID packages

If you want to use CDC USB Class, the whole thing is even easier. You can use the USB CDC Driver provided by Microchip and register your device as "COM-Port". Then you can communicate as simple as with the serial port Smiley.
Logged
hbruno
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 112
-Receive: 75


« Reply #8 on: October 21, 2012, 08:28:03 20:28 »

maybe, your response is here :
http://helmpcb.com/software/usb-hid-template-for-visual-basic-2005
also exist for VS 2010
Logged
glenndr_15
Active Member
***
Offline Offline

Posts: 139

Thank You
-Given: 20
-Receive: 72



« Reply #9 on: October 22, 2012, 05:17:41 05:17 »

Try to read Chapter 8 of the book "Advance PIC microcontroller - Projects in C from usb to RTOS with the PIC18F Series" by Dogan Ibrahim. In this chapter it will teach you how interface PIC18f4550 to PC using USB HID and teaches you how to use mcHID.dll.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC