cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
deandre_hj
Visitor
Visitor
710 Views
Registered: ‎05-20-2018

ZYBO Led Blinker

Hi guys, I am planning to build a ZYBO Led Blinker controlled by ethernet communication. Essentially, what this means is that I will be controlling the blinking speed of the led on the zybo through ethernet communication. Regarding this, I would like to get some advice on how I should build the c code. I already am able to send data through TCP/IP and get it to light up the way I want it to be, meaning if I were to put 1100, the led would light up in the sequence. Sorry if this is unclear as I am new to this.

0 Kudos
Reply
2 Replies
dpaul24
Scholar
Scholar
700 Views
Registered: ‎08-07-2014

@deandre_hj,

 

Regarding this, I would like to get some advice on how I should build the c code.

Is it a must that you want to do it using C code?

 

This functionality can be achieved purely using the PL side.

Use the Xilinx TEMAC core (paid) or axi_eth_core (free but supports only 10/100 Mbps). RAW Ethernet frames can be used, you don't need a TCP/IP stack.

 

Send frames from your PC to Zybo (min length frames should suffice to pass your control info for the LEDs) Ethernet port. The Rx buffer placed after the MAC core will be filled with the frames as you send them. Now all you have to do is write a small state-machine to read out the frames from the Rx buffer, decode the control info (this should be the Payload part of the frame) and send out this info to the LEDs.

 

In-fact the example_design for the TEMAC core (the bitstream with the MAC core will run for a couple of hours, I think it can suffice as a proof-of-concept demo) comes with the Rx buffer built in. You can re-use that and just write code on how to read out from the rx buffer and so on.

------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem

0 Kudos
Reply
deandre_hj
Visitor
Visitor
693 Views
Registered: ‎05-20-2018

Hi, yes its a requirement for it to be done in c code using union structure, it is also a requirement for me to use TCP/IP. I have attached a c code of how I manage to input the value and get the corresponding led to light up. I need some advice/help continuing this project.

0 Kudos
Reply