Can I ask, are the programming pins part of PORTB?
if so
Code:
TRISB = 0x00;
TRISC = 0x00;
Would make the PORTB6&7 (PGD and PGC) "move" and screw up debugging.... Just to test, try { TRISB=0xC0; } and see if it'll debug... I've not got one to hand to test it... I always try and leave the pgm/debug lines clear of anything if it's going to be debugged, but could be wrong (BD ;-))
NEAL
2. Essential both RB6/PGC and RB7/PGD must be kept free during either ICSP (Programming) or ICD (Debugging).
Therefore, you will need to free both RB6 and RB7 from other tasks and remove/reassign any connections to external components which could interfere with the ICSP or ICD tasks.
Reference: PIC18F2455/2550/4455/4550 Data Sheet, Section: 10.2 PORTB, TRISB and LATB Registers, Table: TABLE 10-3: PORTB I/O SUMMARY, Page: 118
Note 3: All other pin functions are disabled when ICSP™ or ICD operation is enabled.
1. You need to upgrade the MPLAB IDE to a more recent version, I'm not sure v3.40 even supports the PICkit3. I'm currently at MPLAB v8.70.
I would also recommend upgrading the Microchip C18 to the latest revision as well.
2. Essential both RB6/PGC and RB7/PGD must be kept free during either ICSP (Programming) or ICD (Debugging).
Therefore, you will need to free both RB6 and RB7 from other tasks and remove/reassign any connections to external components which could interfere with the ICSP or ICD tasks.
Reference: PIC18F2455/2550/4455/4550 Data Sheet, Section: 10.2 PORTB, TRISB and LATB Registers, Table: TABLE 10-3: PORTB I/O SUMMARY, Page: 118
Sorry BigDog i forget to tell MPLAB Version its 8.83 much newer(not that much old)
While my MPLAB C18 Compiler version is 3.40 and now 3.43 is in market so i think i having that too new....
From the above discussion it looks like that, its the issue due to the Programming and Debugging pins RB6 and RB7 i will try to change these pins..
I will report soon if it works.....
Thanks for your help
Can I ask, are the programming pins part of PORTB?
if so
Code:
TRISB = 0x00;
TRISC = 0x00;
Would make the PORTB6&7 (PGD and PGC) "move" and screw up debugging.... Just to test, try { TRISB=0xC0; } and see if it'll debug... I've not got one to hand to test it... I always try and leave the pgm/debug lines clear of anything if it's going to be debugged, but could be wrong (BD ;-))
NEAL
We'll get you there mate, don't worry, you're in the best of places!!
I found all sorts of strange things can screw up debugging sessions, changing the OSCCon value on a 16f723 is one example that foxed me for a while... :-| If I'm using the whole of PORTB I normally put 2 jumpers in for the programming pins for isolating them from their loads while its programming... SMD-DIP-switches would be ideal, but I've not scrapped any printers recently and haven't come accross them....
I'm just discovering the release MPLABX isn't going to work with my MCD2 so looks like a PK3 is my next choice...
And I've got a BIG LOAD of sample PICs (A BIG THANKS "MICROCHIP.Com's Sample", I AM YOUR BIGGEST FAN!), 16F88's, 24FJ & HJ, DSPIC33's and 32Mx's to "play with" so if we get you working on this I'll "vow" to get one