- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i have set one i/o pin to bidirectional(tri-state) I/O port,and finished the hardware compile.
but in the nios II IDE ,how to set the bidirectional(tri-state) I/O port to out por ! the following is my code (the name of pio is ADATA) int main() {//dir=0; //IOWR_ALTERA_AVALON_PIO_DATA(LEVELCONTROL_BASE,1); IOWR_ALTERA_AVALON_PIO_DIRECTION(ADATA_BASE,0XFFFF); //alt_irq_register(TIMER_0_IRQ,0, handle_Timer0_interrupts); //IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER_0_BASE, 0X1F40); //IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER_0_BASE, 7); IOWR_ALTERA_AVALON_PIO_DATA(ADATA_BASE, 0XFFFF); while (1) {;} }! but when i test the value of the pio ,there is no value(even i set IOWR_ALTERA_AVALON_PIO_DATA(ADATA_BASE, 0)http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif why ?? thanks!Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page