Yesterday I breadboarded up my new PIC24HJ12GP202 and wrote a quick C30 blinky program to flash LEDs on RB12-15. No problems. That worked fine.
This morning I plug it in and it's flashing away fine. I make a trivial change to the program - nothing that would cause any problem at all, compile and program. And... nothing! It's dead! WTF?
I've checked everything I can think of but can't get a flash out of it. Tried to use the PICkit2 as debugger but it gives "PK2Error0028: Unable to enter debug mode"
The simulator runs the program just fine. Exactly the same as yesterday.
Can you guys "stupid check" this code. Have I made a mistake I can't see?
It programs with no complaints, but if I do a separate Verify I get this: "PK2Error0027: Failed verify (Address = 0xF80010 - Expected Value 0xFF - Value Read 0xA)"
Can't help with that. Just want to tell you that, if you want to set the particular bit (bits) of the register in C30, you can do it this way, underscore:
_LATB15 = 1;
instead of that long register name and bit name.
Can't help with that. Just want to tell you that, if you want to set the particular bit (bits) of the register in C30, you can do it this way, underscore:
_LATB15 = 1;
instead of that long register name and bit name.
You got that right! The 30F has reasonably normal directives. Looks like the 24H stuff was designed by different people, and is cryptic as hell. Geesh, why make it so difficult?
The only reason I can think of for the strangeness I experienced this morning is maybe my VDDCORE regulator capacitor is a bit small. It's at the extreme minimum of the range they suggest in the datasheet. It's the only tantalum I had.