Forum Discussion
Altera_Forum
Honored Contributor
16 years agoPIO set and clear bits
Hi! I am using a Nios II in my Cyclone II FPGA. I configured the Nios with a 18bit output-PIO. When i use the macro IOWR_ALTERA_AVALON_PIO_DATA() i can easily turn my leds on and off. Looking ...
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- Could it be that the IOWR_ALTERA_AVALON_PIO_SET_BITS() and IOWR_ALTERA_AVALON_PIO_CLEAR_BITS() macro do not work because i derived my project from the "Hello World Small" template? Regards FredFlintstone --- Quote End --- I don't think so. I can't see any relation with the template. No OS or drivers are involved. This is only a matter of writing a register. Further suggestions: - try to write the actual set/clear registers (base+4, base+5) instead of using the macros - make sure you are loading the correct fpga configuration which includes the sopc where you enabled the bit set feature. - try with another pio port, 8bit wide (if you don't have free fpga pins for the new pio, add one more pio for reading the status with a loopback )