USB to USB flash Drive File Copier


Closed Thread
Results 1 to 40 of 223

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    I am not sure what you mean by pins 2 and 3 on the 232?
    And I was using portC in my code.

    The purpose of this exercise is to make sure the PIC is comunicating properly. So look at the PBP manual for the digram to connect the PIC without a 232.

    This way we have eliminated a "variable" in the system that could be causing trouble.

    One PIC and one PC with a couple resistors.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Im sorry about that..what i meant was PORTC.4 and PORTC.5
    and will they be connected to the pins 2 and 3 of the rs232 which i believe is the receive and transmit pins.
    what will be the values of the resistors and where will i be putting them?
    Last edited by newbie; - 2nd February 2010 at 13:44. Reason: additional question.

  3. #3
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Ive did what you told me to do but i had no response from the pc. i even found a code which i think is the simplest serial communication code there is in this page:
    http://www.cornerstonerobotics.org/c...out2_hello.pbp
    though had to do some changes since the code requires PIC16F88
    but still i have no response from the pc...

    i also tried to use serout and serin to see if the pic would work with them but still no success..

    how can this be when the pic works normally with LCDs, pushbuttons, leds etc...

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


    Did you find this post helpful? Yes | No

    Default

    Hi Newbie,
    I am guessing, you do not have the manual. Just put a 1k resistor in series with your PIC ports to the PC. This is to protect the PIC from excessive current, due to the different voltages present in the PC. I suggest you download Realterm (it's free ) and use instead of the Miserable hyperterm in WinDoZE . Send your data inverted without the RS232 converter or if you ARE using it, send your data TRUE.
    Example: serout PortC.4,N9600,["Hello World"]
    You will have to include modedefs.bas if you use the mode aliases T9600, N9600 . . . . and make sure whatever terminal program you use is connected to the same serial port you are using, that alone may be your problem.
    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.

  5. #5
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    it was already too late when i found the right schematic for interfacing the pic to the pc. my pic was already not working with any program probably because i failed to put a 1k resistor like what Joe said the first time i interfaced it. I will purchase a new pic16f877a right away and get going with my project once again.

  6. #6
    Join Date
    Nov 2009
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    finally something good happend...
    i can already print the file names inside the flash drive to the LCD
    the cause of why i could not print anything earlier was maybe because of the timing of the execution of the command. there where probably times when the vdip was already sending data to the pic but the pic was still busy of doing another thing like printing welcome notes to the lcd (or something like that..) so the data could not the printed to the the lcd.so what i can is, the PAUSE command plays a major role.

    as for the printing of the file names, im having trouble arranging the files line by line to the lcd..primarily because they do vary in length and also other weird characters come in between some of the words which i guess are due to the line feed or carriage return..

    does anyone have any idea of how i can save a string into a different variable each time a line feed of carriage return is encountered?
    or are there any alternative way...id like to see it...

  7. #7
    cyrus88's Avatar
    cyrus88 Guest


    Did you find this post helpful? Yes | No

    Default

    hi, izzit possible to connect vdip2 with hyper terminal using max233 instead of max232

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by newbie View Post
    finally something good happend...
    Glad to hear you have something working..
    i can already print the file names inside the flash drive to the LCD
    the cause of why i could not print anything earlier was maybe because of the timing of the execution of the command. there where probably times when the vdip was already sending data to the pic but the pic was still busy of doing another thing like printing welcome notes to the lcd (or something like that..) so the data could not the printed to the the lcd.so what i can is, the PAUSE command plays a major role.

    as for the printing of the file names, im having trouble arranging the files line by line to the lcd..primarily because they do vary in length and also other weird characters come in between some of the words which i guess are due to the line feed or carriage return..

    does anyone have any idea of how i can save a string into a different variable each time a line feed of carriage return is encountered?
    or are there any alternative way...id like to see it...

    Joe's idea http://www.picbasic.co.uk/forum/show...7&postcount=73 is probably the way to do this. Just have the string terminate when EOF is returned.
    Dave
    Always wear safety glasses while programming.

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