Тёмный

Beginners Guide to SPI on the Raspberry Pi Pico (BMP280 Example) 

Learn Embedded Systems
Подписаться 36 тыс.
Просмотров 51 тыс.
50% 1

Опубликовано:

 

28 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@matthiassuess7293
@matthiassuess7293 3 года назад
A very nice and clean introduction and a great overview of SPI in conjunction with the Pi Pico. I think it's great that you make the effort to show not only the code but also diagrams and tables. Absolutely great! Thank you very much.
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Thank you very much for the feedback on this video, I appreciate it! I am glad you found it useful and educational!
@daCount0
@daCount0 11 месяцев назад
What a perfect introduction in this protocol - thx
@javjsky
@javjsky 3 года назад
Is there any advantage on using spi_write_blocking() and spi_read_blocking (line 72 and 73) separately over spi_write_read_blocking()?
@TooSlowTube
@TooSlowTube 4 месяца назад
Do you have recommendations for which breadboards are good ones, and where to buy them? I've bought quite a few that are semi junk, and can only grip thick wires, or that it's hard to push components into because the contacts don't line up with the holes well. The power rails are usually the worst part, especially for not gripping thinner jumper wires / bell wire.
@marvicdigital
@marvicdigital 3 года назад
Excellent explanation, your videos are necessary and required to see to understand what we do with SPI devices. Thanks.
@scottduede8134
@scottduede8134 3 года назад
This is extremely helpful. I'll be watching it sooo many more times.
@iliyannaydenov4186
@iliyannaydenov4186 3 года назад
WOW! Really good tutorial. Will you have tutorials on STM32 or ESP32? Maybe RTOS?
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Yes I will! I plan to start a series on STM32 beginning with some basic PCB design videos then going into programming tutorials. I will also have RTOS videos to cover pretty much all the devices I use (Pico, STM32, ESP32 etc) from now on.
@mytechnotalent
@mytechnotalent 3 года назад
Love your C Pico tutorials. Quite RARE! Will you be doing one on a TFT ST7735 display?
@taotechnique
@taotechnique 3 года назад
This absolutely incredible, I am so happy I have found your channel. Extremely helpful!
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Very happy to help!
@doyar1
@doyar1 3 года назад
So i am.
@robotboy3525
@robotboy3525 Год назад
Hi, I want understand what you did at 10:25 Why did you write 0x27 to 0xF4 ?? what's the purpose behind it ?? I'm new to SPI
@alexandermcalpine
@alexandermcalpine Год назад
Great tutorial thanks!
@samueldavies646
@samueldavies646 2 месяца назад
because you do not init the function of cs pin as spi, it can work fine as any gpio?
@alfonsosamuel2273
@alfonsosamuel2273 3 года назад
This is really good! Thanks. Just to make sure a beginner like me dont get 1 week stuck think why i didnt work. You need to solder the boards 🙂😅
@kumarbhatia6566
@kumarbhatia6566 3 года назад
Very well documented! Thank you.
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
You're very welcome!
@samihawasli7408
@samihawasli7408 3 года назад
Did you have to download any extra drivers to get SPI working or was everything already included in the operating install?
@seanudal
@seanudal 3 года назад
Thank you for the movie. It would be great if you made a movie explaining how to use a SPI display with a Pico using MicroPython. Especially the XC3728 OLED that is used by Arduino. I found another movie however they do not provide any code, just a demonstration. Thank you
@larrybud
@larrybud 11 месяцев назад
Why are there specific labels for CS if the CS can be wired to any GPIO pin? Also, what's the advantage of having separate busses, simply speed?
@NokiAll2
@NokiAll2 Год назад
can you post new video with bmp388 i2c using the raspberry pi pico board (and c++ sdk like you did here)? thank you
@hirakjyotiburagohain351
@hirakjyotiburagohain351 3 года назад
Can we communicate with 2 raspberry Pi pico with the pin of UART
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Yes this is possible, I add this suggestion to a list of upcoming videos.
@nicoladellino8124
@nicoladellino8124 2 года назад
Very nice video, TNX.
@Atonix99
@Atonix99 2 года назад
I need help with a project I am developing for my college degree... I am trying to connect 2 sensors (they need 5V and 170mA each) to my Raspberry Pi via SPI. They are both energised, and connected to the same miso, mosi and clock, as they should be. The problem comes with connecting the SS. I need two more wires for each radar: 1 for the SlaveSelect and another one for PinTurnOn. Is it mandatory that I use GPIO 24 and GPIO26 as SlaveSelect? Or I can use any I want? The thing is I am using any GPIO (free of course) I want at this moment and the radars work ONLY when the other radar is DISconnected. If I connect both, the screen just doesnt show anything, but as soon as I unplug one of them, the other one starts working... Any idea? I can give more dets if you were willing to help, thank you very much
@LearnEmbeddedSystems
@LearnEmbeddedSystems 2 года назад
You can use any free GPIO pin for SS. Are you only selecting one device at a time via the SS pin?
@calmcalm9287
@calmcalm9287 3 года назад
Pls help me I Using python in my laptop. And I want to send data from python to AVR. Could you tell me What type connecting wire is appropriate ? Thanks you
@christiaang
@christiaang 3 года назад
Nice video, thanks for this tutorial. Are you planning to make video's for MicroPython on the Pico?
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Yes I am! The videos are currently in planning but they take a little bit of time for me to produce, hopefully they will be out soon!
@Jm-my1rd
@Jm-my1rd 3 года назад
I want to learn how to program my BLE module. I just purchased a BL651 from Laird connectivity. Sorry I'm a beginner self learning. I would love to have some guidance on how to interface the BL651 and send and receive the data using SPI protocol.
@robotboy3525
@robotboy3525 3 года назад
J Meng, the BL651 is way too advance. first you'll need to read the datasheet, make sense of it and write your own peripheral driver like the .h and the .c file which are the most complicated parts and then you can start with your main.c file to interface with it. try starting with something simple. there are many arduino and python bluetooth projects on online
@andreassteffens2907
@andreassteffens2907 3 года назад
Do you have any idea on how to write data in a microsd file connected via spi?
@hwj1822
@hwj1822 3 года назад
Thanks a lot. But now please, explain it again in Circuit-Python too ... 😉✌️
@christiaang
@christiaang 3 года назад
Or MicroPython please 👍
@Stabby666
@Stabby666 3 года назад
People, PLEASE learn C/C++ for microcontroller programming. Python is incredibly slow compared to compiled code. Python is really only useful to learn the basics of programming. To actually make the most of the hardware, switch to a proper compiled language. It's like taking the training wheels off!
@hwj1822
@hwj1822 3 года назад
@@Stabby666 Yes, but does it really matter? Speed? Only, if you really need it. These interpreter languages like Python have their justification, especially since speed is compensated more and more with fast processors and libraries that implement the critical parts. These are a big step forward with abstraction layers of all languages like step from real binary coding to mnemonics and later compilers and linkers. We're no longer living in times of basic.
@bakedbeings
@bakedbeings 3 года назад
@@Stabby666 It's true it's also just a bit like going into a living nightmare of move semantics and a bowl of brace/bracket/paren pasta 🤣 c++ and python have their place! Often projects don't need a super tight loop, instead reacting to inputs on a human timescale. Why should you pay the heavy performance tax that writing performant C++ code incurs if you don't have a use for it and you don't have a boss breathing down your neck about the cost of 100s of thousands of units. Oh and one more thing: remember C coders are rolling their eyes at C++ programmers for using such "bloated" executables from an "overengineered" language, and behind those guys the assembler coders are sniffing at this C nonsense coming between them and the instruction set.
@Stabby666
@Stabby666 3 года назад
@@bakedbeings if your boss is breathing down your neck leading you to using a language that’s literally hundreds to thousands of times slower then a compiled language, get another job - he’s going out of business. If you can implement a project using a cheap 1 MHz part in C instead of getting the same performance using a 200mhz part with 100 times the flash, because you’re dicking around with python, then you’re losing money on every unit shipped due to laziness. It’s like they say, when all you have is a hammer, everything looks like a nail. I use ASM, C, C++, JavaScript, and used to spend most of my time writing Java, Perl, PHP and yes even Python. I’m not a language snob, but a professional should have more than one language in their toolkit and know which is appropriate. And to the previous guy, Python IS the modern version of BASIC. Indeed that’s the reason it was chosen as the default on the Raspberry pi, according to the founder.
@dave_dennis
@dave_dennis 3 года назад
The part about the MSB of the register is a bit confusing. Is there a max of 127 registers? Would seem so since your are forcing the MSB to a 1 or 0. Seems like the upper nibble of the register address would be an 0x8 and not a 0xF.
@GodmanchesterGoblin
@GodmanchesterGoblin 3 года назад
To force the MSB to a 1 and leaving the remainder unaltered, you would OR the byte value with 0x80. To force to a zero, you would AND the byte value with 0x7F.
@Filipx87page
@Filipx87page Год назад
I have a problem because CS goes to 1 before it finishes transferring the read_blocking and the data is then invalid. :(
@mdchaparror10
@mdchaparror10 3 года назад
Nice video, thanks
@robotboy3525
@robotboy3525 3 года назад
Hi, where did you purchased your breadboard ??
@hossammagdy6974
@hossammagdy6974 3 года назад
whats the connections on the hardware ?
@kamilkaya5367
@kamilkaya5367 3 года назад
Hello Sir. Can You show how to use mcp3008 and mcp3208 using SPI?
@AlejandroGarcia-zx4cq
@AlejandroGarcia-zx4cq 3 года назад
Hello bro I like your videos for raspberry pico Actually I try to make a library in .cpp and I cant do this .. You can explain how to make a library for this platform? Thanks for read my cm
@shivendrakumar7324
@shivendrakumar7324 3 года назад
Can we have a video on PWM?
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Thank you for the suggestion!
@nathanaelsmith3553
@nathanaelsmith3553 3 года назад
Good job
@LearnEmbeddedSystems
@LearnEmbeddedSystems 3 года назад
Thank you!
@nathanaelsmith3553
@nathanaelsmith3553 3 года назад
@@LearnEmbeddedSystems hope to use this in migrating code from zero to pico...
@sansdomicileconnu
@sansdomicileconnu 3 года назад
like yours tutos
@lsk-nf7um
@lsk-nf7um Год назад
master and slave terminology being ruled out! Is there a technical advantage to this or is it ideological?
@eledikohabib3369
@eledikohabib3369 3 года назад
Is the pico spi interface bidirectional?
@randomname3894
@randomname3894 2 года назад
I also asking myself. I need to connect an encoder to it. I know it should work with stm32´s via a resistor between mosi and miso, but no clues if the rp2040 is capable. Did you find the answer?
@jj74qformerlyjailbreak3
@jj74qformerlyjailbreak3 3 года назад
I’m really trying to understand this new world of microcontrollers “New to Me” GOD gives me everything I need when God intends. Your explanations are right on cue. Good Job 👍
@adamsilesia5753
@adamsilesia5753 3 года назад
There is nothing wrong with using word slave.
@MrPDawes
@MrPDawes 3 года назад
Slave device is subordinate to it's master so the terminology still works here. Why do we have to be politically correct for everything?
@tiagorainho5011
@tiagorainho5011 3 года назад
Because people are weak
@Xiph1980
@Xiph1980 3 года назад
Because it actually hurts people and it takes freaking zero effort to use other terminology. Don't be a douche.
@larrybud
@larrybud 11 месяцев назад
Exactly. Master/Slave has been around forever, at least as long as hard drives came into existence.
Далее
КВН Случай на физ-ре #shorts
00:31
Просмотров 22 тыс.
бабл ти гель для душа // Eva mash
01:00
SPI: The serial peripheral interface
33:00
Просмотров 691 тыс.
SPI | Raspberry Pi Pico Workshop: Chapter 4.3
10:02
Просмотров 1,6 тыс.
R-Pi Pico 2: 10 Things You Must Know Before Buy!
6:50
КВН Случай на физ-ре #shorts
00:31
Просмотров 22 тыс.