Vinculum 1 USB Host Controller - Component

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

here by I'm releasing a tutorial that will help you understand the communication with the vinculum module.
Vinculum 1 Communication Tutorial.pdf
(351.92 KiB) Downloaded 697 times
If you have any questions or recommendations please let me know.

The Example file for the Datalogger Application:
Example Datalogging.fcfx
(19.73 KiB) Downloaded 513 times
Regards
the will to learn, should not be stopped by any price

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Just thought I should let you know that I got it working.

Just remember that if you write to an open file in a loop and you do not close the file and just unplug the power, no data will be saved. The file will be empty.

Might be a good idea to either close and open the file immediately after you append string to file (if you don't have time constraints) or you could use an interrupt to call a macro that only closes the file and the opens it again. Kind of like an auto save function.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Another couple of questions:

How can I get the correct time and date properties for when the file on the USB stick was created/modified?

I will probably be using either a RTC or GPS and for some projects maybe both. That way I can choose the logging interval with precision and also write the date and time to each data entry in the file, but I do not know how to influence the time and date value for when the file was created and when it was last modified.

Also, how can I do a carriage return after each data entry? I would like to have each entry on a new line.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

And it works with FAT32 8GB USB stick as well.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

That's great to here,

As for you other suggestion i will look into this,
I don't have much free time at the moment and it's going crazy at work.

But when I find and get some time I will look in to this and try to make a component update with you're recommendations.

Regards Jordy
the will to learn, should not be stopped by any price

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Thanks Jordy.

I'm in the same boat regarding all work and no play :)
But I thought I would at least provide some feedback and ideas. After all, you did this great custom component that will make my life that much easier so thanks :)

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Carriage return (how to get one entry per line) is working for me now.

I am logging a temperature reading to log.csv as a test.
the temperature is a string value so it was looking like this before:

example:
Temperature_String = 24.234567

Calculation:
Log_String = Temperature_String + "," (the comma because I use it as a delimiter (CSV=Comma Separated Value))

Then simply call the Vinculum macro like:
Vinculum1::AppendStringToFile(Log_String)

If I now opened the log.csv file in Microsoft Excel I would have one value in each column, not ideal.

So I changed the calculation from above to this:
Log_String = Temperature_String + "\n"

Now when I open log.csv in Excel I have all values in column A, one value per line.

If you were to log values from multiple sensors you would probably want the value of each sensor in its own column.
That could be achieved by modifying the calculation above to look something like this:

Log_String = Temperature1_String + "," + Temperature2_String + "," + Humidity_String + "\n"

As long as you don't forget to modify the properties of Log_String to the required length to accommodate all characters (Change the variable name from just Log_String to Log_String[40] where 40 is the number of characters you need to fit all characters from the different sensors in this example)

Now if I could just get the math function "fround(x,y)" to work (compile) :)

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Here is just an example of a graph I did yesterday when I tried this log function with my NIST compensated K-type thermocouple project.

I was lazy and just put a 1 second delay between log updates (will use an INT later) so the X axis is seconds and Y axis temperature
Temp_Graph.jpg
(72.26 KiB) Downloaded 4672 times

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

Well this is awesome.

Thanks for letting us (me) know the progress you made.
Im also happy that the component is working for you.

Regards Jordy
the will to learn, should not be stopped by any price

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

John, did you get your Vinculum 1 to work?

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by JohnCrow »

Hi
I've still not been able to get it to work in flow code, still not sure why.
I've tried it with the 4D interface and the terminal program Jordy posted last week, and that works fine, so I know the Vinculum is working.
Was hoping to have another play last weekend but ran out of time, its sat here on the bench ready on the protoboard.
Will post my findings later in the week.
1 in 10 people understand binary, the other one doesn't !

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Ok, if you post how you are connecting the Vinculum to the PIC (maybe a photo), and what model PIC you are using it shouldn't be hard to spot any issues.

In my case it was the chip configuration that was off. For some strange reason the frequency and crystal settings had changed and did not match hardware. I use a PIC18F4550 at the moment.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Jordy, I checked the firmware manual for the Vinculum 1 and there is a way to set the FAT format file date using the command date or even better datetime

This is from Chapter 6 Monitor Command Set. More info in Table 6.4 File Date and Time Bit Fields

Maybe you could create a new macro where the user can specify which variables contain the different bits needed. That way the user can specify this if there is an RTC being used. Otherwise the user could just ignore to use this macro.

Then it would also be great to have the append to file command update the file date and time automatically if the previous macro has been used and values are present. Otherwise just skip the update date and time part.

Other useful features would be a macro for the Rename File (REN) command. That way a file can be renamed when the date changes or if it becomes bigger than a set value etc.

Check page 31 and 32 for more info on datetime and REN.

