Variating frequency of the sine wave generated on LPC54628.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Variating frequency of the sine wave generated on LPC54628.

ソリューションへジャンプ
1,249件の閲覧回数
Rutvikk
Contributor I
I have been working on a project that requires generation of a Sine wave and variation of frequency and amplitude. I am using the example i2s_dma_transfer from the driver_example included with the SDK but cannot understand how I should manipulate the clocks to variate the frequency. The variation of the frequency has to be in the range of 3.00 Hz to 400.00 Hz. Here I am using the pre-written sine table and also want to change the sine table for 24 bit. But I cannot figure out how to change the values as the normal sine table generator values, when fetched to the array gives an erroneous output. Please if someone can solve my query and guide me to figure out how to go about with this task. If someone has an experience working on the similar project please guide me on how you carried the task out. Thanks.
0 件の賞賛
返信
1 解決策
1,237件の閲覧回数
frank_m
Senior Contributor III

I hade done a somehow similar project years ago. But with a DAC as direct output, and not I2S.

The DAC output was served from a timer interrupt at a 100kHz rate. Within the interrupt, I calculated the sine table index from the current requested output frequency and the timer period, and wrote this value to the DAC. The latter was internal, and thus just a simple 16-bit write. Two ADC channels with attached potentiometers served for frequency and amplitude adjustment in realtime.

Run on a first-generation M3 with 72MHz core clock, it worked sufficiently well up to about 40kHz output frequency.

I suppose this does not really well apply to your case. I am not sure about manipulating the I2S clock, and how an attached device would handle  that.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,223件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

 

The Integrated Inter-IC Sound Bus (I2S) is a serial bus interface standard used for connecting digital audio devices together, not used to generate sine wave. 

 

BR

Alice

0 件の賞賛
返信
1,238件の閲覧回数
frank_m
Senior Contributor III

I hade done a somehow similar project years ago. But with a DAC as direct output, and not I2S.

The DAC output was served from a timer interrupt at a 100kHz rate. Within the interrupt, I calculated the sine table index from the current requested output frequency and the timer period, and wrote this value to the DAC. The latter was internal, and thus just a simple 16-bit write. Two ADC channels with attached potentiometers served for frequency and amplitude adjustment in realtime.

Run on a first-generation M3 with 72MHz core clock, it worked sufficiently well up to about 40kHz output frequency.

I suppose this does not really well apply to your case. I am not sure about manipulating the I2S clock, and how an attached device would handle  that.

0 件の賞賛
返信