Electronic Basics #36: SPI and how to use it

preview_player
Показать описание

Websites which were shown in the video:

In this Electronic Basics episode I will present you the most important facts about the communication protocol SPI and how we can use it with an Arduino and an RTC IC.

Thanks to JLCPCB for sponsoring this video

Music:
2011 Lookalike by Bartlebeats
Ecstatic Wave, Jens Kiilstofte
Рекомендации по теме
Комментарии
Автор

Fantastic. It was very good to see just enough detail so that it wasn't overloading my brain. The timing wave diagrams made everything so clear especially the modes. Thank you.

northshorepx
Автор

Nice Demo of the programming side.
A few notes though:
1.) The AVR hardware SPI "SS" pin is used to turn the AVR into a slave device on a bus. Use any other available I/O pin for Selecting peripheral hardware on the SPI bus.
2.) While I haven't played with the DS3234, I have been goofing around with the DS3231 as I have found them for a good bit cheaper. These RTC's are the best because they are temperature compensated. IIRC There is a small heating element inside the IC that keeps the temperature a few degrees above ambient. The cool part about this is that there is a temperature sensor built into the chip. This temperature sensor reading is available too! There are several different libraries available on the Arduino IDE Lib-Manager that make the temp reading available. I forget which one I used to get the temperature reading working, and I'm not in my main comp ATM, but it does work using one of them.
3.) Temperature compensation makes these RTC's much better than the cheaper DS1302 (which was only designed for charging NiCd batteries with a cheap timer), or the DS1307. These other chips are extremely common with Ardy1 tutorials, but they are really bad at keeping time long term.
4.) Anyone found a better deal on DS3231's or similar than $0.90 each (AliEx) for breakout boards in single/low quantities? I'm more interested in the chip itself instead of BO's but ATM it's cheaper for me to use a BO.
-Jake

PS On the off chance that Jeremy actually reads this. If you recall from your English classes, "Read" is one of the unusual words in English. Read in the present tense is pronounced like reed, but in the past tense is pronounced "red." It really doesn't matter. I couldn't care less if you change, but if I were on the other side of this, I would want to know ;)

UpcycleElectronics
Автор

That's incredible, everytime I discover a new thing needed for my project, you got a video about the subject :)

thomaslsr
Автор

You have made the things I did not understand much clearer and I now do understand more than I ever have before. You are GREAT ! Thank you so much. I am looking forward to seeing more of your hard work. Also, I will be ordering some PCB's from your link.

davewreski
Автор

Nicely done Scott, thank you again for your dedication and time spent to share your knowledges, best wishes from Spain 🇪🇸

digitART
Автор

Really you are doing very good job. You are inspiring many minds to be creative. As always stay creative. Thank you Scott

nagarajnagu
Автор

Thank you for another great video. I learn something new every time I watch one of your videos.

tpendletonYT
Автор

Thanks GreatScott! This video helps me a lot to understand how spi works. As always your videos are awesome...

rishabhlavhale
Автор

0:25 dry skin, you should use moisturizing cream...
Other than that, great video, as always !
You can also use SPI communication with 8bits shift registers like the 74HC595, that way you can extend the number of output pins if necessary

nmxwll
Автор

Super high quality explanation. Clear and concise. I loved the way you presented.

minotodorov
Автор

The limitation of SPI is not the Chip select per module. It's the clock accepted by the slaves. That is what limits Clock speed. If you have multiple modules and one accepts say 10MHz and another only 100KHz --- you're stuck at 100KHz for all modules attached to that bus.
 There are many things missing from this video since it is very focused on the specific slave module in question.
SPI also is made of 6 signals:
MOSI -Master Out Slave in (master output)
MISO - Master in slave out (slave module output master input)
CLK - bus Clock.
CS - Chip select, one per module attached to the master SPI.
DC - Data/Command ---tells the slave module if theMaster is sending data or commands
RST - Reset ... resets the slave module.
In the limit one may be able to work with only 3 signals on the bus, MOSI or MISO, CLK, and DC, maybe even 2.
For example there are simple displays modules that only receive data that only use MOSI and CLK.
But the actual bus is made of those 6 signals.

John_Smith__
Автор

scott loved your video.
you made such a vast topic soo easy.

jyotigvzsftiwari
Автор

Great. Description on SPI! I have a number of projects that need SPI but I have been putting off. With this amount of detail I can finally try my hand at this useful protocol. Thanks for another great video! I always look forward to your next. ☑️😋

terrymaker
Автор

GreatScott: *"Of course, you cannot use it for as many slave devices as the I square C protocol due to the limited number of chip select lines"*

Me with more 74138 decoder chips than any sane human should have and no regard for compact design: *"I have no such weakness!"*

EvilSandwich
Автор

Finally got it on sunday .
Waited for your video every week .

ukesharyal
Автор

Gosh I love these videos but it's always the programming that holds me up. More videos on programming please!!

jpoppinmoneyunit
Автор

"the datasheet spoiled the surprise"
I just love your humor!

Mat
Автор

I'm starting to think GreatScott! can read my mind. I was just searching how to use a SPI Display for my RaspberryPI and he does a video about it. Although he doesn't talk about a SPI Display it helped me to connect the Display anyway. Thank you!

CraftLP
Автор

at 6:15 I think that you’ve incorrectly identified CPOL = 0 and CPHA = 0 as Mode 0. This should be Mode 1.
This is verified at 4:28 where the ds states that only Modes 1 & 3 are supported.

irgski
Автор

And I don't know though Arduino was difficult already.
I should have studied more in High school 45 years ago.
You are scary smart. Thanks Bob

bobharrison