Forum Discussion
Altera_Forum
Honored Contributor
18 years agoProblem PIO
Hello to all, I'm new in FPGA and I have a Cyclone II and I made a design with a Nios II. I just want to drive a component (LM629) and I have to send et receive data. I created a tri sta...
Altera_Forum
Honored Contributor
18 years agoDid you check the header file altera_avalon_pio_regs.h? There are several defines there that can be of interest:
# define IOADDR_ALTERA_AVALON_PIO_DIRECTION(base) __IO_CALC_ADDRESS_NATIVE(base, 1) # define IORD_ALTERA_AVALON_PIO_DIRECTION(base) IORD(base, 1) # define IOWR_ALTERA_AVALON_PIO_DIRECTION(base, data) IOWR(base, 1, data) # define ALTERA_AVALON_PIO_DIRECTION_INPUT 0 # define ALTERA_AVALON_PIO_DIRECTION_OUTPUT 1