- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I'm working on a project for a University course and I have to use the Altera DE2-115 board we have in the lab. I tried to program it with a simple circuit doing left-right shift of the leds, when I realized that the buttons, when not pushed, they're sending a "1". I have some experience with Xilinx boards and I thought that by default they may be "pulled-up", so "pulling them down" it would be a good idea. The research I've done on the Internet and in the manuals confused me bit, so I'd like to ask: is it possible to drive the signals from the buttons to zero, or I have to modify my VHDL code? Thank you in advance, Tom- Tags:
- de2-115
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I'm working on a project for a University course and I have to use the Altera DE2-115 board we have in the lab. I tried to program it with a simple circuit doing left-right shift of the leds, when I realized that the buttons, when not pushed, they're sending a "1". I have some experience with Xilinx boards and I thought that by default they may be "pulled-up", so "pulling them down" it would be a good idea. The research I've done on the Internet and in the manuals confused me bit, so I'd like to ask: is it possible to drive the signals from the buttons to zero, or I have to modify my VHDL code? --- Quote End --- You should start by looking at the schematic for the board. You'll find that the push-buttons have a pull-up and when pressed generate a logic low. Basically they are active low signals. If you have a VHDL component that expects button inputs that are active high signals, then you just need inversion logic, eg.,
port (
...
button : in std_logic_vector(3 downto 0);
...
);
...
signal button_in : std_logic_vector(3 downto 0);
...
button_in <= not button;
u1: component_that_uses_active_high_buttons
port map (
...
button <= button_in,
....
);
Make sure to include logic that de-bounces the buttons. Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much Dave, it works. I have already included the button de-bouncing logic :)
Cheers, Tom
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