USB Communication
Moderator: paolo.gai
USB Communication
Hi all,
I try do establish a usb communication between the Flex Board Full and a PC running Scilab/Scicos.
I want the dsPIC to send a sine signal via usb to the PC - the PC should display the data, recieved from the ucb port, in a scope.
Therefor I flashed the FLEX_USB.cof into the PIC18 of the Flex Board. Then I updated the driver as mentioned in the following wiki:
http://www.evidence.eu.com/component/op ... temid,366/
this seems to be done correctly, because I can see the LibUSB-Win32-Device in the Device Manager.
As the next step I created the *.cos [img width=436]http://www.erika.tuxfamily.org/images/f ... _dspic.JPG[/img] with the sine signal and an additional LED so see if the dsPIC is working.
After the codegeneration by Scilab/Scicos I flashed the pic30.cof into the dsPIC33FJ256MC710 of the Full Flex Board.
(The additional LED is blinking)
Then I made another *cos which should recieve the data from the dspic via usb [img width=436]http://www.erika.tuxfamily.org/images/f ... _dspic.JPG[/img]
When I start the simulation in scicos, the LED on the board is blinking, but I can not see anythin in the scope and scilab crashes.
I hope you can understand my problem and help me
Thanks,
Nikolas
I try do establish a usb communication between the Flex Board Full and a PC running Scilab/Scicos.
I want the dsPIC to send a sine signal via usb to the PC - the PC should display the data, recieved from the ucb port, in a scope.
Therefor I flashed the FLEX_USB.cof into the PIC18 of the Flex Board. Then I updated the driver as mentioned in the following wiki:
http://www.evidence.eu.com/component/op ... temid,366/
this seems to be done correctly, because I can see the LibUSB-Win32-Device in the Device Manager.
As the next step I created the *.cos [img width=436]http://www.erika.tuxfamily.org/images/f ... _dspic.JPG[/img] with the sine signal and an additional LED so see if the dsPIC is working.
After the codegeneration by Scilab/Scicos I flashed the pic30.cof into the dsPIC33FJ256MC710 of the Full Flex Board.
(The additional LED is blinking)
Then I made another *cos which should recieve the data from the dspic via usb [img width=436]http://www.erika.tuxfamily.org/images/f ... _dspic.JPG[/img]
When I start the simulation in scicos, the LED on the board is blinking, but I can not see anythin in the scope and scilab crashes.
I hope you can understand my problem and help me
Thanks,
Nikolas
- Attachments
-
- usb_dspic.JPG (24 KiB) Viewed 24316 times
Re:USB Communication
the second picture should be
[img width=341]http://www.erika.tuxfamily.org/images/f ... usb_pc.JPG[/img]
[img width=341]http://www.erika.tuxfamily.org/images/f ... usb_pc.JPG[/img]
- Attachments
-
- usb_pc.JPG (24 KiB) Viewed 24316 times
Re:USB Communication
Hi Nikolas!
I see that you solved the problem in another post.
Just as a note, we are going to change the USB support part PC-side with the next version, which should (hopefully) be released in the monbth of March. This should avoid the problems with the USB crashes on Scilab.
Ciao,
PJ
I see that you solved the problem in another post.
Just as a note, we are going to change the USB support part PC-side with the next version, which should (hopefully) be released in the monbth of March. This should avoid the problems with the USB crashes on Scilab.
Ciao,
PJ
Re:USB Communication
Dear Nikolas...
we just released the scicos pack v8, which includes a new revised version of the USB communication on the PC side, which avoids the blockings previously experienced with Scicos... If you have tme please try it!
Ciao,
Paolo
we just released the scicos pack v8, which includes a new revised version of the USB communication on the PC side, which avoids the blockings previously experienced with Scicos... If you have tme please try it!
Ciao,
Paolo
Re:USB Communication
Hey Paolo,
thanks for the new release.
If I try to run the codegeneration I recieve the following error message:
Because of the update to EE1.5 I can\'t find the file where to change it. In the older version, the file was located (as mentioned in the manual) in "c:/evidence/evidence
/bin/rtd_config.properties".
Is there any compareable file where I need to change the path to my MPLAB?
CIAO,
Niko
thanks for the new release.
If I try to run the codegeneration I recieve the following error message:
I guess, I have to change the path do my MPLAB folder.Step 3: Compiling the application
The application is now compiled
--------------------------------------------------------
cygpath: cannot create short name of c:\\Programmi\\Microchip\\MPLAB ASM30 Suite
Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
cygpath [-c HANDLE]
cygpath [-ADHPSW]
Convert Unix and Windows format paths, or output system path information
Because of the update to EE1.5 I can\'t find the file where to change it. In the older version, the file was located (as mentioned in the manual) in "c:/evidence/evidence
/bin/rtd_config.properties".
Is there any compareable file where I need to change the path to my MPLAB?
CIAO,
Niko
Re:USB Communication
Hi there,
the file to be changed has moved into the Evidence directory inside Eclipse;
in my case (and I think the default installation\'s case):
C:\\\\Evidence\\\\Evidence\\\\eclipse\\\\Evidence\\\\common_oil.pref
The syntax should be the same (as the old file).
Hope this helps.
blackant
the file to be changed has moved into the Evidence directory inside Eclipse;
in my case (and I think the default installation\'s case):
C:\\\\Evidence\\\\Evidence\\\\eclipse\\\\Evidence\\\\common_oil.pref
The syntax should be the same (as the old file).
Hope this helps.
blackant
Re:USB Communication
Hey,
thanks for your answer. Sadly I don\'t have the file \"common_oil.pref\".
Do I have to change any configurations in Eclipse/EE?
Regards,
Niko
thanks for your answer. Sadly I don\'t have the file \"common_oil.pref\".
Do I have to change any configurations in Eclipse/EE?
Regards,
Niko
Re:USB Communication
You are right, we forgot to package the file inside the distribution.
Let me check for this and we\'ll post it as soon as possible...
PJ
Let me check for this and we\'ll post it as soon as possible...
PJ
Re:USB Communication
Ok. Solved. The missing file is now uploaded.
Please follow the updated instructions on the page
http://www.evidence.eu.com/content/view/293/382/
...I just tried them on my Vista machine and they works fine...
Let me know if something still does not work...
PJ
Please follow the updated instructions on the page
http://www.evidence.eu.com/content/view/293/382/
...I just tried them on my Vista machine and they works fine...
Let me know if something still does not work...
PJ
Re:USB Communication
Hey,
thanks for your answers. The Codegeneration works fine.
I just compiled the demoboard_example_flexside.cos
and flashed the generated pic30.cof onto the dspic.
Then I started the demoboard_example_pcside.cos and scilab crashed.
I think, because I did not execute the app_flex_scicos.exe.
I can not compile the executeable. I\'am not familiar with makefiles :(
The folowing error message appears:
What can I do?
Regards,
Niko
thanks for your answers. The Codegeneration works fine.
I just compiled the demoboard_example_flexside.cos
and flashed the generated pic30.cof onto the dspic.
Then I started the demoboard_example_pcside.cos and scilab crashed.
I think, because I did not execute the app_flex_scicos.exe.
I can not compile the executeable. I\'am not familiar with makefiles :(
The folowing error message appears:
C:/TEMP/contrib/flex_usb2udp_gateway>nmake all
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
makefile(13) : fatal error U1036: syntax error : too many names to left of \'=\'
Stop.
What can I do?
Regards,
Niko
Re:USB Communication
Dear Niko,
there should be a readme.txt file on the folder explaining what to do...
basically you need to:
- install the libusb from the Cygwin setup program (http://www.cygwin.com)
- open a cygwin console, go into the directory, and type \"make\" (the Cygwin\'s make, not Microsoft \"nmake\")
- then, run the program from the cygwin console (it should work also from the CMD prompt)
bye
PJ
there should be a readme.txt file on the folder explaining what to do...
basically you need to:
- install the libusb from the Cygwin setup program (http://www.cygwin.com)
- open a cygwin console, go into the directory, and type \"make\" (the Cygwin\'s make, not Microsoft \"nmake\")
- then, run the program from the cygwin console (it should work also from the CMD prompt)
bye
PJ
Re:USB Communication
Ok thanks, I\'ll try it...
I did as you told me...
Everything seems to be working.
I will work the next days with it. If I get in trouble or see any mistakes I will let you know...
Thank you,
Niko
I did as you told me...
Everything seems to be working.
I will work the next days with it. If I get in trouble or see any mistakes I will let you know...
Thank you,
Niko
Re:USB Communication
I can not establish a working usb connection I did the following:
- Flash the firmware from the package scicos_pack_v8 into the pic18, if I connect the port via usb to the pc, I find the board as LibUSB-Win32 Device in the device manager. This seems to be ok.
- Compile the demoboard_example_flexside.cos out of the scicos_pack_v8 an flash it into the dspic.
- run the app_flex_scicos in a cmd. I get this output:
*************************************************
Enstablish Flex-Scicos Communication
\'.\' Received from flex and sent to scicos
\'*\' Received from scicos and sent to flex
*************************************************
- flex_usbscicos_init() : OK.
Start Application ...
.*.*.*.*.*.*.*.*.*.*.*.*
seems to be working, too.
- Open demoboard_example_pcside.cos and click on simluate -> run.
- On the scope in scicos, i just see constants. In the display of the daughterboard there is 0.000 depicted.
If it was working correctly, I think the LED on my Demoboard should flash, because of the sine, transmitted from Scicos. But the Led is not flashing.
It seems to me, that there is anything incorrect. At the moment I have no idea what it might be...
I modified the schema for the dspic:
A sine is generated by the dspic (connected to the led) and send by usb to the pc.
The led is flashing, but in the scope in scicos, I still have smooth lines (constant 0).
I tried to switch off my firewall, because I thought the port 50000 might be blocked...
Does anybody can help me?
Regards,
Niko
- Flash the firmware from the package scicos_pack_v8 into the pic18, if I connect the port via usb to the pc, I find the board as LibUSB-Win32 Device in the device manager. This seems to be ok.
- Compile the demoboard_example_flexside.cos out of the scicos_pack_v8 an flash it into the dspic.
- run the app_flex_scicos in a cmd. I get this output:
*************************************************
Enstablish Flex-Scicos Communication
\'.\' Received from flex and sent to scicos
\'*\' Received from scicos and sent to flex
*************************************************
- flex_usbscicos_init() : OK.
Start Application ...
.*.*.*.*.*.*.*.*.*.*.*.*
seems to be working, too.
- Open demoboard_example_pcside.cos and click on simluate -> run.
- On the scope in scicos, i just see constants. In the display of the daughterboard there is 0.000 depicted.
If it was working correctly, I think the LED on my Demoboard should flash, because of the sine, transmitted from Scicos. But the Led is not flashing.
It seems to me, that there is anything incorrect. At the moment I have no idea what it might be...
I modified the schema for the dspic:
A sine is generated by the dspic (connected to the led) and send by usb to the pc.
The led is flashing, but in the scope in scicos, I still have smooth lines (constant 0).
I tried to switch off my firewall, because I thought the port 50000 might be blocked...
Does anybody can help me?
Regards,
Niko
Re:USB Communication
Dear Niko,
Dario and Francesco worked today to understand what was the problem was... and the result is...
...as it always happens, we put the wrong COFF in the Scicos Pack V8
Sorry for that...
I just updated the Scicos Pack (naming it Scicos Pack 8.1) to contain the correct COFF file we typically use for
Please use THAT coff file
Ciao,
Paolo
Dario and Francesco worked today to understand what was the problem was... and the result is...
...as it always happens, we put the wrong COFF in the Scicos Pack V8

Sorry for that...
I just updated the Scicos Pack (naming it Scicos Pack 8.1) to contain the correct COFF file we typically use for
Please use THAT coff file

Ciao,
Paolo
Re:USB Communication
Dear all,
thanks. With the new *.cof it is working properly.
Regards,
Niko
thanks. With the new *.cof it is working properly.
Regards,
Niko