Author |
Message |
Topic: General advice - first time programmer |
reelthymes
Replies: 30
Views: 21150
|
Forum: General CCS C Discussion Posted: Mon Jan 27, 2025 9:02 am Subject: General advice - first time programmer |
[quote=
In the 'code library' here you'll find someone converted the BUTTON() function from another source into CCS C. It works and it has several 'options', like active high, active low,timings. It' ... |
Topic: General advice - first time programmer |
reelthymes
Replies: 30
Views: 21150
|
Forum: General CCS C Discussion Posted: Mon Jan 27, 2025 7:54 am Subject: General advice - first time programmer |
Hello,
I have a PIC24 device and I use MPLAB 8.x and the CCS compiler. I am posting in the original thread I created and here is a summary again of my use case:
I want to simply read the state o ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Dec 03, 2024 9:00 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Following the suggestion of a Microchip thread, I did the following and now I'm able to step through the code.
Select Debugger > Settings > Select 'program after successful build"
Af ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Dec 03, 2024 8:39 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Build configuration has been set to Debug from the beginning.
I tried using the code example you gave above and I'm seeing the same error. When I try to step through the code, MPLAB launches a pop ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Dec 03, 2024 7:48 am Subject: CCS command for setting programming/debugging pins on PIC24 |
You need to tell the compiler to compile for DEBUG. This is separate from
selecting the pins.
What environment are you working in?.
In the CCS IDE, if you select ICD=2 as I show, then it will de ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Dec 03, 2024 7:09 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Yes, as I said the ICSP is fine, I'm not worried about that.
And I have no issues compiling or even programming the part, the issue is with debugging.
For some reason, whenever I attempt to to ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Mon Dec 02, 2024 1:31 pm Subject: CCS command for setting programming/debugging pins on PIC24 |
Use:
#define __USB_PIC_PERIF__ 1
#include <24FJ256GB206.h>
//#device icd=2 //Use if you want to debug
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#fus ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Mon Dec 02, 2024 11:57 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Also look at your #use delay() as it has the capability of changing your clock fuses depending on where you place it and what options you select (and they don't reference fuses so you may not know it ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Wed Nov 27, 2024 9:54 am Subject: CCS command for setting programming/debugging pins on PIC24 |
I am still getting the error from MPLAB that my device is not ready for debugging. Someone on the Microchip forum asked the following question:
Which oscillator option have you selected in the CONF ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Nov 26, 2024 12:03 pm Subject: CCS command for setting programming/debugging pins on PIC24 |
UPDATE:
I moved the line
#device ICD=2
higher up in the code, and this has solved the compiler error I was seeing before. |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Nov 26, 2024 11:11 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Just a note that you can program on any of the interfaces without needing to set anything (they are all internally connected for programming).
In light of that fact, what do you think the below lin ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Nov 26, 2024 10:55 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Thanks, I checked the manual and I see the following:
ICD=TRUE
Generates code compatible with Microchips ICD debugging
hardware.
ICD=n
For chips with multiple ICSP ports specify the por ... |
Topic: CCS command for setting programming/debugging pins on PIC24 |
reelthymes
Replies: 24
Views: 11263
|
Forum: General CCS C Discussion Posted: Tue Nov 26, 2024 7:27 am Subject: CCS command for setting programming/debugging pins on PIC24 |
Hi,
I have inherited a design and code for a PIC24-based device. I am using MPLAB v8.92 with the PCD CCS compiler. Recently I have tried to debug the PIC24 using a PicKit3 programmer/debugger but t ... |
Topic: General advice - first time programmer |
reelthymes
Replies: 30
Views: 21150
|
Forum: General CCS C Discussion Posted: Fri Aug 09, 2024 9:26 am Subject: General advice - first time programmer |
void main(void){
static unsigned int16 last_PIN_B6 = PIN_LOW; // assuming initial state
// setup timer 5 to some reasonable debounce time
}
regarding setting ... |
Topic: General advice - first time programmer |
reelthymes
Replies: 30
Views: 21150
|
Forum: General CCS C Discussion Posted: Thu Aug 08, 2024 1:58 pm Subject: General advice - first time programmer |
Or I suppose as Ttlemah previously stated, I could use a timer interrupt?
That's also an option. I have a few programs where I have a spare interrupt running that takes a 16 bit variable, shifts ... |
|