|
|
View previous topic :: View next topic |
Author |
Message |
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
ICD-U64 debugging interface question |
Posted: Sat Dec 18, 2010 6:05 pm |
|
|
Question for the folks that have used the ICD-64 - in the
"How do I connect the ICD-S/u to my own hardware?" FAQ,
( http://www.ccsinfo.com/faq.php?page=connect_icd )
they show pin "B3" being connected for "C Aware Real-Time
Debugging (Optional)". In the text for that FAQ, they
indicate Quote: | "Pin B3 is an optional pin connected to the ICD-S/U
that allows the use of the monitor feature while debugging". |
In looking at the "C Aware Real-time Debugger" documentation
that I found on CCS,
( http://www.ccsinfo.com/content.php?page=c-aware_debug )
They indicate
Quote: | "A monitor allows character I/O to and from
the target platform. The target program can printf to this
debugger window and getc from it." |
I assume this is the monitor referenced in the FAQ on
connecting the hardware - does this mean I can define
any available pin to that function, wire it to the
Target pin 6 (or ICD pin 1) connection in my hardware?
How do I tell the debugger what pin to use (my current
PIC is an 18F14K22 and does not have a pin B3) but it
does have the built in debugging capability. The
FAQ referenced above also indicates that
Quote: | "While pin B3 is recommended for the monitor feature,
any pin on a PIC MCU ... can support this feature." |
I did find the post http://www.ccsinfo.com/forum/viewtopic.php?t=42715
which seemed to explain most of it, however a couple of
questions remain in my mind - on the Microchip docs,
they use pin 6 on the target for LVP while the ICD docs
indicate that pin 6 is used for this monitor function.
As long as I am not using the LVP, is this a conflict?
What happens when the PicKit2 is plugged in to that 6
pin connector ?
While it looks like the "Monitor" function can use any
pin (from the above docs), can it also use the real
UART on the chip - I suspect not since I believe the
actual uart is inverted data for TX or does it handle
that condition (I happen to have the RX and TX pins
unused on my configuration - saving them for expansion).
I have the Pickit2 and it works with MPLAB, but it would
be nice to have the ICD-U64 that integrates with the IDE
in the CCS (my understanding from searching the forums
is that the CCS IDE can't deal with the PicKit2?) Or, am
I just better off staying with the PicKit2 and the MPLAB
mode of debugging ?
Thanks for any "enlightenment" !!
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Mon Dec 20, 2010 9:23 am |
|
|
Nobody has any thought or comments on this ?? Are those of you with the U-64 happy with it ??
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
hobiadami
Joined: 17 Oct 2006 Posts: 35 Location: City of Concrete
|
any solutions? |
Posted: Sun Jul 22, 2012 2:33 am |
|
|
Hello,
I'm trying to solve the same issue, did you manage to solve this?
isn't there a sample circuit and code anywhere that works which we can all download and use as a start?
_________________ www.endtas.com |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Sat Jul 28, 2012 8:59 am |
|
|
Nope - never got any feedback from anybody so I still don't have any idea how many folks have this programmer and if they are happy with it.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1353
|
|
Posted: Sat Jul 28, 2012 6:20 pm |
|
|
I've used ICD-U64 for general debugging, but usually through the CCS IDE debugging interface.
I've never used the monitor functionality, but reading through the compiler manual's description in #use rs232(), it looks pretty easy to setup.
you would do something like
Code: |
#use rs232(debugger)
|
And then use getc() and putc() as normal. You might have to specify a baud rate--not sure on that, but really easy to test out. If you want to use a pin other than B3, then you do something like
Code: |
#use rs232(debugger,xmit=PIN_A7,rcv=PIN_A7)
|
You just have to make sure they are the same pin. This probably means you cannot use a real UART for it.
The only thing stopping me from firing it up myself to try the monitor option is finding parts to make the cable and having enough spare time to actually make it (all of our cables are 5wire atm). I stay pretty swamped.
Debugging in the CCS IDE works out well enough. I've only ever been able to get one breakpoint to work at a time, but I haven't really tried hard. Most of the time I was just debugging small code snippets tossed in a main() for quick test. |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Sat Jul 28, 2012 8:15 pm |
|
|
Thanks for the feedback - I have been interested in the U64 but was unable to find much in the way of comments from other users (either positive or negative). No idea how many people have one even!
I have use the "stream" feature with the RS232 and the PICKIT2 to provide a quick and dirty "monitor" function back to my laptop when I was playing with a fuel sender simulator and a 16F1827 that worked reasonably well (although I did have to futz with the timing of stuff to avoid the serial stream getting corrupted by ISR handling). This the first part of my code for what I had used that worked for my testing:
Code: |
#include <main.h>
#use rs232(baud=9600, xmit=PIN_B7, rcv=PIN_B6, ERRORS, PARITY=N, \
BITS=8, STREAM=MIKEYMON)
////////////////////////////////////////////////////////////////////
//
// Gas Tank Sender simulator using PWM - M. Fields 12-July-2011
// uses the Microchip PICKit 2 18 pin demo board with a 16F1827 processor
// installed. ( DM164120-4 )
//
//
//
//
////////////////////////////////////////////////////////////////////
//
// Gas tank sender information -
// 1984 Toyota Truck, - 2 wires from sender to 2 pin connector.
// - White with black stripe is GND (wiper),
// - White with red stripe is end of resistance wire coil (to gauge).
// Sender resistance - from Toyota Shop Manual:
// - FULL = 3 ohms
// - 1/2 = 32 ohms
// - EMPTY = 110 ohms
//
//
////////////////////////////////////////////////////////////////////
int16 ad_data; // read from A/D converter
int pct; // current percent duty cycle
int duty = 0; // duty cycle control ( 0 - 255 )
int width = 255; // total cycle width
void disp_pct(int duty, int cycle) // display duty cycle percentage
{
pct = ((int16) duty * 100) / cycle ;
fprintf(MIKEYMON,"Duty Cycle = %u%% (%u/%u)\r\n",pct, duty, width);
}
void main()
{
|
_________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
|
|
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
|