12-09-2010 07:40 AM
Hello,
I am developing usb interface using pic18f4550 with micro c that just on and off LEDS and it works well with visual basic,but when I try labview VISA RAW as the control program the circuit does not respond
I tried all the examples in ni website USBRawBulkMain , USBRawControl ,interruptusb. I worte my own and the result was the same no rsponse. I performed the wizard steps to create inf file and I can see that the device is working properly from hardware manager and from and measurement and automation window.
does anybody have a simple labview VISA RAW program and firmware for pic18f4550 that just on and off LED that works and make me walk on the right way.
I used the firmware with the file mpusbapi.dll with labview and I got response from the circuit
but it seems that usb visa raw is more reliable,
I attached the descriptor file and the labview file
Best Regards,
12-10-2010 01:13 PM
12-12-2010 08:04 PM
Hi, I don't know which version of LabVIEW you are using. But since version 8.6 LabVIEW provide USB RAW example, you can search the keyword USB RAW in example finder.
USB RAW communication is more complicate through VISA. It would be more fluently if you know the USB 2.0 spec a bit.
12-13-2010 06:00 AM
Hello,
I followed the procedure in this page
http://zone.ni.com/devzone/cda/tut/p/id/4478
I created the inf file and put it in inf folder and I can see the device in the Automation and Measurement window
when I connect the device the circuit i use is the Easypic Developing Board and accoring to the labview software I attached in the previous post when I enter a number and press send the LEDS connected to the b port of PIC18F4550 should give response if I enter 4 the LEDS should be (00000100) , instead no LEDS GO ON nothing happen I attached the firmware main files USB1.C and USB1.HEX as I attached the descriptor file in the previous post.
accoring to USB1.C
if(Read_buffer[0] == 2 && Read_buffer[1] == 2 &&
Read_buffer[3] == 2)
{
//PORTD IS ADRESS
TRISD = 0;
PORTD =9;
//PORTB IS OUTPUT//
TRISB = 0;
PORTB = Read_buffer[2];
I programmed the controlout function to input four numeric control in one array
numeric0 =2
numreic1 =2
numeric3 =2
numeric2 = the number(data) i want to send to LEDS
I used this way using the dll file mpusbapi.dll and it works but it didnt work with visa raw controlout function
12-13-2010 06:04 AM
Hello,
I have labview 8.2 and we are looking foreward to upgrade to the profissional current edition
12-16-2010 07:05 PM
Hello Mr Adam,
I'm still stuck with using visa raw for labview. all I need is simple labview software connect can communicate with usb using visa raw and simple firmware for PIC18F4550 using any compiler C18 , MICROC
the circuit just on and off an LED . do you have such application that will help me continue my work.
thank you
12-17-2010 04:24 PM
Hi CYBORG7044,
We don't have an out of the box solution for what you are trying to do. Nor do we program specifically for certain PIC processor models. If you have questions about using the VISA to write to USB RAW then we might be able to help. As for making a full program to communicate with the PIC, we do not have anything that matches that criteria.
Basically, we have knowledge on VISA communication, but not as much in PIC processor, perhaps checking in with the company who produces the chip might help.
Thanks!
01-18-2012 05:43 AM
Hello,
I have a similar problem with the PIC18F4550.
I have created a “inf” file with the VISA driver wizard and I can use VISA to write to the PIC based board without any problem, the “write” commands are very well interpreted. The coming when I am trying to read from the board. Not only nothing is transmitted to the computer but also the board seems to be blocked and does not receiving the following commands. I have then to reset manually the board in order to be able to send others commands. When I am using the NI example “USB RAW Control.vi”, the “Control In” gives an error: ”VISA: (Hex 0xBFFF003D) Invalid buffer mask specified.” With the “USB RAW-Bulk.vi” after a “Bulk In” reading attempt I am getting an error: ” VISA: (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state)”.
Please, help
01-19-2012 01:00 PM
Hi,
It might help get a better idea of where your error is occurring if you attach a VI with your commands. Have you taken a look at this Knowledge Base or this Forum? They seem to suggest that this might be a buffer problem you are experiencing.
01-20-2012 02:31 AM