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
    are you suggesting to try pullup instead of pull down? done that...didn't work..
    If I understood you correctly, and I am not sure I did, your push button switches ground the ports. If that is true, then yes, a pull up resistor, either internal (wpu) or external would seem to be in order. If your push buttons make the ports go high, then a pull down resistor would be required.
    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
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The VDIP2 might be different but on the VDIP1 the reset pin is left floating when not in use. Seems strange yes but....

    Sounds like a bad conection or the magic smoke got out.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    i tried what joe said and used a pull up resistor,. still nothing happend.. that made me hopeless about my module and began thinking that mackrackit was right..may be magic smoke did got out. so i ordered another vdip2 module and its on its way here..

    for the mean time, i'm in the middle of programming the push buttons for browsing the files. how do i program the buttons to execute the command only after releasing the button from being pressed. the reason i want it that way is because if i execute the command(e.g. scrolling the lcd with the file names) while the button is being pressed,some files names would be skipped due to very quick execution.

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


    Did you find this post helpful? Yes | No

    Default

    If the button pin is pulled LOW in an idle state ,active HIGH. You could use WHILE/WEND.
    Code:
    WHILE
    BUTTON  = 1
    DO SOMETHING
    WEND
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    sir, in my program which is similar to the code back in post #63,
    the LCD prints:

    Ver 03.66-123VDFCF On-Line:

    then clears the display and then finally displays the filename that i wanted to display. I saved the characters sent by the vdip2 into an array right after the "DIR" command so the "Ver 03.66-123VDFCF On-Line:" should not be included in those characters because they were sent at the time the vdip2 turned on and long before the "DIR" command was made..but how come they are still being displayed?

    how do i effectively display only the characters that are the response to the current command and not display the characters that were sent by the vdip2 long before the command was made?

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


    Did you find this post helpful? Yes | No

    Default

    That is interesting. Please post your current code so we are sure to be talking about the same thing.

    Just a thought...
    You might try more than one array and or clear the the array at given points. It should over write it but...

    Need to see the code...

    Dave
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Code:
    INCLUDE "modedefs.bas"
    
    DEFINE LCD_DREG     PORTC
    DEFINE LCD_DBIT     0
    DEFINE LCD_RSREG    PORTD
    DEFINE LCD_RSBIT    2
    DEFINE LCD_EREG     PORTD
    DEFINE LCD_EBIT     1
    DEFINE LCD_RWREG    PORTD
    DEFINE LCD_RWBIT    0
    DEFINE LCD_BITS     8
    DEFINE LCD_LINES    4
    Define LCD_CHARS    20
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    
    VinTXD VAR PORTD.4 'AD0
    VinRXD VAR PORTD.3 'AD1
    FlowIn VAR PORTD.5 'AD2
    
    Pause 500  
    
    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:
    
    HIGH VinRXD
    PAUSEUS 1000
    SEROUT2 VinRXD,8588,["ECS",13]
    LCDOUT $FE,1, "1"
    HIGH VinRXD
    PAUSEUS 1000
    SEROUT2 VinRXD,8588,["IPA",13]
    LCDOUT $FE,1, "2"
    HIGH VinRXD
    PAUSEUS 1000
    SEROUT2 VinRXD,8588,["A:",13]
    LCDOUT $FE,1, "3"
    HIGH VinRXD
    PAUSEUS 100
    SEROUT2 VinRXD,8588,["DIR",13]
    LCDOUT $FE,1, "4"
    PAUSEUS 1000
    WAIT1
    IF FLOWIN = 1 THEN WAIT1
    SERIN2 VinTXD,8588,[WAIT(CRET),STR FILE1\12 \CRET,WAIT(CRET),STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET]
    LCDOUT $FE,1, "5"
    
    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]
    X25 = FILE1[0]
    X26 = FILE1[1]
    X27 = FILE1[2]
    X28 = FILE1[3]
    X29 = FILE1[4]
    X30 = FILE1[5]
    X31 = FILE1[6]
    X32 = FILE1[7]
    X33 = FILE1[8]
    X34 = FILE1[9]
    X35 = FILE1[10]
    X36 = FILE1[11]
    
    
    PAUSE 100
    LCDOUT $FE,1,X1,X2,X3,X4,X5,X6,X7,X8,x9,x10,x11,x12
    LCDOUT $FE,$C0,X13,X14,X15,X16,X17,X18,X19,X20,X21,X22,X23,X24
    LCDOUT $FE,$94,X25,X26,X27,X28,X29,X30,X31,X32,X33,X34,X35,X36
    
    
    PAUSE 2000
    goto StartDisk
    Here is the code..i haven't been able to add other functions yet because im still addressing to the problem that i stated earlier..

    oh and one more question, is it really necessary to save the the array values into another byte like for this instance the x's? cant i directly use these array values to be printed to the LCD?

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