Jump to content
  • 0

mbo

Question

8 answers to this question

Recommended Posts

@mbo

Unfortunately, we don't currently have an IP for the Pmod SSD.

If you are designing for it in a Microblaze or Zynq project, I'd recommend that you use the AXI GPIO IP core.

The attached screenshots show where I would start for creating the hardware, note that the two Pmod headers of the SSD should be on the same GPIO channel so that setting each of the cathode pins and the digit select pin use the same XGpio_DiscreteWrite call in SDK.

The process I went through here was to add an AXI GPIO, configured it as below, right clicked on the output port of the GPIO interface and select "Make External". I then added a constraint file to constrain the output port to JA and JB of, in my case, the Arty.

 

image.thumb.png.e4cd2cd0ee7100868d2ac8df4164716a.pngimage.thumb.png.454211eafe646e6a321827a6c0f187b7.pngimage.thumb.png.fd0a68f6d69b7952e60a2a0a5567459b.png

Link to comment
Share on other sites

Hi @JColvin and @artvvb,

thank you guys for your help.

For further information I am using a Zybo Z7-10. After I have found the Z7-Master.xdc file it worked well.

I am using the four buttons of zybo board to control the two 7-segment displays and its nice.

 

Thank you for your help. You guys are awesome.

Mirco

Link to comment
Share on other sites

Hey @JColvin and @artvvb,

if I want to set e.g. the number "1" for the seven-segment display I use the command:

XGpio_DiscreteWrite(&output, 1, 0b00000110); 

the number will show on the right display, but if I change the "first" digit to 1 which means:

XGpio_DiscreteWrite(&output, 1, 0b10000110); 

the number will be shown on the left display.

Is there any chance I can show the number "10" with both displays, this means "1" on left display and "0" on right display?

 

Thanks,

Mirco

Link to comment
Share on other sites

Quoting the Reference Manual:

Quote

Because only one digit can be lit at a particular time, users that want to use both digits to display a particular value will need to alternately light up the two digits at least every 20 milliseconds (50 Hz). This will correlate to each digit being lit up for 10 milliseconds each before the other segment needs to be “turned on”. Higher refresh rates can be achieved by alternating which digit is currently powered at shorter time intervals.

Thanks,

Arthur

Link to comment
Share on other sites

The only way to show two digits "at once" is, as mentioned, rapid switching. It looks good enough, but requires constant attention from the processor. You will probably need to start a dedicated thread for the display, unless your code is very short and looping.

Link to comment
Share on other sites

It is also possible to create an IP or an HDL module that can sit between the AXI GPIO controller and the PmodSSD port. Creating a module is significantly easier.

The following is a portmap for a module with a slave GPIO interface that can be connected to an output-only 8-bit AXI GPIO controller.

module pmodssd (
    // clock interface
    (* X_INTERFACE_INFO = "xilinx.com:signal:clock:1.0 clk CLK" *)
    (* X_INTERFACE_PARAMETER = "FREQ_HZ 100000000" *)
    input clk,
    
    // 8-bit slave GPIO interface (master should be configured 8-bit output-only)
    (* X_INTERFACE_INFO = "xilinx.com:interface:gpio:1.0 GPIO_I TRI_I" *)
    input [7:0] gpio_i,

    // Pmod seven-segment display ports 
    output [6:0] seg,
    output an
    );
    //Add user code here
endmodule

If this code is placed into a verilog source file in the project, it can be added into the block diagram by right clicking on some empty space in the diagram and selecting "Add Module". The interfaces and output ports need to be manually connected to some output ports constrained by the XDC, and the appropriate GPIO interface and clock source.

The "user code" mentioned in the module can be pretty much whatever you want, it could decode two 4-bit numbers into segment codes, and toggle between the two digits, for example.

Cheers,

Arthur

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...