If you don't know it already, element14 (www.element14.com) is a community/networking site for electronics professionals and hobbyists, run by the electronic components supplier Farnell...
Last year I was lucky enough to attend a really useful free Eagle (PCB Design Tool) course run by element14, and earlier this year my local hackspace, BuildBrighton, reached the final of the Great Global Hackspace Challenge which was sponsored (very generously) by element14.
While other suppliers might give out samples and freebies to industry, its refreshing that Farnell/element14 really do seem to be actively targetting and supporting the electronics hobbyist/hacker community - and so I am more than happy to sing their praises here.
Anyway, back to my road testing... I chose to review the VNCLO-START1 kit from FTDI. This kit is made up of a USB development board and a separate programmer/debugger board and the current cost on Farnell's web site is a little under £28.
The development board is branded the Vinco/Vinclo/Vinculo/Vnclo (it seems that FTDI aren't sure about the name yet, but I will call it “Vinculo”) containing the 64-pin version of FTDI's VNC2 'Vinculum' USB Host/Slave chip.
Very interestingly, FTDI have given the board the same form factor as an Arduino Uno, including pin-compatible Arduino shield header sockets and even an on-board ADC chip to provide the six analog inputs. This means that you should be able to make use of existing Arduino shields (add on boards) with the Vinculo, which is a clever move by FTDI.
The Vinculo can emulate an Arduino because it's on-board VNC2 chip is so much more than just a USB controller... its a fully fledged MCU. In fact it's a very powerful one, with a 16-bit core, 256kB of Flash, 16kB of RAM and 48Mhz clock among some other nice features... This makes it substantially more powerful that the AVR chip on the Arduino....And that’s before we get on to its USB support: Two full speed USB ports, each individually configurable as host or slave!
So, we're talking an impressive piece of silicon (and a reasonably priced one, with the 64-pin VNC2 chips selling on Farnell's site for just over £3, which is cheaper than the Atmega328).
I am planning to use VNC2 chips in two projects I have in the pipeline:
- The first to USB-host a Novation Launchpad keypad controller and run a suite of animation/MIDI-input apps. The idea is to make a standalone version of my 'playpad' MIDI controller projects.
- The second is as the 'brain' of my laser projector, where I need a high speed USB device to push coordinate data from a PC to a pair of DACs driving laser-projector galvos. Using a VNC2 means I can use a single chip (no need for separate USB chip and MCU) while avoiding the slowness of a polled USB stack implemented in software.
The Vinculo board seems like the perfect way to prototype these projects... so how to get started?
FTDI have a free, downloadable developer toolchain for the VNC2. This works with the VNC2 programmer/debugger to allow programming and interactive debugging of the Vinculo. And I really do mean interactive debugging... single stepping, breakpoints, watches and so on... controlled via USB to the debug board.. put that in your Arduino pipe and smoke it :)
So that's all good news, but once I got started I found a few problems with the developer tools which made me think FTDI may not be quite there yet...
First of all I was unable to use the IDE on my desktop computer (where I do all my coding) because of a strange display problem with the source code editor window - all the text becomes garbled and unreadable each time the window scrolls. I reported this to FTDI support who quickly got back with a 'That’s strange, we'll look into it' kind of response but no fix as yet. However, luckily my laptop doesn't get the same issue so I could move on.
The second issue I found was stability of the IDE, particularly during debug sessions but even some times when compiling, the IDE would stop responding and needs to be killed in task manager and restarted.
Moving on, I played a bit with some of the provided sample code. The Vinculo is not FTDI's first VNC2 evaluation board, and some of the sample code is for the older eval board, which has different pin to connector mappings, meaning that the older sample programs don't work on the Vinculo without modifications. For example the UART (used by the sample programs for debug output) has moved.
Luckily the remapping can be done in software.... a very nice feature of the VNC2 is that all the IO's go through a programmable multiplexer, so IO functions can be assigned to pins of your choosing. However the need to reassign IO's just to get the sample programs to work isn't what you want when you're first starting with a new device.
Another niggle is that while there are sample programs provided to demonstrate standard Arduino stuff (blinking LED, PWM examples and so on) what is glaringly lacking are any USB code examples that will work, without modification, on the Vinculo. Since USB is the attraction of Vinculo over vanilla Arduino I think this is something FTDI need to work on to make the board attractive to Arduino fans... I am still trying to work out how to modify the USB examples to get them running on Vinculo, and its not been straightforward.
On a more positive note, something FTDI have done is to create a simple application framework that should appeal to Arduino coders by presenting an Arduino-like syntax.... For example, when using the supplied main.c in your Vinculo project you define the Arduino standard entry points 'setup' and 'loop'.
Arduino-likey function wrappers like digitalOut() are provided, and libraries like Serial are emulated with structures containing function pointers, so familiar Arduino syntax like Serial.begin(9600); can be used.... Its just syntactic sugar, since behind the scenes the VNC2 API functions are being called, and its not 100% compatible (don't expect your Arduino code to 'just work' on Vinculo). However, it's a nice idea and will certainly appeal to Arduino developers. And you are still free to simply ignore it and work directly with the VNC2 API if you prefer.
FTDI also have a variety of documentation for online download, which I am still working my way through. I have to say the information seem to be a bit 'scattered' over many different application notes, but at least it mostly seems to be there. Its just a bit daunting and confusing when you first get started.
In conclusion, I have to say I'm very excited by this hardware. The VNC2 is a powerful and flexible chip, and the Vinculo is a great prototyping board, encompassing some innovative ideas by FTDI.
However, at the moment I think much could be improved in the accompanying development software package. For me it has been a uphill struggle, and I think that Arduino users who are not experienced coders may fall at the first hurdle with this.. that is until FTDI can iron out the IDE issues and provide a more consistent and usable set of Vinculo code samples.
This is a new product though, so I have hopes that these things will improve soon with software patches.
A couple of other things that would be nice are
- That Arduino staple - The always-useful pin 13 LED
- The ability to direct debug text output over the same USB cable that runs the debugger, where is can perhaps show up as a virtual COM port on the host PC (like on the mbed).
Thanks for the write up. My experiences with FTDI have been much the same. They're very sloppy with the details, and frankly, they don't seem to care that much.
ReplyDeleteIt seems many silicon companies put just enough time into their software toolchains to be able to carefully demo them at trade shows, conferences, and sales calls. Those running the demos follow a specific script that won't make the IDE crash, etc. Once they get that far, they largely stop however many other bugs remain unless some large potential customer screams loudly and threatens to buy someone else's product. It's sad.
Companies like FTDI don't seem to care that, for lower volume products, it's just not worth it for any of us to spend an extra 20 - 200 hours fighting development tools, working around bugs, waiting for responses from their support people, etc.
It's cheaper, quicker, and vastly easier, to just use parts, boards, and toolchains that work as promised. In this case, I think most just spend another few dollars and glue an FTDI or Silabs USB-to-whatever chip onto an MCU with a proper stable toolchain rather than fight the Vinculum's uncharted, buggy and poorly documented waters.
I am 100% agree with you. They technical support sucks big time. I sent multiple emails regarding the update of the program loader and no replay. Than is just ridiculous. I work for one of the largest chipset makers and FTDI really sucks. HW without the appropriate SW support is just useless.
DeleteUnfortunately, I'm running into the same issues. I bought five Vinco (Vinculo) development boards to prototype up a few examples of a product that's under development. I carefully walked through the "Getting Started" steps, but the application generated by their app wizard wouldn't compile, nor would the example program.
ReplyDeleteI bought the board to be used in "USB Host Mode" but apparently there's a missing HC_defs.h file being referenced from their core libs, so none of the host mode apps will build.
This is very sloppy and smacks of bad QA, I'm already regretting buying five development modules and two debugger modules. I should have just stuck with the AVR, but I was looking for a cheap and fast way to get a USB host working.
Live and learn, I guess.
I have been beating my head against the wall for a couple months working on a Vinco project that needs to use both the host and slave ports. I have finally come to realize the board is crap. I had to resolder the mini-B connector to get that to work and the host port doesn't seem to work at all. I have tried examples and moving over code that worked great on the development boards to no avail.
ReplyDeleteIt is true that "HC_defs.h" is not included
ReplyDeleteby the IDE installed by the latest copy from
FTDI. I experienced it today with a new PC.
I wonder why but my IDE installed a month
ago includes "HC_defs.h" and no such an error
happens as the person posted a report on
August 5th.
Please note the version numbers for my latest
system and a month old system are both 1.4.2.
And it seems the main body =the execution
files ="VinIDE.exe" for the systems are
completely same.
Maybe FTDI changed something about the
configuration of the installation set and
missed to include "HC_defs.h".
Since it seems even my latest system works
normally by copying "HC_defs.h" from a month
old system, I strongly recommend the person
posted a report on August 5th to request FTDI
would provide "HC_defs.h".
Although I recommended to request FTDI to
ReplyDeletesupply "HC_defs.h"in the previous comment,
it seems it is not necessary.
As I wrote, my system installed a month ago
does include "HC_defs.h" but the recent
installer does NOT include it.
I inquired FTDI the reason and they answered
as follows.
1. The installer in the early time for several
days accidentally included "HC_defs.h"
and later it was removed since it is not
needed to compile the sample program.
2. Removing the control line
#include "HC_defs.h"
in the file "vinco_USBH.h" is a solution to
prevent errors.
I followed the above and confirmed no error
happens and generates a workable ROM file.
Please try.
After some back and forth with FTDI I seemed to have a bad board. I had them send me a known-good ROM file for the HelloWorld app that writes to a flash drive and that too didn't work. I ordered a new Vinco board which arrived today. It does the exact same thing as the other one. I have to wonder if anyone outside of FTDI has gotten one of these to enumerate a USB device.
ReplyDeleteI was provided some code to enable a GPIO port and send toggle a couple bits in order to light the LED and power the host port, but that still doesn't fix the problem.
I'm about to give up on this whole platform. If I have an app that needs a USB B port, I'm going to use one of the development boards and solder the port on there myself.
Finally got this to work. It seems the "known-good" ROM file I got from FTDI was broken!
ReplyDeleteHere is what you need to do to get this to work:
1. Power jumper set to PSU, not VBUS. If you trace through the schematic you'll see why this is.
2. You need to set up GPIO to bring pin 40 & 41 low. Pin 41 must be low to power the USB host port. Pin 40 controls the LED next to the port.
3. Power the board with a wall wart or just get a 9V battery and plug it into Vin and GND on the Vinco board.
Here is some code I got from FTDI. Using this code I was able to modify the regular (not Vinco) HelloWorld example from 1.4.2.
////////////////////////////////////////////////////////////////////////
// Vinculo....Reassign pins for USB port LED and Power Control (port E used)
// Pin 40 is connected to LED and Pin 41 is Power Enable on Vinculo
//vos_iomux_define_input(40,IOMUX_IN_UART_RXD); // Vinculo - commented out UART Rx
vos_iomux_define_output(40,IOMUX_OUT_GPIO_PORT_E_5); // Vinculo - USB port 2 LED
//vos_iomux_define_output(41,IOMUX_OUT_UART_RTS_N); // Vinculo - commented out UART RTS#
vos_iomux_define_output(41,IOMUX_OUT_GPIO_PORT_E_6); // Vinculo - Power control
// Note that LED0..LED3 which are used in the code below are not present
// on the Vinculo board
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Vinculo....Initialise Port E to control power transistor and LED
gpioCtx.port_identifier = GPIO_PORT_E; // Vinculo
gpio_init(VOS_DEV_GPIO_E,&gpioCtx); // Vinculo
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Vinculo....Set port E bits
// LED is on E5 and Power Enable is on E6 so 8 port bits are as follows
// Bit 7 Not used
// Bit 6 Power Enable (active low)
// Bit 5 LED (active low)
// Bit 4 Not used
// Bit 3 Not used
// Bit 2 Not used
// Bit 1 Not used
// Bit 0 Not used
hGpioE = vos_dev_open(VOS_DEV_GPIO_E); // Vinculo - Handle = port E
gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; // Vinculo
gpio_iocb.value = 0x60; // Vinculo - 01100000 set bits 6 and 5 as output
vos_dev_ioctl(hGpioE, &gpio_iocb); // Vinculo
leds = 0x00; // Vinculo
vos_dev_write(hGpioE,&leds,1,NULL); // Vinculo - Write data of 00000000 to port
////////////////////////////////////////////////////////////////////////
I hope this helps!
Phil
Hi Phil
DeleteI have some difficulties to find where to add your code in the HelloWorld example.
Could you please publish the sources ?
Thanks in advance
Julien
Hey Phil, just realised I never thanked you for the info above. I've just returned to working with the VNC2 as a USB host and this information was invaluable. Cheers, Jason
ReplyDeleteI was wondering if someone know a forum where people share their thought regarding Vinculo 2 ?
ReplyDelete