UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor hort3n
Visitor
6,630 Views
Registered: ‎05-28-2016

!Help! Beginner venturing into the world of FPGA programming

If I've made a ignorant mistake like posting in the wrong section, let me know, but don't let it stop you from addressing the content of my post. Hi, I recently began my fpga adventure with the ubiquitous hello world blinking led cluster program; smooth sailing there. I have now turned my focus towards addressing particular led's, this has been troublesome. Can somebody explain, preferably in a way that would be understandable for a complete beginner, how it is that I utilize a single led? If its something your familiar with could you also include in your response details about the general process of addressing particular items connected to one of the axi_gpio ip blocks? I'm using a Digilent Arty board, with a simple block design that includes the microblaze ip, axi_gpio ip, and the bare essentials such as the clock, ddr3... I look forward to reading yall's responses.

0 Kudos
3 Replies
Teacher muzaffer
Teacher
6,570 Views
Registered: ‎03-31-2012

Re: !Help! Beginner venturing into the world of FPGA programming

by "blinking led cluster" I assume you have a gpio block which is connected to a number of LEDs and you have (say) a counter connected to that port (upper bits so that you can see the change by eye).
So I'll assume you know how to say
char leds;
for (int i = 0; i < 1000; i++) {
leds++;
set_gpio(leds);
}

If this is what you have, then what you want is trivial. Individual bits of leds variable controls individual leds ie (leds & 1) controls first led, (leds & 4) control 3rd led etc.

So (assuming leds are activated by a high value in their respective location):
leds = 1; will turn on first led, leds = 4 will turn on third led, leds = 5 will turn on first and 3 leds. This is simple bit wise C programming.

If this is not what you have, post again; mainly the code you have which makes the leds blink so that we can comment on it.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Visitor hort3n
Visitor
6,465 Views
Registered: ‎05-28-2016

Re: !Help! Beginner venturing into the world of FPGA programming

Thanks for the help, my first project turned out very well.

20160531_210644.jpg
0 Kudos
Teacher muzaffer
Teacher
6,427 Views
Registered: ‎03-31-2012

Re: !Help! Beginner venturing into the world of FPGA programming

if your question is answer, please close the thread.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos