Thanks BrianT,
I have just ordered one of these modules. When I get it will try out your program and see how reliable the module is!
Thanks for all your work,
Bob
Thanks BrianT,
I have just ordered one of these modules. When I get it will try out your program and see how reliable the module is!
Thanks for all your work,
Bob
Hi Brian,
I was wandering if, in your search for answers on how to make better use of the VDIP1 based products, you found a reliable way (other than the message on Tx line) that will show if the storage device is present or not.
I’m thinking more in terms like a pin status change or a sequence in pin status changes.
I have an application which just transfers data from and to the flash storage device one byte at the time without having the PIC to look at it and I need a way to detect if the device is still connected.
I just received my first VDIP1 module and my first tests show that, without checking the data content from the module, I receive an answer from the module to my “RDF $01” command (read one byte from an open file) even if the flash device is removed (I guess it is an error message like “no device detected” or “bad command”). I was hopping that RTS might change but it doesn’t.
To be able to keep the speed on data transfer to a maximum I prefer not to concern the PIC with the data content and I need an alternate way to detect if the flash media is present or not.
Any idea will be appreciated.
Thank you in advance.
Nick
Hi Nick,
I don't believe there is any pin that will tell you a card is present or not. If I had to do it in hardware I would use a small resistor in series with the 5 volt line and sense the extra current pulled by the USB card.
Lots of luck with just sending bytes without a PIC. Data over- and under-runs drive the VDIP1 nuts and you must be careful to write exactly as many characters as you told the VDIP1 you were going to send otherwise the fiile can be left open and will be unreadable to any other device.
AFAIK, RTS / CTS are driven by the buffer falling below 32 or 64 characters or by some undefined messages sent between the VDIP1 and the USB card which the user never gets to see.
Email the factory but ask your questions very carefully. They responded quite quickly to me but never once volunteered any help or gave a suggestion outside the very narrowest meaning of my question.
HTH
BrianT
Thank you Brian.
I will try to E-mail FTDI.
I'll post the results.
Thanks again,
Nick
Hi all,
First I would like to clarify the fact that I am using a PIC for my data transfer to and from a USB data storage device and I’m carefully counting my bytes. It is just that there is no need for the PIC to know what they are. In order to get the information of device disconnected you must monitor the data stream for the “No disk” message and I can’t afford to keep the PIC busy with that. So checking a pin status makes it really easy for me.
After reading the information (Yes, now I agree with the RTFM supporters 100%) on the LEDs behavior one solution to detect USB device disconnect “blinked” to me.
The LED2 output is supposed to be ON (Low) when the device is inserted and there is no data exchange on USART monitor port. If there is traffic the LED2 blinks. If the USB device is disconnected the LED2 is OFF (High).
I’m using a loop like:
Loop:
Read a string of 50 bytes from a open file on the USB device, via Debugin
Process and format the string
Send the string out via Serout2 to an other application (Hyper Terminal)
Check if USB device is present
Go to loop
As you can see it works for me due to the slight pause on activity on the monitor port.
I did not do a full test to see how fast you can expect the LED2 response but it is fast enough for me.
Hope this information will help people with similar applications.
Regards,
Nick
Well done Nic, beats my sense resistor and transistor by a mile.
Cheers
BrianT
Hi Brian
i have VDIP2 module and ft232rl proto type board .VDIP2 module led's are blinking continuously indicating that the monitor is not connected.i would like to program
VDIP2 module .kindly suggest a method to reflash using the proto type board.the board has
signal lines plus 5volt supply line.
with regards
viji
Bookmarks