Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

False high inputs

Altera_Forum
Honored Contributor II
1,273 Views

Using a Cyclone II 2C20F484C7 fpga, and having some trouble with false high inputs. 

 

Basically if I have a switch connected, in other words an open line, it seems to default to reading it as a high input. 

 

Is there any way to fix this?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
587 Views

An open input without pull-up or pull-down resistor can show any level. Cylone II inputs are high impedance by default. The usual solution is to activate the FPGA internal weak pull-up resistor and apply low level by switching to ground. If you need to switch to a high level, an external pull-down resistor is required.

0 Kudos
Altera_Forum
Honored Contributor II
587 Views

Could you kindly explain how to do this please?

0 Kudos
Altera_Forum
Honored Contributor II
587 Views

 

--- Quote Start ---  

If you need to switch to a high level, an external pull-down resistor is required. 

--- Quote End ---  

 

 

Sorry for being so thickheaded but when you say switch to a high level, do you mean use a high-enable? 

 

Also, if it's ok to ask, how would I activate the FPGA's internal pull-up resistors?
0 Kudos
Altera_Forum
Honored Contributor II
587 Views

in Assignments > Assignment Editor, make a new assignment to your input pin with Weak Pull-Up Resistor, On, Enabled.

0 Kudos
Altera_Forum
Honored Contributor II
587 Views

he means if you have a switch that is normally open, and when it is closed it connects to VCC, you will need to disable the internal pullup resistor and use an external pulldown resistor (so that the pin reads 0 when the switch is open). alternatively you can connect the switch to GND, and enable the pullup resistor which will require no external components. adjust accordingly in your HDL.

0 Kudos
Altera_Forum
Honored Contributor II
587 Views

Thanks for the explanation. I think the problem isn't particularly related to FPGA (except for the weak pull-up option). You can't use a single throw switch without an additional resistor to drive digital logic.

0 Kudos
Reply