I think that would be doable no? I just don't have any idea how to do it :)

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

hyperion007 wrote:Jordy, I checked the firmware manual for the Vinculum 1 and there is a way to set the FAT format file date using the command date or even better datetime

This is from Chapter 6 Monitor Command Set. More info in Table 6.4 File Date and Time Bit Fields

Maybe you could create a new macro where the user can specify which variables contain the different bits needed. That way the user can specify this if there is an RTC being used. Otherwise the user could just ignore to use this macro.

Then it would also be great to have the append to file command update the file date and time automatically if the previous macro has been used and values are present. Otherwise just skip the update date and time part.

Other useful features would be a macro for the Rename File (REN) command. That way a file can be renamed when the date changes or if it becomes bigger than a set value etc.

Check page 31 and 32 for more info on datetime and REN.

I think that would be doable no? I just don't have any idea how to do it :)
All your suggestions are doable, also I have the macro rename File in the current component, but its hidden. the reason is that it works intermitted, so need to look at that.
So again if I have time I promise I will release a update.

Regards Jordy
the will to learn, should not be stopped by any price

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Ok sure, just thought I would help out with suggestions etc. no pressure, etc. :)

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

Just a quick thought, what would one need to consider if making a PCB with the Vinculum 1 components on it as part of a larger system? I assume there would be a procedure for loading the correct firmware/bootloader on the FTDI chip? I might have missed this information on their website when I looked for it.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by hyperion007 »

I found instructions on FTDI's website on how to program the bare IC.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

Component Has been updated to version 2.0
In this version I have made little adjustments to all macros for better operation, also I have added the feature to manipulate the file creation date.
In the panel properties I have added the configuration for RS232 and the vinculum 1 flow control.

Future Updates can be found in the start post.

Regards Jordy
the will to learn, should not be stopped by any price

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

I have added some new videos to show you all, the progress I have made with the new update that is coming soon.
I hope you like the changes so far, I have been working hard and I will probably release the update (v2.1) By the end of this weekend.

Regards Jordy
the will to learn, should not be stopped by any price

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Vinculum 1 USB Host Controller - Component

Post by Rudi »

Hi Jordy,

i have understand so , that the VDAP Firmware is supported, right?

Do you plan a support for VCDC ( CDC Windows VCP virtueller com port ) ?

BW
Rudi
;-)




VDAP Firmware:
USB Host for single Flash Disk and General Purpose USB peripherals. Selectable UART, FIFO or SPI interface command monitor.

VDPS Firmware:
USB Host for single Flash Disk and General Purpose USB peripherals. USB Slave port connection for connecting to host PC. Selectable UART, FIFO or SPI interface command monitor.

VDFC Firmware:
USB Host for two Flash Disks, Selectable UART, FIFO or SPI interface command monitor.

VCDC Firmware:
USB Host for automatic connection to USB Communications Class Devices. UART interface command monitor.

VDIF Firmware:
USB Host for single Flash Disk and General Purpose USB peripherals. Selectable UART, FIFO, SPI or USB interface command monitor.


User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

Hi rudi,

I Cannot promise you anything but if I find some time I Will look into this.
I'm having some trouble lately with myself and stuff, need to sort that out before I can do anything else.
Hope you can understand.

That's why I'm not as active on the forums as in the past.

Regards Jordy
the will to learn, should not be stopped by any price

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Vinculum 1 USB Host Controller - Component

Post by Rudi »

Hi Jordy,

i have two questions to yours,
i search a distributor in germany..
"reichelt.de" is for sale the chip named "VNC1L-1A " only..

http://www.reichelt.de/VNC1L-1A/3/index ... ARCH=VNC1L

12,10 EUR -> 9,95 EUR

"farnell.com" is for sale the chip as a complete Module named "VDIP1"

http://de.farnell.com/ftdi/vdip1/entwic ... dp/1329313
16,89 EUR

( the chip only is 12,33 EUR -- http://de.farnell.com/jsp/search/produc ... tAod2SkAxw

Which Utensil you take? The "empty" Chip only or the Modul with Firmware and Bootloader ?
Do you have a Tip for buy ?

I will buy next Time some Modules for Testing.. later perhabs for own Circuit only the chips..

Thank you for your time and tips!

Best wishes!
Rudi
;-)

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Vinculum 1 USB Host Controller - Component

Post by Jordy101091 »

Hi Rudi,

Personally I would go for the VDIP1 module.
Because you can use it straight out of the box.
You can explore the possibilities right away.

If you would buy the chip only you need to design all
The necessary circuitry yourself which would cost more.

So if you want to know the chip and it's possibilities a bit more I would go for the
VDIP1 module. Otherwise just buy the chip only.

Hope this helps you in making you're decision.

Regards Jordy
the will to learn, should not be stopped by any price

Post Reply