CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 10 matches
CCS Forum Index
Author Message
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: 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: 26
Views: 9710

PostForum: 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 ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Thu Aug 08, 2024 12:58 pm   Subject: General advice - first time programmer
To debounce a switch input you would not use an external interrupt or a change interrupt at all. Just poll the pin input at a regular interval and look for a stable change of state.
An interrupt on ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Thu Aug 08, 2024 6:56 am   Subject: General advice - first time programmer
You are right on this chip. On most chips they are not relocatable.
However using the interrupts, you will have problems with bounce.
Understand they a simple keyboard may well give a dozen or more ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Mon Aug 05, 2024 9:34 am   Subject: General advice - first time programmer
Going back to an earlier point, are you sure that PPS can't be used with external interrupts? According to the data sheet for the PIC24FJ256GB210 family of devices The peripherals managed by the PPS a ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Fri Aug 02, 2024 6:51 am   Subject: General advice - first time programmer
Thanks for sharing that vital info, I missed that. I see now that I can't use those pins as interrupts as the interrupts are not PPS, but are dedicated pins.

So if I were to use the suggested appr ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Thu Aug 01, 2024 10:12 am   Subject: General advice - first time programmer
Thank you for all the valuable info. I think I have overcomplicated my initial description. After further reading into the compiler and chip, I think I found an approach that will work. My use case is ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Wed Jul 31, 2024 7:47 am   Subject: General advice - first time programmer
As a follow up to the interrupts discussion, I have a few more questions. I understand now that the interrupts are enabled via two bits (the global and individual bit).

When I read the data sheet ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Fri Jul 26, 2024 1:57 pm   Subject: General advice - first time programmer
Thanks for the info. I have been reading the Microchip's datasheet for the PIC24FJ256GB210 Family of devices. I am still learning what some of the lingo means, I also have the book "making embedd ...
  Topic: General advice - first time programmer
reelthymes

Replies: 26
Views: 9710

PostForum: General CCS C Discussion   Posted: Fri Jul 26, 2024 12:58 pm   Subject: General advice - first time programmer
Hi,

I have tested embedded systems before but this is my first time developing firmware itself. I have a few questions. I have a device that already has an existing firmware codebase, I am just try ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group