PICDEM FS and USB


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    I don't see why you would need to write your own driver. CDC class can use the Windows generic driver already available with Windows.

    Microchip & PBP both offer example programs for CDC class USB communications.

    As for data rates, download & review the USB 2.0 & CDC class documents from http://www.usb.org These explain in detail what data rates you can expect depending on the USB transfer type you're using.

    You might also want to take a peek at Microchips' AN956; Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software.

    Any route you take is going to involve some serious study time. USB is pretty complex.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Gab25's Avatar
    Gab25 Guest

    Default

    I tried to use the microchip example "Run time linking" but I can't see the correct value of the potentiometer.

    Code:
    #define RD_POT	0x37			
    send_buf[0] = RD_POT;				
    send_buf[1] = 0x02;              
    SendReceivePacket(send_buf,2,receive_buf,&RecvLength,1000,1000);
    printf("\n%x %x %x\r\n",receive_buf[0],receive_buf[2],receive_buf[1]);
    If I try to read the Firmware Version it works great. Any Idea?

    Another part of the example:

    switch(dataPacket.CMD)
    {
    case READ_VERSION:
    dataPacket._byte[2] = MINOR_VERSION;
    dataPacket._byte[3] = MAJOR_VERSION;
    dataPacket._byte[4] = MINOR_VERSION;
    dataPacket._byte[5] = MAJOR_VERSION;
    counter=0x06;

    Why I can't send 6 byte or more...but only 4?

    Thanks and sorry for my english
    Last edited by Gab25; - 16th October 2006 at 17:28.

  3. #3
    Bala Chandar's Avatar
    Bala Chandar Guest

    Default PICDEM FS and USB

    Hi Bruce,

    Thanks a lot for your post on USB. I am one of those countless people to have benefited from your site and code examples. You have the knack to explain things in a lucid manner, with the result, I don't merely copy your code, I learn to generate my own code.

    I have been using PICs for my projects for the past 5 years and PBP is my compiler. As you have rightly pointed out, USB is a fairly complex subject and you need to do some serious learning if you want to incorporate USB connectivity in your projects. Of course, the degree of difficulty varies depending on what you want to do with the USB.

    Now, my question: Where is the code example in your site? When I click on the link you have given (http://www.rentron.com/images/USB_MAIN.gif), I only see the gif image of the screen shot of the VB program.

    Awaiting your reply.

    Regards,
    Bala

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    Hi Bala,

    I haven't had time to finish this project, but you're welcome
    to download the project files as-is from this page:
    http://www.rentron.com/PicBasic/PIC_USB.htm

    When I can find some spare time, I'll finish the project.
    Until then, anyone using these files will need to figure
    things out by referring to the source code comments.

    It's going to be a while until I have time to finish this one,
    but it should help a few folks get started.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. USB Bootloader.
    By HenrikOlsson in forum USB
    Replies: 22
    Last Post: - 2nd May 2013, 02:46
  2. General USB questions
    By BobEdge in forum USB
    Replies: 2
    Last Post: - 21st April 2009, 04:19
  3. Analyzing USB Comm
    By kirtcathey in forum USB
    Replies: 13
    Last Post: - 11th January 2009, 21:27
  4. USB power definitions
    By RYTECH in forum USB
    Replies: 5
    Last Post: - 24th June 2008, 18:40
  5. Replies: 1
    Last Post: - 7th November 2007, 20:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts