Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

comunication between vdip1 and pic18f452

Status
Not open for further replies.

m880316

Newbie level 4
Joined
Jan 14, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
israel
Activity points
1,330
hay averyone,
i am new at this and i am having a promblem in creating a file on a usb connecting to the vdip1, while i am in commend mode.
i am sending the commend from the pic18f452 threw the uart (tx pin) and i have checked in scop that the vdip1 gets the transmishion it suposed to and i can see on the flashdisk that it reacts but nothing seems to change in the usb.
i even tried to read from an exiting file with the rd commend but instead of reading what it suposed to the pic hes gotten junc data, data with no meening.
also according to the data sheets of the vdip1 when u remove the usb the leds should tern off but they react only when i restart the system.

i am kinda stuck and will thank u for any dirrection u might give me on how to make the vdip1 react to the commends and creat the file.
 

Hi,

USB to USB - yes, Usart to Usart - yes , Usart to USB - No.

Usart to USB can easily be achieved by using a cheap commercial serial to usb converter module often found in component shops.
 

hay wp100,
thanks on the fast reaction,
but are u sure of that because i understood that the hole function of the vdip1 is that it can comunicates with the pic by uart/spi/parallel fifo and by commends sent to him from the pic it should react and convert the data in the way that the usb should react to it.
according to its data sheet the commend opw filename end then enter should make it open exiting file thet loccates in the usb or if not exisit creat it on him.
 

Hi,

I know nothing about pc / usb but believe what I said in the previous answer is correct.

Normally Pic to PC via USB is done using USB enabled chips like the 18F4550 range, although again I believe those pic chips can not operate as the host usb.

Perhaps someone with a better understanding of USB can come in and clarify things for you.
 

No, the OP is indeed trying to use the VDIP in one of the modes it is designed to work in. One thing that I have found with the VDIP/Vinculum chip is that they come from the factory with VERY old (e.g. v1.0) firmware in them (and the current FW rev is up above v3.66). I suggest that you get an TTL-232R-3V3 cable from the FTDI folks and download their flash updater utility. hookup the cable to the VDIP per the instructions from their website and update the FW in it first before trying any more with the PIC communications. It is likely that the command you are sending (if it is receiving it correctly) is erroring or not working with the flash drive you've got, especially if it is a newer ( >512MB) flash drive.

I've implemented the FTDI/Vinculum chip on some embedded products myself, but used the parallel FIFO interface for the embedded host. Still, I used the flash update tool on the PC and the TTL232 cable to get the VDIP FW rev'ed up to where it would work.

Also, are you sure that you've got the pins in the VDIP module pulled hi/lo correctly to enable it in UART (not FIFO) mode? You'll have to check the firmware user manual as to the default baud/ bps rate for the UART and make sure that your PIC UART port is set accordingly. I would just focus first on getting some PIC code to send the basic commands to get the FW revision from the Vinculum chip first correctly. Use the 'E' and 'e' echo commands to synchronize the communications between the processors and make sure that works before issuing flash disk commands - this is how I get it started.
 

    m880316

    Points: 2
    Helpful Answer Positive Rating
thanks alot for your answer it gave me some direction of how to start understanding how to work with this device
so thanks again.
 

hay,

i updated successfully the vdip1 device software to 3.68

and when powered on it sends me 'ver 03.68 vdapf on-line:'

but when i am sending any command like ipa,opw,wpf,fwv or any ather basic command in c++ to the uart like so: 'fprintf("fwv\n");'

the vdip1 doesn't react , like it don't understand it.
can anyone help me understand how to make it to open a file?



i am now using a 256MB usb device.
 

BE sure that you can successfully send AND receive responses to the VDIP using those basic commands at the beginning of Chapter 6 in the firmware user manual (SCS, ECS IPA, IPH, E, e) before going on to the more complex ones.
It sounds like you aren't sending the characters that you think you are (fprintf to the UART port, why?) and/or you aren't completely receiving/parsing the info that it sends to you. There are actually 2-3 lines of info that it sends as part of its power up.
Have patience/persistence - you're making progress..

A good thing to do to make sure that you've got communications synchronized and working between the (2) processors is to use the 'E' and 'e' echo commands to make sure your code and the VDIP are chatting nicely back and forth first.

There are (or were) some examples on the net involving interfacing the VDIP to a PIC or AVR processor via UART which may give you more ideas.

How have you implemented the serial interface to the VDIP? Have you hooked up the CTS/RTS, DTR/DSR handshaking lines? The VDIP manual has useful recommendations
One last suggestion - check out this example/app note if you haven't already:
http://www.ftdichip.com/Documents/AppNotes/AN_102_Data_Logging_Using_the_Vinculum_VNC1L(FT_000058).pdf
 

hi,

first i want to thank you for all your help so far, so thanks alot, your last tip realy helped 'cause as soon as i changed fprintf to printf and putc it worcked realy well.

but i steel have a problem using the device.

i can't seem to get it to open/create a file, and there for i don't know if i can write to it or close it, also i can't read data from an existing file or from the file i am trying to create.

it react's as it should to the commands (it sends the right response for each command), and when i check the free space that left in the usb by using idd i see it changes and getting smaller after writing, and when i check the usb throw the propertis in the computer i see that the free space got smaller , but i can't see any file or folder.

if i'm creating a file first and try to read from it using the RDF command or try to read the data i send to the file i created after closing it and reopening it i always get the same response: "xxxxxxxCommand Failed" (x means 254 in decimal).

i made sure that it identify the usb properly by "SC "0x20 0x0D , and i chacked it also by QP2 and QD

i realy don't know why doesn't it create a file or read from a file, can u please help me understand what it wants, i'm realy lost with this device.

thanks alot, best regards and good day.
 

FTSOLUTIONS !!

I see you have worked with the vdip in fifo mode in the past, Is there any special trick to getting it to work, ie custom pin grounding etc. ?

The module seems to work in uart mode, finding my flash and be able to be boot loaded from flash but for the fifo mode the leds up after power up alternates once then "nothing", i have tried the latest firmware but it still does not work. With out a flash the led alternated continuously however this is only in uart mode and not in fifo mode.

Any help will be appreciated
 

Hi,
I have problem connecting vdip1 to atmega16 via usart.
when I connect vdip1 to power and connect it to atmega16 via usart it doesn't send me the version. how do you do the connection so that it show you the version...if you can discuss me the circuit...
how should I send command sets to vdip1 using usart connection, I mean what is codevision code for sending the command sets ,for example MKD,OPW,... ?
regarding...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top