- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Code: --- Quote Start --- int main() { int i; while(1) { i = IORD_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_BASE); printf("PIO EDGE CAP: %d\n", i); IOWR_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_BASE, 0x0); usleep(1000000); } } --- Quote End --- BUTTON is a 4-bit PIO in my SOPC. If I run this code with Nios II 9.1 I read: PIO EDGE CAP: 0 If I press BUTTON[0] I read: PIO EDGE CAP: 1 .. If I press BUTTON[3] I read: PIO EDGE CAP: 8 Now: If I run the same code with Nios II 11.0 I read: PIO EDGE CAP: 512 If I press BUTTON[0] I read: PIO EDGE CAP: 513 .. If I press BUTTON[3] I read: PIO EDGE CAP: 520 What does it means? http://bestringtones.mobi/zedge-ringtones/Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Decimal 513 = Hex 201
Decimal 520 = Hex 208 Then the changing bits are the same in both versions Since it's a 4-bit PIO you must consider the bits above 4 as "don't care". Their status is not deterministic.
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