Arduino Tutorial #16: Simple SPI Communication

preview_player
Показать описание
In today's Arduino Tutorial, we look at using a shift register to demonstrate the Arduino's simpler SPI communication.

You can find the code for this video, and other Arduino tutorials at:

Do you have a suggestion for a future video? Leave it in the comments below.

--OR--

Feel free to email me at:
I'm happy to answer questions and comments.
Рекомендации по теме
Комментарии
Автор

at 4:10 ... Reiterating what another commenter said: The maximum 25 mA output current specified on the data sheet is the maximum current you can pull out the chip before you damage it, not the maximum current the chip will output on its own. The chip has no control how much current your circuit draws out. It is the job of the circuit designer to make sure the circuit keeps all currents within safe levels. Leaving the current limiting resistor off the LED connections very much does not do this.

GeekRedux
Автор

You are just using a shift register. I don't see the connection with SPI.

PeterBruins
Автор

Resetting the counter isn't necessary. Beyond 15 the higher bits will change also, but the lower 4 bits will keep counting from 0 to 15.

stevenvanhulle
Автор

1) It means that the chip can either supply 25 ma or sink 25 ma.
2) 1 of the data lines behaves as a sort of write enable. Because both pins are connected to an AND gate, data will only be passed if both data lines are true.

humanHardDrive
Автор

At 4:15, Do you mean to say that they have some sort of current regulator within, that will output no more than the max current stated even under short circuit conditions?

AnujFalcon
Автор

Cool example. I've got 2 Q's: 1) Why do they use the ± sign in front of the 25ma (max output I) in the data sheet? 2) Why are 2 data lines needed (can this example be done with just one)?

bergweg
Автор

a clock pulse is given to send each bit to 74164 or only one clock is given to send a byte?

anvintj
Автор

Not sure if anyone's mentioned it yet, but an INT is 16bits (2 bytes) (which is different between platforms, It's typically 32bits (4bytes) in Java/.net etc)

So in this case you could use a Byte or a Char type to save 1 byte of SRAM (many of the same arrhythmic operators will work just fine too)  

Hope that helps out in some small way in the future!

davidareddinggmail
Автор

That is so cool.
Please make more of these videos

kevinchahine
Автор

This seems like a special case of SPI where MOSI and CLK of Arduino are used as we neither have many slaves to use CS nor a return data from the slave to use MISO or Arduino. Thank you for the video!

AnujFalcon
Автор

in the arduino examples there is code for an spi digital potentiometer. but what makes a digital potentiometer better than using pwm?

pianoman
Автор

You sound just like Jeremy Blum. Great intro, thank you so much. Hoping to get this working on my MSP430.

BernhardHofmann
Автор

Hey, I am currently needing to do a communication between two arduinos for a school project, but I have no idea how to start it. I need to make the one arduino as a master and one as slave. Could you recommend some tutorial or some guide to learn to use the IDE in order to do that? Thanks and sorry for any bad english, its not my first language.

guilhermetheis
Автор

Would you consider doing video tutorial on the new Arduino Yun Covering its new capabilities and features?

atelemetrika
Автор

you have defined data as an integer, so can data be defined as a string/char ???
if it can be the processing will be quite different right ??? so how ???

unglaubichuberlieber
Автор

hi there, will this work on the TLC5940NT chip? Thank you.

kguna
Автор

how do i send more than 1 variable i.e. should i pass 1 variable at a time with some delay between the transmission?

rajvardhandeshmukh
Автор

What was chip you used can you write it out?

WayneJohnsonZastil
Автор

Can you make video on interfacing of RFID module and SD card module which uses SPI using tha arduino Uno SPI...

shubhamchaudhari
Автор

4:20 You mean that the 595 has current limiters on each of the eight output pins?

bergweg
welcome to shbcf.ru