|
|
View previous topic :: View next topic |
Author |
Message |
xxopiumxx
Joined: 01 Jul 2011 Posts: 20
|
Doubt about CCS USB debug |
Posted: Wed May 30, 2012 10:39 am |
|
|
Regards:
I'm working in several projects using the CCS USB libraries; and eventually I have have to overcome problems regarding to communication that should have been much easier to solve if I have had a proper debugging method.
Anyway, the question is: I can't get tired of finding lines like:
Code: | debug_USB(debug_putc,"\r\nPUT %X %U %LU",endpoint, tgl, len); |
I have never managed any PIC debugging system, but, how can I get to read those debugging messages during the testing of a device?
I assume that I do, but can I edit my own messages? Can I use it to get debugging information of any part of the code?
Thanks, I sorry for the newbie question. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 30, 2012 5:49 pm |
|
|
You need to have a RS-232 serial port connection between the hardware
UART pins on your PIC, and your PC. You will need an RS-232 level
converter circuit. If you bought your board from CCS, it probably has
the circuit and a connector. It may come with a cable to connect between
the board and your PC. You will also need to install a terminal program
on your PC, such as TeraTerm, and configure it for a 115200 baudrate
You also need to add the following line, so it's above all the other USB
#include file lines, in your main program file.
Code: |
#define __DO_DEBUG_USB
|
Some of this might change, depending upon your PIC. Always post your PIC. |
|
|
xxopiumxx
Joined: 01 Jul 2011 Posts: 20
|
|
Posted: Mon Jun 04, 2012 9:40 am |
|
|
Thanks for the answer.
I have done all that your recommend; but I have a problem.
Before anything my dev is a PIC18F4550.
The thing is that when I activate the USB debugging, the device doesn't get enumerated anymore.
That, under a PC with a 2.0 USB, but in another one with 1.1 USB, it does get enumerated, and works fine.
In my descriptor library the version number is define as 1.1; but the device works great under 2.0, except for the debugging.
Any tips? |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|