USB to USB flash Drive File Copier


Closed Thread
Results 1 to 40 of 223

Hybrid View

  1. #1
    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
    i have a data sheet of the display...some of the characters of the are found in there but some aren't. these reason i have my eyes set on these weird character is because i think they would be the key to sorting the file names since the appear in between them.basing on the pictures above, do you have any idea on how i can sort the file names so that i can print only one file name per line? ive been trying joe's suggestion but so far i have no success.
    Hi Newbie,
    Sometimes weird characters are due to the clock or baud being off. They can occur if the LCD's power is not bypassed adequately with a capacitor. What I do to check things like this is to make a counter loop which outputs a count from 0 to xxx and also outputs a space after and also outputs the counter variables actual count, and I watch for the character to appear and see what number makes it so.
    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.

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


    Did you find this post helpful? Yes | No

    Default

    Something like this
    Code:
    B var word
    counter var word
    main:
    counter = 0
    b = 0
    lcdout $FE,1    ' Clear LCD
    for counter = 0 to 255
    
    
    LCDOUT $fe,$2,b," ",#counter
    PAUSE 250
    b = b + 1
    next counter
    goto main
    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 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    About a year ago I had the bright idea of using a PIC and a VDIP1 to transfer file to a Burny 2.5 CNC controller. I could never get it working properly and gave up.

    The Burny was never happy with the data being sent to it. My simulation software worked fine. I wonder if what newbie is seeing was the problem with the Burny?

    Somehow the VDIP is sending "ghost" info??
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    hi guys thanks for the replies but i think i got it...
    the weird characters were carriage returns ($0d).
    Name:  IMG0278A.jpg
Views: 3093
Size:  54.5 KB
    i used this code..
    Code:
    CRET VAR BYTE
    CRET = $0D
    SERIN2 VinTXD,84,[WAIT(CRET),STR FILE1\12 \CRET,WAIT(CRET), STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET,WAIT(CRET),STR FILE4\12 \CRET]
    as you can see i waited for every occurrence of the carriage return and saved the characters found between them into an array of string.

    the weird characters that you can see at the end of some files names in the lcd are i think blank or null arrays since i allocated 12 array places for every file name found but not all of them would be 12 characters long..some are less.

    now could you suggest any better way of storing these file names?
    because i think if i do it this way, my pic microcontroller would quickly run out of space to save all of the characters from the file names and if the flash drive inserted is very populated then the files names not saved in the array would not be displayed.

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


    Did you find this post helpful? Yes | No

    Default

    If the file names are always the same, you could assign them each a number, and store the names in eprom, or if they have all the same name with a number, even easier, just display the name followed by the number received. Unless I am missing something due to inadequate supply of coffee .
    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.

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


    Did you find this post helpful? Yes | No

    Default

    You might try what Joe suggested before and pre-populate the arrays with a known value.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    If the file names are always the same, you could assign them each a number, and store the names in eprom, or if they have all the same name with a number, even easier, just display the name followed by the number received.
    here is the rule about the files from the vinculum:
    Filenames are made up of an 8 character main part and an optional 3 character extension. The presence of a ’dot’ character in the filename indicates the boundary between the main part and the extension. The name may be up to 12 characters long, including the ‘dot’ character.

    can you give me a sample code about this? I'm not that familiar with eproms.

    You might try what Joe suggested before and pre-populate the arrays with a known value.
    ive been thinking about doing that..but the thing is if the length of the file names is less than 12, i might have trouble retrieving only the arrays that were inserted with the file name characters. if i include the arrays that were not over written by the file name characters and still contains the pre loaded value, the vdip2 would respond "command failed".

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