2024-11-22 02:15 PM - edited 2024-11-22 02:22 PM
Hi,
still working on the electronics design (pairing pins to external devices) and attached is the .IOC file.
We need to read a quadrature encoder (ideally also with the index). But we have wired the micro/PCB as per attached IOC file.
The pins that we would like to use are: uC_IO_EXP_1, uC_IO_EXP_2, uC_IO_EXP_3 and uC_IO_EXP_4 because they are the ones that go to the external PCBs (currently set to "pinned" in the IOC file).
But with the current timer configuration the encoder mode does not seem to be available on those pins despite being timer pins.
I tried rearranging timers and functionality, but haven't yet found a way to enable the encoder functionality.
Could someone please help with the configuration?
The only constraint is that as long as the other PWM signals (they are named with "PWM" in them) provide a PWM output on those pins, the timer currently assigned to them can be changed to another one.
If it is not possible then could you please suggest the next lowest CPU intensive solution that use some peripheral (i.e. not GPIO interrupts because the speed of the encoder can sometimes be quite high and we want to leave plenty of room for CPU to do very many CPU intensive other tasks in the future).
Any suggestion is very much appreciated.
Thank you as always :)