electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Interfacing PIC18F2550 to Labview 7.1 or later


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Interfacing PIC18F2550 to Labview 7.1 or later
Author Message
lovediwan



Joined: 21 Dec 2007
Posts: 6


Post22 Dec 2007 6:55   

pic labview


Hi
I'm new to microcontroller but i'm expert in Labview
So is there anyone help me in finding out how to interface PIC18F2550 to Labview Using USB.

Thanks
Bye[/b]
Back to top
Fernando Vasquez



Joined: 11 Dec 2007
Posts: 31
Helped: 3
Location: Peru


Post23 Dec 2007 1:06   

labview pic


Here you have an introduction of USB in labview using VISA.

http://zone.ni.com/devzone/cda/tut/p/id/4478
Back to top
lovediwan



Joined: 21 Dec 2007
Posts: 6


Post23 Dec 2007 5:35   

18f4550 labview


hi Fernando Vasquez
well i have made the Usb driver already but what i want is how to program the controller & communicate with it so that it respond to the query sent to it
Actually i'm working on PC based Oscilloscope for which i have to write a driver
but how it go with microcontroller is a tricky part for me.
Thanks for reply
Love Diwan
Back to top
yousafzai



Joined: 01 Jun 2006
Posts: 259
Helped: 6


Post24 Dec 2007 3:14   

pic usb labview


you can use HIDmakerFS. It will generate the c code for the controller and the visual basic code for the PC. Convert the visual basic code into dlls and integrate these dlls in labview.
Back to top
Fernando Vasquez



Joined: 11 Dec 2007
Posts: 31
Helped: 3
Location: Peru


Post26 Dec 2007 1:27   

labview 18f4550


Here is a complete scope project with PIC18F4550, but it is in spanish

http://pablohoffman.com/cgi-bin/twiki/bin/view/Oscusb/WebHome
http://pablohoffman.com/cgi-bin/twiki/bin/view/Oscusb/OscusbFirmware
Back to top
Osolong



Joined: 11 Jun 2007
Posts: 9
Helped: 1
Location: San Luis Potosi, Mexico


Post27 Dec 2007 18:48   

labview microchip


Hi.
Sometime ago, I did a project using LabView 7.1 and a PIC 18F2550. The project was very big, but this is the simplest USB communication I did when I was testing and screwing things.
The schematic is the simplest circuit necessary. The 100nF capacitor must be placed as near as possible to the USB connector. The crystal I used was a 12MHz, but you can use any 4MHz multiple and change the PLL divider.

I used CCS Compiler PCWH 4.032 but you can use any version from 3.222.

The pic is simply sending a Sine Wave as fast as it can, using 256 byte block size (each block is really 64bytes but the program takes care of dividing it automatically). After every block there is a gap where there is no data. (Handshaking?)

The LabView Program uses some dll function calls. they call mpusbapi.dll, that Microchip provides. When you plug in the pic on the USB bus, it requests a driver, that you can find in the MCHPUSB Driver folder, also provided by Microchip.

I tested it on 18F2550, 2455 and 4550 (Just change the library).
The comments are in spanish, sorry I don't have time to translate them but it's very simple and if you have any doubts, feel free to contact me.

Hope this helps.

Added after 6 months

Apparently the zip file with the labview app is corrupted.
Here's again in RAR format.



Sorry, but you need login in to view this attachment



Last edited by Osolong on 18 Jun 2008 16:17; edited 4 times in total
Back to top
lucafus



Joined: 28 Apr 2006
Posts: 11


Post02 Apr 2008 15:57   

microchip usb labview


Hi Osolong!

I tried to download USB18F_LabView.zip file, but it has an error in SineWave Microchip 18F USB Communication.vi file: can you send me it by e-mail (not zipped please: maybe you are using an earlier version of Winzip then mine).
Thanks!

Luca.
Back to top
waruna



Joined: 14 Apr 2008
Posts: 1


Post14 Apr 2008 16:30   

usb communication labview


Hi,
I am also trying to the same thing and found this topic. I also DL the file but could not get SineWave Microchip 18F USB Communication.vi. Can you send this file to me too.
Thank you,
Waruna:D
Back to top
nguyenngochuan



Joined: 29 May 2008
Posts: 7
Helped: 1


Post17 Jun 2008 3:57   

microchip labview


Hi Osolong.

i'm very interested about your project but i can't extract file "sineWave Microchip 18F USB Communication.vi" from "usb18f_labview_3557" zip file. there are some error. could you upload file "sineWave Microchip 18F USB Communication.vi" again or send it to me.

thanks Osolong.
Back to top
kepi19



Joined: 01 Mar 2007
Posts: 51
Helped: 6
Location: Cordoba, Argentina


Post19 Oct 2008 23:06   

labview pic usb


Thanks Osolong.

Is very useful for me.

Best regards.
Back to top
lucafus



Joined: 28 Apr 2006
Posts: 11


Post20 Oct 2008 7:49   

pic18f2550


Hi Kepi19!

Have you got the file "SineWave Microchip 18F USB Communication.vi"? Can you post it?

Thanks.

Regards.
Luca.
Back to top
Kabanga



Joined: 04 Oct 2007
Posts: 70
Helped: 5


