USB to USB flash Drive File Copier


Closed Thread
Results 1 to 40 of 223

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    ya almost the same...

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


    Did you find this post helpful? Yes | No

    Default

    If you can not figure it out from what we did with newbie let us know and we will try to figure it out.

    Good luck!
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    i think another prob is ..i using 4bit....i will try using 8bit to test it..

  4. #4
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    i follow the way newbie show to the LCD...but i only can show 1 or 2 file name only..then keep on repeat the second file name..

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


    Did you find this post helpful? Yes | No

    Default

    Hey, at least you are getting something

    I do not think newbie ever showed us his last code so I am not sure what you are using. Sounds like a loop problem but to be sure post your current code so we can have a look at it.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    Code:
    INCLUDE "modedefs.bas"
    @ __config     _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF 
    DEFINE OSC 20
    DEFINE SER2_BITS 8
    DEFINE LCD_DREG     PORTA 'LCD Data line
    DEFINE LCD_DBIT     0
    DEFINE LCD_RSREG    PORTB  'RS bit
    DEFINE LCD_RSBIT    5
    DEFINE LCD_EREG     PORTB 'E bit
    DEFINE LCD_EBIT     4
    DEFINE LCD_RWREG    PORTB 'RW bit
    DEFINE LCD_RWBIT    6
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_CHARS    20
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    
    
    VinTXD VAR PORTC.7 'AD0 TXD VDIP2 connect RX
    VinRXD VAR PORTC.6 'AD1 RXD VDIP2 connect TX
    FlowIn VAR PORTC.0 'AD2 RTS
    T VAR PORTC.0 'push button
    D VAR PORTC.1 ' PUSH BUTTON FOR DISPLAY
    
    
    FILE1 VAR BYTE[12]
    FILE2 VAR BYTE[12]
    FILE3 VAR BYTE[12]
    
    X1    VAR    BYTE
    X2    VAR    BYTE
    X3    VAR    BYTE
    X4    VAR    BYTE
    X5    VAR    BYTE
    X6    VAR    BYTE
    X7    VAR    BYTE
    X8    VAR    BYTE
    X9    VAR    BYTE
    X10    VAR    BYTE
    X11    VAR    BYTE
    X12    VAR    BYTE
    X13  VAR    BYTE
    X14  VAR    BYTE
    X15  VAR    BYTE
    X16  VAR    BYTE
    X17  VAR    BYTE
    X18  VAR    BYTE
    X19  VAR    BYTE
    X20  VAR    BYTE
    X21  VAR    BYTE
    X22  VAR    BYTE
    X23  VAR    BYTE
    X24  VAR    BYTE
    X25  VAR    BYTE
    X26  VAR    BYTE
    X27  VAR    BYTE
    X28  VAR    BYTE
    X29  VAR    BYTE
    X30  VAR    BYTE
    X31  VAR    BYTE
    X32  VAR    BYTE
    X33  VAR    BYTE
    X34  VAR    BYTE
    X35  VAR    BYTE
    X36  VAR    BYTE
    
    CRET VAR BYTE
    CRET = $0D
    
    StartDisk:
    pause 3000
    HIGH VinRXD
    
    SEROUT2 VinRXD,84,["ECS",13]
    LCDOUT $FE,1, "1"
    pause 2500
    PAUSEUS 1000
    HIGH VinRXD
    PAUSEUS 3000
    SEROUT2 VinRXD,84,["IPA",13]
    LCDOUT $FE,1, "2"
    pause 2500
    HIGH VinRXD
    PAUSEUS 1000
    SEROUT2 VinRXD,84,["A:",13]
    LCDOUT $FE,1, "3"
    pause 2500
    HIGH VinRXD
    PAUSEUS 1000
    SEROUT2 VinRXD,84,["DIR",13]
    LCDOUT $FE,1, "4"
    'pause 2500
    PAUSEUS 1000
    WAIT1
    IF FLOWIN = 1 THEN WAIT1
    SERIN2 VinTXD,84,[WAIT(CRET),STR FILE1\12 \CRET,WAIT(CRET),STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET]
    LCDOUT $FE,1, "5"
    'pause 2500
    
    X1 = FILE1[0]
    X2 = FILE1[1]
    X3 = FILE1[2]
    X4 = FILE1[3]
    X5 = FILE1[4]
    X6 = FILE1[5]
    X7 = FILE1[6]
    X8 = FILE1[7]
    X9 = FILE1[8]
    X10 = FILE1[9]
    X11 = FILE1[10]
    X12 = FILE1[11]
    X13 = FILE1[0]
    X14 = FILE1[1]
    X15 = FILE1[2]
    X16 = FILE1[3]
    X17 = FILE1[4]
    X18 = FILE1[5]
    X19 = FILE1[6]
    X20 = FILE1[7]
    X21 = FILE1[8]
    X22 = FILE1[9]
    X23 = FILE1[10]
    X24 = FILE1[11]
    
    
    
    PAUSE 100
    LCDOUT $FE,1,X1,X2,X3,X4,X5,X6,X7,X8,x9,x10,x11,x12
    "actually i not really understand for this line "SERIN2 VinTXD,84,[WAIT(CRET),STR FILE1\12 \CRET,WAIT(CRET),STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET]" "

    the code of this can display only 1 file name...but if i add another line LCDOUT the LCD display 2 same file name...
    Last edited by ScaleRobotics; - 4th July 2011 at 19:41. Reason: added code tags

  7. #7
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    dear mackrackit,
    i already figure out..how to make it display..but the array part need got some prob.. it that got other way to make the file store at X

    X1 = FILE1[0]
    X2 = FILE1[1]
    X3 = FILE1[2]
    X4 = FILE1[3]
    X5 = FILE1[4]
    X6 = FILE1[5]
    X7 = FILE1[6]
    X8 = FILE1[7]
    X9 = FILE1[8]
    X10 = FILE1[9]
    X11 = FILE1[10]
    X12 = FILE1[11]
    X13 = FILE2[0]
    X14 = FILE2[1]
    X15 = FILE2[2]
    X16 = FILE2[3]
    X17 = FILE2[4]
    X18 = FILE2[5]
    X19 = FILE2[6]
    X20 = FILE2[7]
    X21 = FILE2[8]
    X22 = FILE2[9]
    X23 = FILE2[10]
    X24 = FILE2[11]

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