用定时器实现数字振荡器  

Realization of Digital Oscillator by Timer

在线阅读下载全文

作  者:李方健[1] 

机构地区:[1]重庆电子工程职业学院,重庆401331

出  处:《山西电子技术》2008年第5期24-27,共4页Shanxi Electronic Technology

摘  要:简要介绍了利用数字振荡器产生正弦信号的方法。常规的方法是将某个频率的正弦/余弦值预先计算出来后制成一个表,DSP工作时仅作查表运算即可。本文利用定时器产生一个2kHz的正弦信号,定时器被设置成每50μS产生一次中断(等效于采样速率为20kHz),利用该中断,在中断服务程序中用叠代算法计算出一个Sin值,并利用CCS的图形显示功能查看波形。中断矢量表用汇编语言编辑,主程序和中断服务程序使用C语言编写。This essay briefly introduces the way to produce sinusoidal signal by digital oscillator.A regular method is to make a form after working out sinusoidal quantity and cosine quantity in advance,and then the table look-at and operation is available when DSP works.However,the essay makes a 2kHz sinusoidal signal produced by timer,which is set at an interrupt per 50μS(equaling the sample rate of 20kHz);Therefore through the interrupt sinusoidal the quantity is worked out in the interrupt service program by iteration technique;And waveform can be searched using graphic display feature.Interrupt vector form is edited by assembly language,while main routine and interrupt service routine are edited by C language.

关 键 词:定时器 中断 数字振荡器 DSP 

分 类 号:TN752[电子电信—电路与系统]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象