I need to handle PWM output from a single channel of an R/C receiver. I want to count the width of the pulse roughly in 4ms increments, and based on different widths take action by switching LEDs (20-40 mA) on and off.
I know how to do this using an Arduino but would like to know if it is possible to do the same thing using a simpler (and cheaper) programmable device such as a CPLD or small-scale FPGA. Basically I need to time the pulse edges and manage the on-off states of outputs. If the outputs can sink the LED current so I don't need to add transistors, that would be a plus. Ideally I'd like to be able to handle steady state as well as flashing.
There seem to be a lot of parts that can generate PWM (i.e. motor drivers) but not as many examples of PWM decode, apart from Arduino examples. Which device(s) would you use to solve this problem?