cancel
Showing results for 
Search instead for 
Did you mean: 

Duty Cycle using PCA

luigi2
Associate II
Posted on March 31, 2005 at 05:23

Duty Cycle using PCA

4 REPLIES 4
luigi2
Associate II
Posted on May 17, 2011 at 12:06

Hello,

I would calculate a duty-cycle usig the programmable counter array but I have confused ideas can to indicate some example to me

TKS

luigi2
Associate II
Posted on May 17, 2011 at 12:06

The interrupt vector for uPsd33xx identifies all interrupt and it is declarer in ups3300.h however the pca interrupt is the number 11

rk1
Associate II
Posted on May 17, 2011 at 12:06

hi,

assumed that you consider ''all-high''=0% and ''all-low''=100% duty-cycle (''active-low''):

duty-cycle = CAPCOM_value / (max_counter_value+1)

if you consider ''all-low''=0% and ''all-high''=100% duty-cycle:

duty-cycle = (max_counter_value+1 - CAPCOM_value) / (max_counter_value+1)

where:

max_counter_value+1 = 2^8 for 8-bit-PWM, 2^16 for 16-bit-PWM

(see datasheet: the output is high when the PCA-counter equals or exceeds the CAPCOM-value)

gianluca2
Associate
Posted on May 17, 2011 at 12:06

I have the same problem,

I'm new to the uPSD, I have a DK3300 board and I want to interface a 2-axis accelerometer with PWM output, so my need is to decode the PWM ratio coming from an external signal.

My problem is the configuration for the interrupt vectors;I can configure the registers following the user manual, but where do I define the interrupt vectors for the PCA?

thank you very much!

:-[