FLEX usb data communication using Scilab and Scicos

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
(Recovery from data loss [all of the changes done between 2009Oct2 and 2009Nov2 are recovered this way and will have incorrect history])
 
Line 3: Line 3:
Please start by downloading this file:
Please start by downloading this file:
-
* http://www.evidence.eu.com/download/USB_driver.zip
+
* http://www.evidence.eu.com/download/flex/USB_driver.zip

Latest revision as of 08:43, 28 September 2012

This section focuses on the USB data communication between the FLEX Board and a host PC.

Please start by downloading this file:



Contents

PIC18 USB firmware

The FLEX Full USB connection is provided by the PIC18F2550 that communicates with the dsPIC through a SPI protocol. Download the FLEX_USB_PIC18.cof (furnished with USB_driver software) inside the microcontroller using MPLAB IDE. Usually, there is no need to change the configuration bits. In some cases the a configuration bit must be changed manually. After importing the cof file, check under MPLAB IDE in Configure → Configuration bits that address 0x300000 has value 0x24. If the proposed value is 0x04 unselect the checkbox and insert the correct value. After flashing the device, reset the board and connect the USB cable.

Interfacing with the PC

This is a one time operation that has to be done before using the FLEX Full Board.

  1. After programming the Flex board, connect it to the PC
  2. The PC automatically recognize the device as a HID device. Open the PC control panel → system → device manager: open the Human Interface Device (as shown in the Figure below).
    Usb 1a.jpg
  3. Double click on one of the devices, in order to identify the device with VID = 0x04d8 and PID = 0x0033 on the property window. This is the FLEX board. See the Figure below
    Usb 1b.jpg
  4. Click on the driver tab as in the Figure below:
    Usb 1c.jpg
  5. Click on Update driver → search the driver in the computer → manually search the driver.
    Usb 1d.jpg
  6. Specify the path of the folder libusb furnished with USB_driver software (USB_driver\libusb).
    Usb 1e.jpg
  7. The PC will load this as a new driver for the FLEX Full Board.
    Usb 2.jpg

Prerequisites for the USB PC application

  • First of all you have to download and install Scilab 4.1.2. The Scilab executable can be found at the following addresses:

[1] [2]

  • Then you have to download and install Visual studio 2008 C++ express edition from the Microsoft website. To compile external code, Scilab must detect and support Visual studio 2008 C++ express edition with dynamic link. This is required if you want to re-compile the scicos pack dll.

The tool is downloadable at: [3]

  • Then can be useful to download and install the Microchip MPLAB IDE to program the

Flex Full microcontroller (dsPIC33FJ256MC710). For the download go to the site: [4]

  • The next step is to download and install ERIKA Enterprise for Microchip dsPIC and the scicos pack 8.1. The software can be found at:

[5]

Using Scicos pack 8.1 USB PC application

The demo description is at FLEX usb data communication using Scilab and Scicos

Personal tools