You are not logged in.
I am trying to drive the LED's to read the value of the AccumOut register given in Lab 3 --> Simple Transmitter. I initialize a test value to
led_test_value = tx_ReadReg_AccumOut(XPAR_TX_OPBW_0_BASEADDR);
led_7seg_index_l = ((led_test_value>>0) & 0x0000000F);
led_7seg_index_h = ((led_test_value>>4) & 0x0000000F);\
XGpio_mSetDataReg(XPAR_LED_7SEGMENT_BASEADDR, 1, led_7seg_index_l);
XGpio_mSetDataReg(XPAR_LED_7SEGMENT_1_BASEADDR, 1, led_7seg_index_h);
where 'tx' is the transmitter model. But I get only some garbage values. Kindly help. Also, if possible, point to the documentation on this type of stuff. All I had as reference was your initial example in Intro to XPS.
Offline
Each segment (there are 7) in each display is driven by a bit in the GPIO register. You have to write the 7-bit value corresponding to the hexadecimal character you want to display. The assignment of bits is shown in the FPGA Board User's Guide. Look in warpmac.c for an example function that handles this mapping. The warpmac function warpmac_lefthex shows how to use this function with the XGpio driver.
You can also refer to the WARP FPGA Board Users Guide for sample code in C and Verilog.
Offline