Joined: 10 Jun 2004 Posts: 9 Location: Huntsville, Al
Example Input Capture code for PIC18F2431
Posted: Thu Jun 10, 2004 11:30 am
Does anyone have any examples in C on how to use Input Capture with an 18F2431 or any 18Fxx31 chip? I downloaded the latest version of the CCS software, looked in the 18f2431.h file and didn't see any information on setting up IC. There were ISRs for Input Capture and a IC special event trigger for the ADC but no setup or use. I do have some assembly example code but I'm not very familiar with assembly and prefer C.
Thanks,
David Adams _________________ David Adams
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
Posted: Thu Jun 10, 2004 5:20 pm
Take a look at the CCS example file EX_CCPMP.C in the \Examples directory. It is written for PIC18F452 but you should be able to modify to for your PIC with no trouble.
Macro
Joined: 10 Jun 2004 Posts: 9 Location: Huntsville, Al
Posted: Fri Jun 11, 2004 1:25 pm
Thanks, I've actually looked at that example before but it's not exactly what I need. I need and example of setup and use of the Input Capture module that is on the 18fxx31 chips. _________________ David Adams
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum