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

    i know so a little bit cant have so large hex code....

    before i set the configuration bit.. the hex code size is small..after i export it..it become large...

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


    Did you find this post helpful? Yes | No

    Default

    Looking at your code you have the TX and RX mixed up and here
    SEROUT2 VinRXD,84,["hello"]
    VinRXD does not exist.

    Try this code without the VDIP. Connect as shown in the comments.
    Code:
    @ __config _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF   
        DEFINE OSC 20
        TXD VAR PORTC.6   'CONNECT TO MAX232 PIN #11
                          'MAX232 PIN#14 TO DB9 #2
        RXD VAR PORTC.7 
        
        StartDisk:
        SEROUT2 TXD,84,["hello",$d,$a]
        pauseus 1000
        GOTO StartDisk
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    when i add in this line

    @ __config _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF

    and compile .. get error

    Error[118] C:\USERS\DESKTOP\PIC16F873A\PIC TO HYT\ABC.ASM 157 : Overwriting previous address contents (2007)
    Error[118] C:\USERS\DESKTOP\PIC16F873A\PIC TO HYT\ABC.ASM 157 : Overwriting previous address contents (2007)

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


    Did you find this post helpful? Yes | No

    Default

    Ok. You must be setting the configuration bits in the *inc file.
    Commnt that line and use those settings.

    Fir more of what I am talking about
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    follow the code u given already success print hello to hyperterminal...

    is that means if i modified the code n connect to VDIP2 module..

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


    Did you find this post helpful? Yes | No

    Default

    Yes, we are going now!!!

    Connect the VDIP to the PC with the MAX232 chip like you had when you saw the firmware message.

    Connect the VDIP's input to the same wire you now have connected to the PC from the PIC.

    What we will do is send commands to the VDIP from the PIC and have the VDIP send the response to the PC...
    We do need to add another connection for flow control. The "FLOWIN" signal from the VDIP will tell the PIC it is OK to send another command. I am using the VDIP1 so check the VDIP2 pin out. I think they are the same...
    Try to connect FLOWIN on a non ADC pin for now. Change the code below to your pin.
    The below should cause the VDIP to diplay on the terminal a
    D:\>
    every 1.5 seconds..
    Code:
    VinRXD  VAR PORTC.6 'DATA TO VDIP PIN #8 ON VDIP1
    FLOWIN  VAR PORTD.6 'FLOW CONTROL FROM VDIP PIN #9 ON VDIP1
    
    START:
    HIGH PORTD.2  'LED
    PAUSE 250
    LOW PORTD.2
    PAUSE 250
    SEROUT2 VinRXD,84,["ECS",13] '9600 TRUE
    HIGH VinRXD
    PAUSEUS 10
    SEROUT2 VinRXD,84,["IPA",13]
    HIGH VinRXD
    PAUSEUS 10
    WAIT111:
    IF FLOWIN = 1 THEN WAIT111
    PAUSE 1000
    GOTO START
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    thx..
    i wan to ask..this
    "HIGH PORTD.2 'LED
    PAUSE 250
    LOW PORTD.2
    PAUSE 250"

    line is for ?

    and why need put this "HIGH VinRXD"line?

    because i test on without the HIGH VinRXD it also can send to the VDIP2 and display to the hyperterminal..
    if that this HIGH VinRX necessary?

Similar Threads

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