03-23-2015 01:47 PM
hello, i am building a robot for my final year project, i want to control it using a remote called SANWA and a receiver RX600. I want to read pwm signals from the receiver pin to control my motors using myrio. I did a code to read those signals but i can seem to analyse it in order to distingwish between different commands of the remote. Any help please?? i will uppload my code
03-23-2015 03:02 PM
Hi,
Reading a PWM signal is same as generating it from a DIO pin, but in reverse. You will have to go step by step. First thing you probably need to do is reading the number of pulses from your PWM signal. Do that by monitoring either the rising or falling edge of the pulse and by this way you will have your count.
Next, you will have to monitor how long the pulse is ON (duty cycle). Create a case structure for rising edge and then using milisecond timer value you will have the milisecond duty cycle (the case will run as long as the pulse is on, so this way you will have the time for which pulse was on).
There my be other ways too, but begin your analysis by first counting the pulses, check what time it was on and what time it went off and this way you will have your PWM time period.
Regards.
03-25-2015 12:16 PM
Thank you very much and sorry for the late reply, i will start by monitoring the pulses as you allready suggested
Thanks again
Regards