Related Articles


  1. 1

    Ben Nguyen

    Is there a difference between spidev (3.2) and the library 'python-periphery', or the 'py-libbcm2835' library? They all seem to do spi, however not sure if they have different applications or if they are just deprecated libraries?

    Interestingly, the spidev documentation says you can set the number of bits per word(transfer) , 8..16, however according to the pi documentation, the spi peripheral connected to the header only supports 8/9! So perhaps spidev is a generic driver whose functionality may or may not be fully supported by the rpi?

    BTW, doesn't a python list ([0x90,0,0,0,0]) consist of ints and not bytes? Does the driver take this into account and convert it to 8-bit bytes before sending?

  2. 2

    Karma Auto

    can you please provide your code?

  3. 3

    Chris Woodhouse

    You don't need l and m. One of them will do. m = (m + 1) % 36 That of course will let m range from 0 to 35. If for some reason you wanted it to range from 1 to 36 you could make it m = m % 36 + 1

  4. 4

    arturo osorio

    Thank you for the video!

  5. 5

    Roman Beresik

    Thank you very much for excellent tutorials.

  6. 6

    David Barrar

    I'm making the move from programming to Hardware, and this protocol stuff has been difficult to really grasp. You do a good job of pointing out the details of SPI communications. Looking forward to your I2C, and UART tutorials

  7. 7


    Your statement that CS can be hardwired to the active state is not true. Many ICs depend on the edge transition to begin reception or delivery of data. MCP3008 ADC is one example of many, and in this configuration it WILL NOT WORK. Please correct that as some folks may do this on their Pi projects and then wonder why the peripheral that they are trying to program does not work.

  8. 8


    Thank you for the detailed video.

    I've player around with SPI on the Arduino and using ATMel micros but not with a Pi before so this was really useful.

  9. 9

    Abhaya Singh Pandey

    Man, keep on making new videos. dnt quit soon….

  10. 10

    Ibrahim Mohamed

    Thank you for this brief explanation ..
    I have a question… Why there are pins for chip select ?? can we use any other pin as chip select ??
    Thank you again.

  11. 11

    Matthew student

    Thanks for this great video! Why exactly is the frequency of the outcoming sine-wave about 11.14kHz? Does this depend on the characteristics of the dac? How can I determine this frequency?

  12. 12


    Really great video, thanks.

  13. 13

    Eric Boeck

    What program on the PI are you using for the C++ IDE?

  14. 14

    Deus stilo

    Hey Tom, thank you for the video. I have a question about your code : don't you need to pass a reference of spiOut and spiIn as stated in the function's transfernb description?
    "void bcm2835_spi_transfernb(char *tbuf, char *rbuf, uint32_t len)"?

    I've seen that in comments in the google group and I don't understand it at all. It can't work. Finally, I may be extremely wrong and thus I'm very sorry.
    Could it be because of an update of the library?

    Thank you very much!

  15. 15

    Krishna Vv

    That's really a cool explanation on spi with BCM 2835 library. I see that this lib doesn't support interrupts and also has the possibility to use RPi 2 Model B(40 pin) as SPI slave.

    Do you know any open libraries that effectively utilizes the RPi peripherals?

    Thank you in advance!

  16. 16

    Chris McConkey

    I just "discovered" you channel and just want to thank you for the great info.

    Would  a union have worked instead of the makeWord function?

  17. 17

    Joerg Biedermann

    Well done and super declared
    thank you :-))

    look forward to more episodes


Deixe uma resposta