Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Problem about DA IP

Altera_Forum
Honored Contributor II
1,168 Views

:confused:  

Hi,friends. 

I design a DA IP and add it into the SOPC systerm.The DA(AD5547) IP has output pins :wr,ldac, dataout and so on,besides I set a set of general PIOs to send digital signal to Avalon Bus。That means now I have input signals and da control signals.The problem is I don't know how to deal with the software during the Nios IDE. 

 

Now,I write the programme as list,but the result is not a sine wave but a weird signal with cycle. 

static void Timer_ISR(void* context, alt_u32 id) 

BUFFER=IORD_ALTERA_AVALON_PIO_DIRECTION(PIO_1_BASE); 

IOWR_ALTERA_AVALON_PIO_DATA(DACOK_BASE,BUFFER); 

 

Thanks a lot!Looking forward for your help!:)
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
492 Views

If you want to read the PIO pins, you need to use the IORD_ALTERA_AVALON_PIO_DATA macro. The one you use will just report you the directions of the pins. 

Then for your own component, you should either define your own macros, or directly use IOWR(). Just write the data to the correct address.
0 Kudos
Altera_Forum
Honored Contributor II
492 Views

Thank you ! 

I got it!I have revised it but the result is not so good.Maybe I have a big problem during the DA IP designing.
0 Kudos
Reply