Page 1 of 1

communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Fri Dec 29, 2017 12:59 am
by RLOPES780
All good friends?
I'm trying to communicate a dspic33ep with a ftdi vnc1l.
I know he accepts communications via spi and uart.
But I can not even a type of communication. Just via hyperteminal with my pc. I know that after each command of your table it needs a carrige return.
My intention was to do tests for a possible datalogger. I am sending you an attached document but this is in Portuguese.
Someone could give me some help.
Which uart pins can I choose? Is the PPS feature active in flowcode?
""SCS <cr> 10 0D Switches to the short command set.
ECS <cr> 11 0D Switches to the extended command set.
IPA <cr> 90 0D Configures the command monitor to work with values ​​in ASCII.
IPH <cr> 91 0D Sets the command monitor to work with binary (Hexadecimal) values.
SBD divider <cr> 14 20 divider 0D Switches the baud rate from the command monitor.
FWV <cr> 13 0D Displays the firmware version VNC1L.
E <cr> 45 0D Echoes the character 'E' for synchronizing effect. That is, returns E <cr>.
and <cr> 65 0D Echoes the character 'e' for synchronizing effect. That is, returns and <cr>.
DIR <cr> 01 0D Shows the file names in the current directory (folder).
DIR File_name <cr> 01 20 File_name 0D Shows the file size specified in File_Name in 4 bytes.
CD Folder_name <cr> 02 20 Folder_name 0D Changes the current directory (folder).
CD .. <cr> 02 20 2E 2E 0D Returns a level above the current directory (folder).
RD Array_name <cr> 04 20 Array_name 0D Reads the entire contents of a file.
DLD Folder_name <cr> 05 20 Folder_name 0D Deletes a directory (folder).
MKD Folder_name <cr> 06 20 Folder_name 0D Creates a directory (folder).
MKD FolderName DateHora <cr> 06 20 FolderName DateTime 0D Creates a directory (folder) and specifies the date and time of creation.
DLF Array_name <cr> 07 20 Array_name 0D Deletes a file.



Thankful;
Ricardo.

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Fri Dec 29, 2017 2:36 am
by medelec35
Hi Ricardo,
For starting point you could read this whole topic as there are example flowcharts as well.

Martin

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Fri Dec 29, 2017 9:50 pm
by RLOPES780
hi medelec;
thanks for listening;
I am using vnc1l as vdip1 which I believe is similar to your vdrive2 application.
I read the topic and updated the uart and rs232 components.
I'm using a dspic33ep512mu810 to communicate.
I can execute all the commands through the hterm.
I am using the pins tx G7 and rx G8. The pins cts and rts are interconnected and grounded.
I'm doing a simple test of just creating a directory. The command in extended mode and "MKD" and carrige return "13". I create through the HTERM.Porem when I try with mcu I have no results.
I am sending the code attached if I can take a look.

Thankful;
Ricardo.

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Tue Jan 02, 2018 3:54 pm
by Benj
Hi Ricardo,

For the UART baud to be correct it might be worth double checking the chip is running at the speed you think it is.

Here is information on how to do this.
http://www.matrixtsl.com/wikiv7/index.p ... ED_flasher

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Tue Jan 02, 2018 5:25 pm
by medelec35
Hi Ricardo,
If the frequency is correct, then have you tried the data logging flowchart I posted?
If so does it log OK?
What I would also recommend is using Tera Term in debug mode to check data baud is correct and also CR are used correctly.

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Thu Jan 04, 2018 1:43 am
by RLOPES780
Hello Martin;
Just a question. I saw in one of the topics that Jordy had started the project of component vinculum 1, although in advance it stopped with the project. For the ease of a component almost finished. I tried using it with dspi33 but without success .This component offers the possibility of use with all PIC line.
Can you give me this information?
I'm putting the component in the attachment.

Thankful;

Ricardo.

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Thu Jan 04, 2018 12:41 pm
by medelec35
Sorry,
Unable to give any advice on someone else's component.
Coding of components is not visible.
If Jordy is not working on the component and its not doing what you want it to do,
then perhaps you could request for the component to be created?

Martin

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Thu Jan 11, 2018 3:07 am
by RLOPES780
Hello Martin;
I followed his advice and managed to communicate a dspic33ep and the VNC1L. It seemed to be a speed problem anyway.
I was able to create an open directory creating a file open and write data to it.
Do you have to inform before how many bytes will be written to the file? And the IPA command.
And to line switch use a char 10 ok?
Thankful;
Ricardo.

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Thu Jan 11, 2018 9:34 am
by medelec35
Hi Ricardo,
That's good.
At least you're getting further.

You need to specify how many characters to write like you have done with

Code: Select all

"WRF 840"
However You must send the specified number of characters before using

Code: Select all

"CLF teste.txt"
Otherwise you won't see the file created.
One way is to count the characters within a string first then use the Length$() function to set number of characters for WRF.
Or another way if the number varies then set WRF for the maximum characters it will ever be.
Then just before

Code: Select all

"CLF teste.txt"
you can use a loop and within loop use

Code: Select all

SendString " "

Just so the number of characters specified will always be exceeded.

I don't use IPA command as I reflash my Vdrives so it's always in ASCII mode, Extended command set e.t.c.

Martin

Re: communication between dspic33ep512mu810 and ftdi vnc1l device

Posted: Mon Jan 15, 2018 12:20 am
by RLOPES780
Hi Martin;
All right?
I need one more help from you.
I was able to send data to VNC1L.
I would now like to receive data. To start I would like to check disk presence or not. I know that in extended command the answer is D: \> Yes and No Disk No and short commands 3E Yes and 4E 44 not. I do not know much how to handle the uart receive commands. I'm attaching this basic file here, could you tell me how to get started?

Thankful;
Ricardo.