View previous topic :: View next topic |
Author |
Message |
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
DEBUGGER - MONITOR PIC18? |
Posted: Fri Apr 28, 2006 5:36 am |
|
|
Guys,
I am trying to get the debugger monitor working on my PIC18F2520 part. The manual isn't clear but I was under the impression that the PGM pin is used for this purpose. On my part it's pin RB5. The manual states that on a PIC16ICD it's RB3. I can't find a setting which relates to this? Just wondering if anyone uses this facility on a PIC18 and can shed some light on it for me!
Keep well,
Will |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Apr 28, 2006 7:39 am |
|
|
I assume you established a successful connection between PC <> IDC <> PIC.
RB3 was used in most 16F series with ICD capabilities, actually RB5 is used
in most 18F series so this is your option.
To enable the built in ICD monitor you must tell the compiler that redirect
the RS232 to the debugger.
#use rs232(DEBUGGER)
Humberto
Last edited by Humberto on Fri Apr 28, 2006 7:58 am; edited 1 time in total |
|
|
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
|
Posted: Fri Apr 28, 2006 7:58 am |
|
|
Yep. PIC is happy and running well. I have used #use rs232(DEBUGGER) and get no output. There is nothing happing on PGM pin which is connected up from PIC to debugger for this purpose!
I assume (and we all know what that makes of us!) that the compiler knows that a PIC18 had PGM on a different pin to PIC16? |
|
|
Will Reeve
Joined: 30 Oct 2003 Posts: 209 Location: Norfolk, England
|
|
Posted: Fri Apr 28, 2006 1:25 pm |
|
|
Fixed it! Turns out that RB3 is hard programmed into the DEBUGGER! As the extra wire in the ICD cable is meant for the PGM pin I would have thought that it would automatically select it depending on the part! One for the CCS wish list I think!
You have to use
#use rs232(DEBUGGER,xmit=PIN_B5,rcv=PIN_B5)
to get it to work!
Keep well,
Will |
|
|
|