- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to read state of some output ports in my application.
In some part of the program I write these ports and in other part I want to read actual state and I wouldn't like to use special variables to keep the states. I cannot quite understand the "tristate" meaning in Altera peripheral handbook, but it seems to me that this is what I need. I already have tested it (with first setting the direction of the port to 1 to become tristate) and it seems to be working fine. Since I don't fully understand the datasheet explanation, can somebody please confirm that I am doing it right and not setting something else, which can eventually cause some problems in my application? Peripheral handbook says this: <div class='quotetop'>QUOTE </div> --- Quote Start --- Bidirectional (tristate) ports: In this mode, each PIO bit shares one device pin for driving and capturing data. The direction of each pin is individually selectable. To tristate an FPGA I/O pin, set the direction to input.[/b] --- Quote End ---Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there are two cases for ports:
1. port signals are connected to real in/outputs of fpga ( i think it's ok to use tristate signals to read back the setting of the outputs) 2. port signals are used internal in fpga (tristate does not make sense, I don't know if quartus syntesizes tristate registers away ?) because I had some signals with case 2 and also wanted to read back the settings of the outputs, i made ports with input and output (no tristate) and connected in/outputs of these ports together in the top schematic. perhaps someone from altera can explain what will happen if i use tristate for internal port signals ?
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