Hi,
I want to generate simple musical tones using FTM2 of KEA-128.Is there any reference or sample code for it?
Hi, Vignesh,
I do not think we have the code to generate simple musical tone. But I think you can do the following:
1)use ADC to sample the mic signal with 8KHz or more sampling frequency.
2)save the PCM to an array or even into flash.
3)based on the sampling frequency, you can compute the FTM_MOD value.
4)covert the ADC sample to the duty cycle, I do not suggest you change the sampling frequency, in mother words, the FTM_MOD register is constant.
5)in the FTM overflow ISR, update the FTM_CnV register to change the PWM duty cycle.
For the hardware filtering with inductor/capacitor, I suggest you search on Google with keywords "D-Type AMP"
Hope it can help you
BR
Xiangjun Rong