VDIP1 (Vinculum - FTDI) problems
Has anyone successfully interfaced the Vinculum VDIP1 module to a PIC for storing data on a USB memory stick?
I want to use the VDIP1 to take 9600 bps data strings and write blocks of data to a USB memory stick.
I read the "Flash Drive Connection" article in Circuit Cellar and assumed the VDIP1 and VMUSIC chips are largely the same. I have selected UART mode by placing both jumpers in either the extreme left or extreme right positions as per the VDIP1 Vinculum VNC1L Prototyping Module datasheet figure 2 & table 2. I have RTS pin 9 tied to CTS pin 10. I have +5 volts on pin 1 and Ground on pins 7 and 18. All other pins are floating.
I am sending the following ASCII message at 9600 bps into the VDIP1 on pin 8.
OPW Test1
IPA
WRF 12
Hello World!
CLF Test1
What I observe is as follows.
1/ at power up LED1 and LED2 alternately flash
2/ touching a CRO probe on to pin 23 stops the alternate flash.
3/ touching a CRO probe to pin 22 restarts the flashing.
My code is:-
VDIP1TxD var portb.0 'data from Vinculum VDIP1
VDIP1RxD var portb.1 'data TO VDIP1 for writing to the USB stick
LED var portb.5
TxD var portc.6
RxD var portc.7
Start:
define osc 4
define loader_used 1
' Define LCD registers and bits
Define LCD_DREG PORTD
Define LCD_DBIT 0
Define LCD_RSREG PORTD
Define LCD_RSBIT 5
Define LCD_EREG PORTD
Define LCD_EBIT 4
define char_pacing 1000
WriteBlock:
lcdout $FE, $01, "Creating file", $FE, $C0, "Test1"
serout vdip1rxd , 6, ["OPW Test1"]
pause 500
serout vdip1rxd, 6, ["IPA"]
pause 100
serout vdip1rxd, 6, ["WRF 12"]
pause 100
lcdout $FE, $01, "Writing data", $FE, $C0, "Hello World!"
serout vdip1rxd, 6, ["Hello World!"]
pause 1000
serout vdip1rxd, 6, ["CLF Test1"]
lcdout $FE, $01, "Closing file", $FE, $C0, "Test1"
pause 1000
goto writeblock
Any assistance gratefully received.
Brian
Vinculum now starting to work - sort of
FTDI have just posted a magazine article showing a PIC with a VDIP1. This is a help particularly if you can interpret the C code to get an idea of what is going on.
http://www.vinculum.com/documents/AEI_0807_pp23-24B.pdf
The C code is available at.
http://www.vinculum.com/projects/SampleCsource.zip
I am trying to use the VDIP1 in the most basic connection using its internal UART interface. What I have found so far is:-
Reset, PGM, RTS, CTS, etc are all active LOW. Nowhere does the VDIP1 prototyping module datasheet manual version 0.92 say that.
Txd & Rxd are inverted (mark/idle is TTL high) so you need the 'driven true' settings for serout. A max232 would be needed do drive an external RS-232 interface. I found I needed to force the data line HIGH for 5 mSecs before calling SEROUT to get it to work every time.
A carriage return is ESSENTIAL after every command.
FAT32 on a 2 GB card does not work for me.
FAT on a 2 GB card sometimes works.
FAT32 on a 256 MB card does not work for me
FAT on a 256 MB card works almost every time BUT a/ if the 256 MB card is inserted power OFF the system needs a manual reset to start and b/ if the system was powered up when the 256 MB card was inserted it mostly sees the card and works but occasionally a manual reset is needed.
It looks like FAT32 format flash cards are not supported. If I insert a 2 GB stick with the system powered OFF and I then turn it on, the VDIP1 LED1 and LED2 flash alternately forever. If I then ground the VDIP1 reset AND PGM together (Reset alone is not enough) then the system flashes LED1 and LED2 briefly a few times then LED2 lights steady. But now the Activity LED on the 2 GB stick flashes about 2 times per second and continues to flash forever. Formatting (using Windows Explorer on WIN-XP) the 2 GB stick for FAT instead of FAT32 sort of sometimes works. I have to try repeatedly grounding RESET and PGM before I get a state where the LED1 and LED2 stop their alternate flashing. I have recorded data on a 2 GB stick but it takes about ten tries to get the card recognised and the activity light to stop flashing.
The detection of a new USB stick seems flakey. What I have found works mostly is to install the memory stick with the system powered up, wait a few seconds, then pull the RST line AND the PGM line low briefly. Touching an oscilloscope probe to the reset line on the external 24 pin adapter is enough to reset the chip - it's ultra sensitive.
The Circuit Cellar article shows RTS directly connected to CTS. An email from FTDI says these should be actively driven so as not to miss any and data. The VDIP1 manual description is pretty vague and RTS/CTS appear to have a rather different meaning to modem usage.
All in all I think I will eventually get this going but the documentation is crap. The factory did answer an email promptly but volunteered nothing I have listed above.
Very frustrating and no way living up to FTDI's claim of 'makes USB a snap'.
Cheers
Brian
Vinculum nearly working with SOME memory sticks
The VDIP1 is a fussy feeder and you only find out what it does not like after you have tried and lost data.
After several emails from the factory I have sort of got a working system. I have found out the hard way that not all USB memory sticks are created equal. My Rundisk 2 GB brandx stick is apparently too slow for the Vinculum VDIP1. That may be rectified with proper handshaking but how to do that is nowhere described in the manuals that I have found.
You are meant to be able to upgrade the code in the VDIP1 by inserting a memory stick with an specially named file on it. Well it does work with a Verbatim 512 MB card but my Rundisk 2 GB card just dies part way into the boot load process leaving one VDIP1 module permanently inoperative. Scratch $35.
With a Verbatim 512 MB card I can write 10,000 character files without using any software flow control but I do need some delays.
Now for the task of reverse engineering the flow control system until it works.
BrianT
How to drive the Vinculum VDIP1 USB module
I finally got this working with some help from FTDI. I have put a writeup and the full code in the "Code Examples" part of this forum.
HTH
BrianT
Re: VDIP1 (Vinculum - FTDI) problems
Hello friends,
Can anybody guide me how to link VDIP1 module with hyperterminal for testing purpose?