Post20 Oct 2008 11:55   

labview usb communication


lucafus wrote:
Hi Kepi19!

Have you got the file "SineWave Microchip 18F USB Communication.vi"? Can you post it?

Thanks.

Regards.
Luca.


Hi Luca
here is the file

Regards
Kabanga



Sorry, but you need login in to view this attachment

Back to top
Sinoj B S



Joined: 01 Feb 2008
Posts: 2


Post07 Nov 2008 9:34   

labview pic18f4550


Hi Osolong,

The thread was really helpful for me to switch from LabVIEW-COMPort to LabVIEW-USB which I was searching for a long time.

How can I port the source code in CSS to C18? Or has there any code in C18?
I could not build the code in CCS due to missing/invalid 'pch.crg' file.

----------------------------
Best Regards!
Sinoj B S
IN
Back to top
Ligator



Joined: 07 Feb 2009
Posts: 1


Post07 Feb 2009 9:16   

mpusbapi.dll labview


Osolong:

This is a great example, but....
Do you think this vi works in Labview 8.5 on Vista?

I´m sorry, i speak spanish, no english.
Back to top
jvanknal



Joined: 16 Feb 2009
Posts: 1


Post17 Feb 2009 15:07   

picusb labview driver


Hello

I'm trying to use this program as a base for my own school project. But I'm working with the C18 compiler from microchip. I need the pic18_usb.h and usb.c file provided with the CSS compiler. They are also not included in the demo version of the program. Is there anyone who can help me.

best regards

Brecht

edit; I've found the missing library's, and the project is working now. Today, I'm gonna play with it, to fully understand the working of it, and tomorrow back to normal!
thx
Back to top
Osolong



Joined: 11 Jun 2007
Posts: 9
Helped: 1
Location: San Luis Potosi, Mexico


Post20 Feb 2009 17:47   

labview usb pic


Quote:
Sinoj B S wrote:
How can I port the source code in CSS to C18? Or has there any code in C18?
I could not build the code in CCS due to missing/invalid 'pch.crg' file.


I have no idea. I don't know how to use C18.
In CCS you need the PCWH or higher version in order to compile it.


Quote:
Ligator wrote:
Do you think this vi works in Labview 8.5 on Vista?
I´m sorry, i speak spanish, no english.


Si debe funcionar en LabView 8.5 (y en cualquier version que sea mas nueva que 7.1)
Pero no funciona en Vista porque el driver que provee Microchip no funciona mas que en WinXP y Win2000.
Al parecer hay un driver que se llama WinUSB que viene con Vista y es mas facil de usar. No lo he hecho pues no tengo Vista, ni planes de instalarlo en el futuro inmediato.
Puedes buscar informacion acerca de ese driver y utilizarlo de manera similar a como lo hago en mi programa.
Suerte!!!

It should work on LabView 8.5 (and any version newer than 7.1).
But it doesn't work in Vista because the driver Microchip provides only works on WinXP and Win2000.
Apparently, in Vista there is a driver called WinUSB that's easier to use. You can google it and based on my program you can create your own or modify mine if you think that is possible.
Good luck!!
Back to top
kuanyong



Joined: 02 Mar 2009
Posts: 1


Post02 Mar 2009 5:06   

pic18f2550 project


Osolong

Thanks a lot.
Your example helps me a lot.
Back to top
wrsalasr



Joined: 13 Sep 2007
Posts: 15


Post12 Mar 2009 18:43   

labview 7.1 projects


Quote:
When you plug in the pic on the USB bus, it requests a driver, that you can find in the MCHPUSB Driver folder, also provided by Microchip.


Hola Osolong, gracias por compartir tu aplicacion pero cuando conecto el pic al puerto USB, a pesar de que busco el driver en folder MCHPUSB no logro ubicarlo, por favor tendrias la amabilidad de pulicarlo.
Back to top
Google
AdSense
Google Adsense




Post12 Mar 2009 18:43   

Ads




Back to top
Osolong



Joined: 11 Jun 2007
Posts: 9
Helped: 1
Location: San Luis Potosi, Mexico


Post21 Aug 2009 1:53   

labview with microchip


Quote:
Hola Osolong, gracias por compartir tu aplicacion pero cuando conecto el pic al puerto USB, a pesar de que busco el driver en folder MCHPUSB no logro ubicarlo, por favor tendrias la amabilidad de pulicarlo.


Hi.
The driver is in the above file:
MCHPUSB Driver.zip

In the folder \Release

When you plug in the PIC to the USB bus search for the inf file: mchpusb.inf

Hope this helps
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Interfacing PIC18F2550 to Labview 7.1 or later
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Interfacing PIC18F2550 to Labview 7.1 or later (1)
C code for interfacing DS1302 with PIC18F2550 (2)
LabVIEW interfacing (3)
LabVIEW 8.0 and PCI card interfacing (1)
problem when interfacing using Labview (5)
Interfacing a pic16f874A to Labview - where did my data go? (1)
higher impedance on later circuit stages (2)
A Bug of Cadence IC5.033+USR2 and later. (2)
ICSP w/ PIC18F2550 (4)
Pic18f2550 and USB (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS