- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello dear people from Altera forums =) Another question by someone who is just starting.
I made a C program for the NIOS to blink some leds and stuff like that on my BeMicro FPGA using my keyboard as input. Now i want my program to recieve the input from a button that will be connected to the FPGA pins. I already did the Design on quartus II and generated my SOF file, now i need to do something like, when i click one button one led blinks, when i click another button the other led blinks. (I just need help with how my program can see that the button was clicked) I am kinda lost over here on how to do that. Thanks for the help and i am loving this place :DLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just like you use the IOWR_ALTERA_AVALON_PIO_DATA(base, data) macro to turn on or off the LEDs, you can use the IORD_ALTERA_AVALON_PIO_DATA(base) macro on your buttons PIO to read the buttons state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, it was exactly what i needed
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