Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 11:10:41 11:10


Login with username, password and session length


Pages: [1] 2  All
Print
Author Topic: LABVIEW USB Interfacing with PIC 18F4550 using HID  (Read 49647 times)
0 Members and 1 Guest are viewing this topic.
vbcoder
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 74
-Receive: 312


I'll always be here to help you


« on: December 17, 2009, 01:26:52 13:26 »

Hi,
I created this poll as I surfed the internet for an HID VIs for communicating with PIC USB Slave controllers using NI LABVIEW. So far, all users depend on NI VISA which requires creation of a driver for your device.

The benefit of this project is that your interfacing card will be used as a  "plug and play device" which utilizes the HID communication protocol (like USB Keyboard or Mouse). This requires no additional driver to be installed (it is rational as you don't expect to find a driver to run your keyboard or mouse). It relies on Hid.dll found in system32 directory.

I'm in the middle of the project and so far everything is pretty good. I'll wait for the members of our forums to participate in the poll to see if this project is worthy to be published.

Cheers
Logged

Quote
Education is a progressive discovery of our own ignorance
Alienbeing
Active Member
***
 Muted
Offline Offline

Posts: 166

Thank You
-Given: 68
-Receive: 45


« Reply #1 on: December 17, 2009, 02:22:50 14:22 »

I have used the USB to UART FT232RL from FTDI which works very well when interfacing with applications I've written for windows. Specifically I write programs in Delphi but see no reason why they wouldn't work with labview also. I program with labview also, but have not used labview with any PIC USB devices. Eventually I will need to work on writing something in labview that does interface to a microcontroller for an up coming job. But for now the FTDI chips are the best solution for me requiring simple serial programming on any PIC that supports serial communications.

Alienbeing
Logged
vbcoder
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 74
-Receive: 312


I'll always be here to help you


« Reply #2 on: December 17, 2009, 04:15:31 16:15 »

I used FT245 FIFO from FTDI in the past. I created 2 projects under Microsoft Visual Basic 2005. However, the complexity of the circuit was my motivation to migrate to USB enabled PIC devices. The simplicity of PCB is drastic using the latter.

If you use FT232, the FTDI provides a LABVIEW examples with a VI library to carryout the read, write operation.
Logged

Quote
Education is a progressive discovery of our own ignorance
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #3 on: December 17, 2009, 04:27:47 16:27 »

How about using 18F4550 Usb demo board (from my bookmaked pages of stuff I marked for "must do this soon")

http://eegeek.net/content/view/13/32/

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2651&param=en534494
Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
vbcoder
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 74
-Receive: 312


I'll always be here to help you


« Reply #4 on: December 17, 2009, 05:00:36 17:00 »

It sounds very good. If I may only propose minor modification:

  • We may add rosettes connected to all free pins of the microcontroller, this way, it would be easy to integrate it with any external module (if you recall my posted project, I implemented this idea in the serial interfacing with LABVIEW
  • I already test the design using our favorite proteus 7.6. Thus I do need help in creating the PCB based on ARES since I only do such a work on Eagle. This way the project will be enriched as anyone will be able to simulate most of his job without even leaving his disk

What do you think?
Logged

Quote
Education is a progressive discovery of our own ignorance
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #5 on: December 17, 2009, 07:49:45 19:49 »

first how about having this topic moved to Projects.
Quote
•We may add rosettes connected to all free pins of the microcontroller, this way, it would be easy to integrate it with any external module (if you recall my posted project, I implemented this idea in the serial interfacing with LABVIEW
•I already test the design using our favorite proteus 7.6. Thus I do need help in creating the PCB based on ARES since I only do such a work on Eagle. This way the project will be enriched as anyone will be able to simulate most of his job without even leaving his disk
The project I had in my to do list(was going to be VBasic front end, would also have the buck converter from the pickit2 (including the power on & voltage ajust from the pickit2 gui)
and a lcd port (in 4 bit mode so only use 1 port of the pic).
Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2403

Thank You
-Given: 405
-Receive: 544


Uhm? where did pickit put my mute button


« Reply #6 on: December 17, 2009, 08:25:36 20:25 »

Moved  & stickyed

Have you looked at the Bitwacker

http://www.schmalzhaus.com/UBW/
Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #7 on: December 17, 2009, 09:04:37 21:04 »

Have you looked at the Bitwacker

http://www.schmalzhaus.com/UBW/
we could start with this for the 18F2550 and mod it to 18F4550
http://www.sparkfun.com/datasheets/DevTools/PIC/UBW-PTH-Kit-Schematic.pdf
Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
fonak
Junior Member
**
 Muted
Offline Offline

Posts: 41

Thank You
-Given: 49
-Receive: 68


« Reply #8 on: December 17, 2009, 09:17:40 21:17 »

HI look at this. It's simlpe LV apps, CCS source code and microchip MCHPUSB Driver.
« Last Edit: December 17, 2009, 09:20:25 21:20 by fonak » Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2403

Thank You
-Given: 405
-Receive: 544


Uhm? where did pickit put my mute button


« Reply #9 on: December 17, 2009, 09:35:37 21:35 »

we could start with this for the 18F2550 and mod it to 18F4550
http://www.sparkfun.com/datasheets/DevTools/PIC/UBW-PTH-Kit-Schematic.pdf

The site I posted is the author of the one for sale at Sparkfun and there is a couple different boards using 5 different chips on that site along with software in liberty basic and bootloader's and a whole lot of stuff really  Grin  so there has to be something there for everyone Cheesy
« Last Edit: December 17, 2009, 09:39:18 21:39 by bbarney » Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
vbcoder
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 74
-Receive: 312


I'll always be here to help you


« Reply #10 on: December 18, 2009, 02:39:20 02:39 »

HI look at this. It's simlpe LV apps, CCS source code and microchip MCHPUSB Driver.

This is no different from the traditional method used by NI VISA. The HID transfer protocol offers the capability of  "not using a driver" with your installed software. We only try to learn something new.

first how about having this topic moved to Projects.The project I had in my to do list(was going to be VBasic front end, would also have the buck converter from the pickit2 (including the power on & voltage ajust from the pickit2 gui)
and a lcd port (in 4 bit mode so only use 1 port of the pic).

I started with this idea and did a complete class for using it with custom enumerated commands with proteus. I thought it would be better to play with LABVIEW especially that none up to the best of my knowledge provided an easy way to do so.

Well, my flames are getting higher by this constructive and valuable opinions. More ideas would certainly put this project in the right direction.
Logged

Quote
Education is a progressive discovery of our own ignorance
burhanmz
Guest
« Reply #11 on: July 15, 2010, 05:20:16 05:20 »

I am interested in this project.
I can not believe I'd find some like this so soon. Its one of the reasons i joined.
I am trying to interface a camera and wireless RF transceiver connected to PIC18F4550 at end 'A'. And on the other end 'B' just a PIC18F4550 with another transceiver. Then try to make an API in LabView and send a command to PIC to get take pictures and transmit it to end 'B' and view/save it on PC.

camera that I bought
http://www.sparkfun.com/commerce/product_info.php?products_id=9334

Transceiver
http://www.sparkfun.com/commerce/product_info.php?products_id=151

So far I'm hung over using Bootloader from UBW (bit whacker) which is a great find, in LabView.
Logged
MisterX
Newbie
*
Offline Offline

Posts: 26

Thank You
-Given: 127
-Receive: 23


« Reply #12 on: August 01, 2010, 03:00:27 03:00 »

Hi vbcoder, did you managed to communoicate with an HID device in LabView using the Call Library Function pointing hid.dll ?

I try to do this since some time without success. It seems like NI don't want people to know much about that, they prefer selling their hardware!!!

My main problem is that I don't know how the hid.dll library is working.

If you have any usefull information it will be very appreciate. Thank you.
Logged
nin82
Guest
« Reply #13 on: September 22, 2010, 10:58:04 22:58 »

such an interesting project shouldnt be dead... is it?? Sad
Logged
Rey Mafia
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 4
-Receive: 21


« Reply #14 on: November 05, 2010, 01:37:24 01:37 »

Are there any news?
Logged
koseyel
Junior Member
**
Offline Offline

Posts: 58

Thank You
-Given: 492
-Receive: 205


« Reply #15 on: April 08, 2011, 10:16:53 22:16 »

Are there any news?

Here is  an interesting discussion on using hid.ll or Microchip custom driver:
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Sending-and-receiving-data-from-PIC18F4550/m-p/1046826?requireLogin=False

Regards
Logged
motox
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 142
-Receive: 129



« Reply #16 on: June 12, 2012, 12:39:19 00:39 »

In the last year I made an acquisition board with the PIC18F4550. The PC software was made in LabVIEW using the WinUSB driver. Since I only use MS OS, this driver is more than good for my applications.

I made the USB driver using the NI-VISA Driver Development Wizard version 4.1. It is very simple to use.
The HID class has a serious disadvantage, you cannot use bulk pipes. With WinUSB you can use bulk pipes for large amount of data transfer.

The USB auto-detect is very easy to implement. There is no need for user interaction for the board to be detected and the program starts to work immediately (e.g. send commands, receive sampling data, etc).

In attachment you can see a picture of the user interface.
Logged
koky
Active Member
***
 Warned
Offline Offline

Posts: 157

Thank You
-Given: 83
-Receive: 115


WWW
« Reply #17 on: June 12, 2012, 02:41:22 14:41 »

dear motox can you post your code of Pic e labview  ?

thank you

koky
Logged
motox
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 142
-Receive: 129



« Reply #18 on: June 12, 2012, 08:58:43 20:58 »

dear motox can you post your code of Pic e labview  ?

thank you

koky
Dear koky, I made this program for my employer. So I cannot give the complete project. But I can guide you and give the essential parts needed to start your own project.
Logged
koky
Active Member
***
 Warned
Offline Offline

Posts: 157

Thank You
-Given: 83
-Receive: 115


WWW
« Reply #19 on: June 13, 2012, 08:05:23 08:05 »

Dear koky, I made this program for my employer. So I cannot give the complete project. But I can guide you and give the essential parts needed to start your own project.
is good if you can share a semplified example llike "hello word or one led " were is possible understand mechanism PIC - HID - labview that use usb port
Logged
motox
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 142
-Receive: 129



« Reply #20 on: June 13, 2012, 11:15:54 23:15 »

is good if you can share a semplified example llike "hello word or one led " were is possible understand mechanism PIC - HID - labview that use usb port
Realize that I will have to spend at least one hour or more doing it. So if this is not really important to you, please say it. But if is important, then I will be glad to help you.

I will try to set/clear one LED and get one button status using the Microchips PICDEM Full Speed USB hardware platform (PIC18F4550) and LabVIEW version 9.0.1. Is this ok for you?
Logged
koky
Active Member
***
 Warned
Offline Offline

Posts: 157

Thank You
-Given: 83
-Receive: 115


WWW
« Reply #21 on: June 14, 2012, 07:03:42 07:03 »

Realize that I will have to spend at least one hour or more doing it. So if this is not really important to you, please say it. But if is important, then I will be glad to help you.

I will try to set/clear one LED and get one button status using the Microchips PICDEM Full Speed USB hardware platform (PIC18F4550) and LabVIEW version 9.0.1. Is this ok for you?
Realize that I will have to spend at least one hour or more doing it. So if this is not really important to you, please say it. But if is important, then I will be glad to help you.

I will try to set/clear one LED and get one button status using the Microchips PICDEM Full Speed USB hardware platform (PIC18F4550) and LabVIEW version 9.0.1. Is this ok for you?

yes can be very useful for undertand all process, but when you have time for this
many thanks koky
Logged
motox
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 142
-Receive: 129



« Reply #22 on: June 16, 2012, 07:30:07 19:30 »

LABVIEW USB Interfacing with PIC18F4550 using WinUSB

I made this program because user koky has requested it but anyone can use it for educational purposes.

The LabVIEW program communicates with the PIC18F4550 through USB using WinUSB driver. The firmware is compatible with Microchip's PICDEM Full Speed USB Demonstration Board.
Logged
famos
Inactive

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 1


« Reply #23 on: May 24, 2014, 11:00:38 23:00 »




Hello,

has anyone used WinUSB or libusb with Labview? I'm looking for examples!

Thanks
« Last Edit: May 25, 2014, 02:09:26 02:09 by bbarney » Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #24 on: May 25, 2014, 12:07:02 00:07 »

Hello,

has anyone used WinUSB or libusb with Labview? I'm looking for examples!

Thanks
did you even read the topic?
you ask "has anyone used WinUSB..." FFS...
never mind the whole topic, read the post before yours #22
Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
Pages: [1] 2  All
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