Forum Discussion
Altera_Forum
Honored Contributor
16 years agoProblem about DA IP
: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!:)2 Replies
- Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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.