Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Help-about peripheral IP design

Hi,dear friends.

Recently I have done a DAC IP as a Nios peripheral but it doesn't meet the requirment.I do this IP as the example "pwm" from Altera.com.Now I send a series number to the dac(AD5547 parallel) output during the Nios IDE,the numbers are signals of 40KHz sampled by 1MHz.The output displayed in the oscilloscope is 23.0147KHz,watching the register during debugging ,all numbers have gone into the register.So I'm confused and then I reminded the cpu as fast,the result became 37.3130KHz.It's hard to understand what happened.

So I think maybe there are some problem between the transmition.So I consider some methods as list:

1、 SPI,but it is series peripheral interface,AD5547 is parallel,so it may doesn't fit.

2、 DMA

3 、FIFO

But I really don't know how to send the numbers to the DAC output.Maybe what I have done is totally wrong.

Could you give me some suggestions of how to design DA or AD peripherals?:)

Thanks a lot!

ps:

while(1)

{

for(i=0;i<=24;i++)

IOWR_ALTERA_AVALON_PIO_DATA(DATAOUT_BASE,sin_vector1[i]);

}

and I set the DAC control pios as the timegraph so DAC works normally.

11 Replies