Hi all. In our project we have to use the GPIO to control the color of 2 RGB LEDs, and that means 6 PWM signals. From my understanding the DA14580 can generate 4 independent PWM, which is not enough for me. My current approach would be to generate them using a timer, and on each interrupt I will set the on/off state, is this approach acceptable? Would it affect the BLE functions due to high freq of interrupts?
Also, if our project would not need the deep sleep mode, would it be ok to leave the 32.768kHz crystal out? We have a tight budget and space for the project so everything counts.
Thank you in advance!
Device:
Hi winix,
The timer2 can generate 3 different PWM of the same frequency and different dyty cycle, timer0 can generate 2 inversed PWM (one opposite of the other). It depends how frequent your interrupts are going to be. You can replace the XTAL32, when running in buck mode, with the RCX internal oscilator. What you can try is have the three faster PWM to be generated by the timer2 and then you can generate some slower PWM from the timer0 using interrupts.
Thanks MT_dialog