Help for usb communincation

Discussion in 'Embedded Systems and Microcontrollers' started by greenofboy, Apr 7, 2012.

  1. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    Hello
    I'm an engineer student and i'm working on a project that consist to measure all kinds of electrical signals , it is a numeric oscilloscope linked with computer by USB port.
    Currently i'm on realization step and i found some problems concerning the device PIC 18F4550.
    I'll try to explain my problems as clear as possible and i hope i'll get an answer.


    Normaly, electrical signals will be shown in GUI(graphical user interface) made by C++ which detect PIC as RS232.
    That's why i used CDC framework to convert acquired data from USB port to RS232 .
    then driver installation is acquired so i install CDC RS232 emulation demo given by Microship.
    but my computer detects troubles that you can see in the pictures below .

    [​IMG]


    [​IMG]


    Is the problem linked to the driver or to the setting of the HEX file compiled by MPLAB C18 ?


    Looking forward to hearing from you .
    Thank you
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    has nothing to do with mplab, either your driver is not correct one or there is a resource conflict.
     
  3. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    It's none of the above your chip is not working long enough to load the driver most times it's a bad cable coming from the usb or the worng cap on VUSB
     
  4. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    Hmm..

    The only thing mentioned that it could not have anything to do with is the HEX file. It could indeed be the driver, the cable, a resource conflict or even the host adapter on the PC. Did you try a different USB port? Could be that too.

    If checking all those does not resolve the issue, you may need to update the MB BIOS on your PC or the souhtbridge drivers in the OS.
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    See if you have a sample Microchip application that is in any way compatible with your hardware. Load it and see if you can connect to it. That eliminates this being a hardware issue.

    Use a release build. If you have the debugger stopping the target's code you will get the same error report.
     
  6. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    There a sample hex that you can check your hardware with in the MicroChips USB stack files you can even load the pickit2 firmware to test your hardware if you have the pickits software.
     
  7. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    i put 470nf is it enough?
     
  8. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    Thank's for your reply
    But i don't think so because i my PC recognizes the driver with a different schematic(even in ISIS circuit designer) so that's why i'm thinking about the hex file!!
     
  9. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    i don't understand your reply
    But for hardware issue i'm totally sur that is no problem over there; because as i mentioned in the previous reply my PC recognizes the chip(18f4550) but with another Hex file
    i was read about Microchip apllication for CDC but i have my main that has instructions to do ,for the example given by microchip where i can put my main and if i put it the bootloader will usualu functions for my chip
     
  10. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    i tested no hardware problem even in circuit designer ISIS
     
  11. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    You could post your code that would help you may just have the chip set wrong
     
  12. greenofboy

    Thread Starter New Member

    Mar 15, 2012
    8
    0
    This the files project attached
    and also the main here
    Thank you all for help
     
Loading...