2018-02-05 06:31 AM
Hi!
I'm looking for an example, or if anyone could guide me how to setup a SPC560P50 for rpm/pulse measurement.
We are talking about 4 shaft sensors which will pulse 36 pulses/rev. Shaft speed is 0 - 8000rpm.
I want to be able to measure the rpm of these shaft in the 'smartest' way (with other words using the mcu's built in capabilities).
I know I could go by just setting up regular ext. interrupts and calculate in software, but am I right to think that using the quadrature encoding Timers is the best way to do this?
Also if the solution would be applicable to a SPC560P40 it would be great!
Thanks!
/Chris
2018-02-06 05:15 AM
Hello Chris ,
i recommend you to use eTimer (Cf Screenshot)
There is some examples how to initialize this IP (eTimer)
SPC560Pxx_RLA PWM-ICU Test Application for Discovery
Best regards
Erwan
2018-02-07 12:32 AM
Thank you Erwan!
I have read about the eTimers in 'RM0022' and also tried to figure out and understand how the
SPC560Pxx_RLA PWM-ICU Test Application for Discovery
example works.But where can I access to set all the eTimerst parameters and registers described in 'RM0022'?
The only eTimer parameters I seem to find in SPCStudio is 'Capture mode, HI/LO', 'clock f' and 'call back function names'?
/ Chris
2018-02-09 01:06 AM
Hello Chris ,
SPC560Pxx_RLA PWM-ICU Test Application for Discovery is just an example.
For Quadrature-Count mode, you need to redevelop :
you need to set correctly the PIN
Enable the PCTL associated for eTime
set the registers to configure your Capture unit
You can access to the registers by this file cf RM022
Best Regards
Erwan