Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Usage of dual purpose pins

Hello,

I have a question how to use configuration pins as dual purpose pins.

For example: I have connected an EPCS flash-device to a Cyclone III devices connected to the DCLOCK-, SCE-, SDO-, and DATA0- pins.

During configuration these pin's have the configuration-function and are connected to the the EPCS-device.

After configuration these pin's could be used as normal I/O and that's what I want.

I have programmed an NIOS II processor in the FPGA which has also a 4-bit PIO peripheral. How do I connect the outputs of this device to the physical pin of the FPGA.

Do I just internally connect DCLOCK-pin to PIO0, SCE-pin to PIO1 etc. Is it ok to connect both signals together to 1 physical pin of the FPGA.

How do I need to configure the dual-purpose pin's: Compiler configured, Use as programming pin, or Use as regular I/O.

Thank you and best regards,

Wamor

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    First of all go to project settings, Device section; select "Device and Pin Options", then the "Dual-purpose pins" tab.

    Here you'll have to switch EPCS pins to "Use as a regular I/O" mode.

    You can now assign to this pins any signal you want.

    The only point not clear to me is why you want to use a 4-bit pio, as you have the nios epcs controller readily available.

    Please note that you are usually supposed to use these dual-purpose signals to access EPCS itself after configuration (with Nios or whatever you implemented inside fpga). Although it's possible to use them for other purposes (ie. controlling other hardware devices connected in parallel to epcs), remind that you must take extreme care to avoid signal contention between the two paralleled devices.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Cris,

    Thank for taking the time to reply.

    The reason why I want to use the EPCS pins as regular pin's after configuration is that I just need a few additional I/O-pin's.

    Because the EPCS pin's are only needed as EPCS functionality during configuration I hoped that I could use these pin's as normal I/O-pin's after configuration.

    I understand from your answer that this is possible but that I need to be careful to avoid signal contention.

    Best regards,

    Wamor