Thanks everyone for the valuable input! Im commited to make this project work so since im really new to micros you will read about me a lot around here.
I think that at this point the hardware capture solution that Acid´s is bringing is more processing effective but i wonder what solution is left for hardware driving the servos once the four capture pins are the same than HPWM command use. Hservo approach would work instead?
Im trying to save as much proccesing power as possible for sensor fusion and PIDs.
My goal is:
- Reading 4 PPM channels (Hardware based thru FTIOA-FTIOD ???)
- Reading 4 Analog sensors (ADIN command or hardware based???)
- Reading 1 SPI sensor (This would be great but can get rid of it if its too much in terms of pin count or processor overhead)
- Compute sensor readings and generating output data.
- Serial outputting for telemetry data (HSEROUT pins 19/20?)
- Otputting to 4 servos (Hardware based??)
I know that every approach may have its own restrictions and iterations with other commands, so first step would be successfully having the 4 PPM channels captured, analog sensor readings and the output for the 4 servos, then the rest.
I was not aware about the serialization of the PPM channels, i was expecting no more than 2-3ms for each channel reading (PULSIN) but it seems that is taking 20ms every channel, now i know what happens! Im reading channel 1 to 4 but maybe internal serialization is in different order.
Thanks again for all the feedback, I hope you can help me.