Jump to content
  • 0

spi zynq


Ram

Question

how many bits we can transmit or receive at a time while using spi communication in zynq 

or how many bits shift  register can stored in master and slave , like 8-bits, 16-bits, 32-bits ..

 

thanks 

ram

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

hi,@jon

can you please tell me , the meaning of this code,,, actually this code exist for ethernet , by this code when we send hex code from hercules utility terminal from pc , then led will be on zybo board

void set_led(char cmd[4])
{
    uint8_t led_value = 0;

    // translate command to led value

    led_value = (cmd[0] == '1') ?
            (led_value | (1 << 3)) : (led_value & ~(1 << 3));

    led_value = (cmd[1] == '1') ?
                (led_value | (1 << 2)) : (led_value & ~(1 << 2));

    led_value = (cmd[2] == '1') ?
                (led_value | (1 << 1)) : (led_value & ~(1 << 1));

    led_value = (cmd[3] == '1') ?
                (led_value | (1 << 0)) : (led_value & ~(1 << 0));

    xil_printf("LED value = %\n", led_value);

    // write led value to AXI GPIO

    XGpio_DiscreteWrite(& led, 1, led_value);

}

Link to comment
Share on other sites

On 8/7/2018 at 4:00 AM, jpeyron said:

Hi @Ram,

This code looks like it takes the 4 bit cmd input and blinks the LEDs  if the bit is set to 1 otherwise the LED stays off.

thank you,

Jon

Hi,jon

can you explain this code in more detail ,, it is like command line argument

Thank-you

Ram

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...