The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 03:06:34 15:06


Login with username, password and session length


Pages: [1]
Print
Author Topic: PIC18F4550 USB VB.NET help needed  (Read 4593 times)
0 Members and 1 Guest are viewing this topic.
jayanthd
Guest
« on: September 02, 2012, 11:42:25 11: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
***
 Warned
Offline Offline

Posts: 157

Thank You
-Given: 83
-Receive: 115


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

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

Logged
zed65
Newbie
*
Offline Offline

Posts: 26

Thank You
-Given: 39
-Receive: 37


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

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

Posts: 71

Thank You
-Given: 92
-Receive: 25



« Reply #3 on: September 15, 2012, 11:36:39 23: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: 26

Thank You
-Given: 39
-Receive: 37


« Reply #4 on: September 16, 2012, 11:48:02 11: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: 168

Thank You
-Given: 181
-Receive: 267


« Reply #5 on: September 19, 2012, 06:29:49 06: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: 579

Thank You
-Given: 101
-Receive: 151


« Reply #6 on: September 20, 2012, 08:11:45 20: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, 11:20:18 11: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: 38

Thank You
-Given: 107
-Receive: 74


« Reply #8 on: October 21, 2012, 09:28:03 21: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: 138

Thank You
-Given: 19
-Receive: 72



« Reply #9 on: October 22, 2012, 06:17:41 06: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