rjrodrig
Joined: 09 Sep 2009 Posts: 7
|
Can't Program my chip PIC24FJ64GB002 |
Posted: Fri Dec 27, 2013 7:11 pm |
|
|
I am using a ICD-U64 Version 3 hardware, and I generate a simple code using the wizard PIC24.
when I attempt to program the device I get this error message
"This program mode is not supported for this chip". I have a suspicion the issue is related to the "#FUSES" or configuration bits.
At first (first 2 programming trials) I was able to read and program some data, however it failed verifying the code. after that I can't program the chip because it claims that the program mode is not supported.
I am not entirely sure what the issue is but I am trying to get a quick answer from those of you with similar symptom. Please let me know.
The code is shown below all generated by the wizard. This should run since it is bare bones. Yet I get an error from the programmer
Code: |
CCSLOADER ERROR CODE
17:07:56 Attempting to connect
17:07:57 Scanning file: C:\Users\ROBERT\Documents\CCS C Projects\Demo2\DEMO2.hex
17:07:57 Assigning chip: PIC24FJ64GB002
17:07:57 Loaded: PIC24FJ64GB002
17:07:57 This program mode is not supported for this chip
17:07:57 Assign target failed: This program mode is not supported for this chip
17:07:57 Scanning file: C:\Users\ROBERT\Documents\CCS C Projects\Demo2\DEMO2.hex
17:07:57 Assigning chip: PIC24FJ64GB002
17:07:57 Loaded: PIC24FJ64GB002
17:07:57 This program mode is not supported for this chip
17:07:57 Assign target failed: This program mode is not supported for this chip
17:07:57 Assigning chip:
17:07:57 Running target
|
Code Demo2.h
Code: |
#include <24FJ64GB002.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOJTAG //JTAG disabled
#FUSES CKSFSM //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOPR
#FUSES FRC_PLL //Want to use internal clock 4MHz
#device ICSP=1
//UART
#use delay(internal=16MHz)
#pin_select U1TX=PIN_B13
#pin_select U1RX=PIN_B14
#use rs232(UART1, baud=9600, errors, stream=RS232)
//LED
#define LED PIN_A0
#define DELAY 1000
|
Code: |
HEADER FILE
#include <DEMO2.h>
void main()
{
//Example blinking LED program
while(true)
{
output_low(LED);
delay_ms(DELAY);
output_high(LED);
delay_ms(DELAY);
}
}
|
|
|