Forum Discussion
Altera_Forum
Honored Contributor
16 years ago1 - Yes the pin can be an output and an input at the same time. Meaning that you can read whatever you are driving on the pin. You read whatever you output.
2 - If you want to read a signal on the pin that's driven by an external source. You must disable the output driver. If you try to drive at the same time the external driver is driving, you will get contention. 3 - Please refer to figure 2-20 on page 2-38 of the user's guide for the Cyclone II. This figure shows you what the IOE structure of each IO pin looks like. This should explain things well enough. http://www.altera.com/literature/hb/cyc2/cyc2_cii51002.pdf Look at the three components (output, output enable, and input). You can think of the input as being directly connected to the pin at all times. It always reads what's on the pin. Now who's driving the pin? Well if you have the output enable asserted, you are, otherwise the pin is driven externally or floating if there is no active driver. Jake