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
Bookmarks