2018-10-17 03:23 AM
Actually i wanted to genrate single sine wave and multiplex it to 8 channels.Basically i need to generate fsk signal.
for logic1-980 HZ
for logic 0-1650Hz
2018-10-17 11:45 AM
> Can we generate Sine wave using timer
Do you want to use timer-generated PWM as DAC? Doable, but requires quite a lot of resources. You'd need to run PWM at significantly higher rate than the higher of the frequencies (i.e. tens of kHz up to maybe 100kHz) and have an analog filter after it. You also need to change the PWM's fill factor to generate the sine, preferrably from a table using DMA, so that the processor is not overloaded by interrupts.
1 channel should be fairly simple - you may want to look at [STM32Cube_FW_L0_V1.9.0]\Projects\STM32L053R8-Nucleo\Examples\TIM\TIM_DMA - but get the 'L0 to do this in 8 channels will be challenging...
JW
2018-10-17 12:19 PM
>>but get the 'L0 to do this in 8 channels will be challenging...
Could likely emulate 8-channel PWM by driving a pattern buffer to a GPIO bank using DMA+TIM
2018-10-17 01:02 PM
>>but get the 'L0 to do this in 8 channels will be challenging...
>Could likely emulate 8-channel PWM by driving a pattern buffer to a GPIO bank using DMA+TIM
For 8ch FSK? Don't think so.
JW