Forum Discussion
Altera_Forum
Honored Contributor
16 years agoSwitch on leds on DE2
Hey, im trying to switch on LEds on DE2. http://thalandinenop99.free.fr/image.jpg You can see here the system that i've generated. Leds is set in output with 8 bits and Switch...
Altera_Forum
Honored Contributor
16 years agoIf you have used Nios II full version, addresses below to 0x8000000 are cacheable, so you will experience problems accesing hardware in the way you're doing. I strongly suggest use the IORD and IOWR macros, they use I/O instructions. So according to your SOPC system
# include "system.h"
# include "io.h"
...
while(1)
{
IOWR(LEDS_BASE,0,IORD(SWITCH_BASE,0));
}
......
base address definitions are made on "system.h".