USB CDC help..


Closed Thread
Results 1 to 7 of 7

Thread: USB CDC help..

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    I really don't understand why people persist to use CDC while life could be easier and better using the real USB protocol...
    http://www.picbasic.co.uk/forum/showthread.php?t=5418
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Nov 2008
    Posts
    9

    Default

    The reason I want to use CDC is because its already made, and I don't have to mess with VB. I don't know anything about it so i kinda wanted to start out slow and just have to work with PBP.. When i get better I will use the HIDmaker and figure out all that stuff. I have used you USBdemo and it works very well so I will study it later and try to figure it out. Does anyone know whats wrong with my code? please help.. thank you

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Just to make sure of everything
    You're using a 4MHz crystal (or resonator)?
    Which PC terminal software are you using?
    On the PC side, are you sending 16 character at the time?
    Are you using the Microchip bootloader? If so could you post your .HEX code? Not sure if Microchip bootloader work in CDC mode
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Nov 2008
    Posts
    9

    Default

    I am using 4Mhz and I am using the serial comm in Micro code studios plus. I am not sending 16 bytes just pressing enter, but this works just fine when using the Cdc demo. I am using Microchip bootloader, and again this works just fine using the CDC demo from PBP. I don't have my hex code here since I am at work, I can do that as soon as I get home. I even tried servicing the USB more often and that didn't work either. I don't understand since the programs are identical, the only difference is how I set the buffer in my code. Thanks for your help. I only wish I was good enough to use the USB protocol and dll along with VB. Some day.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    if you receive ASCII character, you shouldn't need to reconvert them... well I think

    BUT BUT BUT... i should have see this line WAY before
    Code:
    for x = 2 to 0 step -1
    buffer[x]=(y dig x) + $30' find digit & convert to ASCII
    next x
    end 
    buffer[3]=13
    buffer[4]=10
    buffer[5]=0
    
    goto outloop
    remove that END and the problem should go forever...
    Last edited by mister_e; - 22nd November 2008 at 21:20.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Nov 2008
    Posts
    9

    Default

    OMG!! You are awesome, i cannot believe I didn't see that.. This is what i get for copying parts of other codes and putting it all together.. Thanks man.. I just posted in the Nokia LCD post. I have a problem and was wondering if someone could help me.. Can you take a look at it. Its in the Color LCD post.. Thanks again man..

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. USB Bootloader.
    By HenrikOlsson in forum USB
    Replies: 22
    Last Post: - 2nd May 2013, 02:46
  3. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  4. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

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