[Moved] Are we allowerd to ask for code writing in this forum as a service?

Status
Not open for further replies.

casemod

Member level 1
Joined
Sep 21, 2013
Messages
34
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,618
Code Writing - Frequency calculation for dsPIC

I need to set up the input capture peripheral on a PIC 33F using ASM language.

The objective is to convert a 0 to 1400Hz frequency from an external pin into a 11bit variable ranging from 0b0000000000 to 0b10101000110, however this needs to be calculated on a pulse by pulse basis (period between pulses) as to have a higher refresh rate at lower revs.

**broken link removed**
Attached is the code. Line 128 was set with a dummy 11 bit variable that sets the frequency to 150.8hz.
The resulting variable From the frequency calculation should replace this.
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…