USB to USB flash Drive File Copier


Closed Thread
Results 1 to 40 of 223

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Are you wanting to display the output on a LCD? If so then you will need to break the array up to fit on the screen and maybe do "line by line" refresh using the array parts that will fit...
    Any idea on how to do this? I was thinking to display arrays of 12 in every line so that it can support the 8.3 format set by the vinculum. the problem is, not all files follow the 8.3 format specially those with file names shorter than 8 characters. for example, i have a file named "pic.pdf" as you can see there will be 5 vacant array spaces for this line so the succeeding file's first 5 characters will occupy those vacant spaces then there will be a domino effect and the file names will be in a total disorder. do you have any idea on how i will know when it is the end of one file and the start of the next so that i can print it in a new line?

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by newbie View Post
    Any idea on how to do this? I was thinking to display arrays of 12 in every line so that it can support the 8.3 format set by the vinculum. the problem is, not all files follow the 8.3 format specially those with file names shorter than 8 characters. for example, i have a file named "pic.pdf" as you can see there will be 5 vacant array spaces for this line so the succeeding file's first 5 characters will occupy those vacant spaces then there will be a domino effect and the file names will be in a total disorder. do you have any idea on how i will know when it is the end of one file and the start of the next so that i can print it in a new line?
    If I follow you . . . 10 is line feed, 13 is carriage return, 32 is a space so . . . "pic.pdf",32,32,32 would display as pic.pdf and 3 spaces, which using serout you would just put 3 spaces after pic.pdf but within the "" marks, I have not used the 10,13 codes with an lcd so I do not know if they work, and my bench is upside down right now so anyway you could preload your array with all 32s and then write your file name into it . . . best way to me is to tell the lcd where to print it.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    does the vdip issue a line feed and a carrage return in every end of a file?

    . . . best way to me is to tell the lcd where to print it.
    can i view it your way? how would you do it?

  4. #4
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    I still haven't been able to get a response from the vdip when I connect it to the PIC and LCD. Still weird characters come out of the LCD. I'm using a 4Mhz xtal oscillator right now because when I tried to use a 20Mhz xtal the pic would not respond to any program..Do you think the oscillator has got something to do with it?

    If you could give me a schematic of vdip connected to the pic16f877a including the extra components, that would really help...

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I do not have a schematic so I will have to refer you back to the post BrianT made.
    http://www.picbasic.co.uk/forum/showthread.php?t=7700
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by newbie View Post
    does the vdip issue a line feed and a carrage return in every end of a file?


    can i view it your way? how would you do it?
    Here is a Map of the LCD Display giving the address of each cell. simply do as the book says and use that address where you want the first character to appear.
    example:
    LCDOUT $fe, 128, "this example uses "
    LCDOUT $FE,192,"the first 2 lines"

    see the numbers 128, 192, find them on the chart.
    It makes no difference if you use decimal or hex representations. 128 = $80, $FE = 254
    LCDOUT 254,1 will clear all characters from the screen.
    Attached Images Attached Images  
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    After a couple of tests I still have no success in interfacing the vdip to a pic16f877a microcontroller but i have found out that the program hangs whenever it reaches a serin2 command. I checked if the flowin was high but i wasn't...it was low the whole time the program was running so i'm pretty sure it wasnt trapped in an infinite loop. have any one encountered this?

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Can you post the code?

    When you setup the firm ware for the VDIP, what baud rate did you give it?

    You were able to communicate with the VDIP using a terminal, correct?
    What baud rate did you use then?
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    The code i used was same as the code that i posted above...

    I used the default baud rate which is i think 9600...do you think i should change it to 2400?

    I also found out that it can be risky for flash drives.. it broke my disk just now..

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. How to drive the Vinculum VDIP1 in UART mode
    By BrianT in forum Code Examples
    Replies: 41
    Last Post: - 23rd May 2013, 12:34
  3. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  4. USB-FTDI[UM232R] with PIC16f877a
    By bjox in forum USB
    Replies: 1
    Last Post: - 23rd February 2008, 22:40
  5. PICs and USB Flash Drives
    By The Master in forum USB
    Replies: 2
    Last Post: - 23rd October 2007, 10:23

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts