In-depth: Raspberry Pi Pico's PIO - programmable I/O!

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 204

  • @Wren6991
    @Wren6991 3 роки тому +187

    This PIO thing is pretty cool, I should learn more about it

    • @AlasdairAllan
      @AlasdairAllan 3 роки тому +13

      Not sure where that leaves the rest of us Luke. 🤦

    • @louigi6001
      @louigi6001 3 роки тому +3

      Once you get the hang of it :-D let us know ... we will bug you for a step by step tutorial that takes us from the pio blink example to writing our own pio stuff. I'm still really puzzled on the raw C helper function
      % c-sdk

    • @AndrewTubbiolo
      @AndrewTubbiolo 3 роки тому +7

      Pilot Induced Oscillation is a pretty scary thing to get into. :)

  • @martandrmc
    @martandrmc 3 роки тому +97

    The Raspberry Pi Foundation just lit a fire underneath Arduino. The pico is so packed with features and as such appeals to people that have experience with Espressif's chips while at the same time being more than a quarter the price of an Uno plus being more intuitive. They covered everyone with their hardware, they sure did know what they were doing.

    • @dieSpinnt
      @dieSpinnt 3 роки тому +5

      You know that you are comparing Apples and Ataris, don't you? In addition, it won't do any harm if Arduino burns down. That was a joke, of course. Frameworks burn badly, or not at all, when they are mental constructs;)
      Don't forget: use the right tool for the right job. In some of the comments here you can clearly see how strange a high-speed logic with discrete building blocks is to people. To know about that too can sometimes be an advantage. Or simply have knowledge besides the Arduino, ESP or Raspberry filter-bubble.
      www.digikey.com/en/products/filter/embedded-microcontrollers/685 ... Fucking 89483 results!

    • @martandrmc
      @martandrmc 3 роки тому +5

      @@dieSpinnt The AVR market is not going to change, I am just fearful of Arduino's position here. You could get a bare bones AVR chip for a comparable price to the pico even after the demise of Arduino no problem. It would only really show how expensive their stuff are and pressure them to act. Whatever happens, knowledge is knowledge.

    • @dieSpinnt
      @dieSpinnt 3 роки тому

      @@martandrmc Hmmmm, I can't see us both discussing the (insert MCU here) Market. Who buys, calls!
      In retrospect, my thoughts on your Arduino worries to calm you down: If you have to do something quickly, use a BAD editor (I just don't understand why people pick it up. It's a free decision to use a text editor and not code-completion mumbo jumbo or the other way arround) ... in other words: one that works (!) and you want to try something quickly (with thousands of others strengthening your back with their experience through libraries or support), again: something that works ... proven
      There is always a niche for this type of hobby or craft work. This niche can be really big, so big that even professionals can use it to quickly try out an idea.
      I think you shouldn't worry. Especially not because of diversity :)

    • @dieSpinnt
      @dieSpinnt 3 роки тому

      May I show you something other besides my inabilities of soldering TQFP packages?
      www.st.com/en/microcontrollers-microprocessors/stm32h747-757.html#overview
      A powerhouse with camera interface, GPU acceleration and a pin header count that doesn't bring us both to a laughter as the pico. The same free tools and support from an industry leader (let us make jokes, later:)). Raspberry Pi Pico ? I don't see this as god's chip. Don't let you fool from the hype. There are Ten of Thousands out there, if not more ... to choose from.
      Edit: I cheated a little: for the price of the Pico, you have to give up graphics acceleration but you have up to 160 flexible IO lines .... You can then connect externally via the memory interface, as well as operate quad SPI memory and what works as a PIO there does a DMA controller for normal people. The one described has 4.

    • @martandrmc
      @martandrmc 3 роки тому

      @@dieSpinnt In retrospect, comparing the 2 prices is not by any means the full story. There are devboards out there with an STM32 at around the same price as the pico that have better performance than an Uno but still have not gotten to be main-stream yet. Arduino has alot of software behind it that could also work with a Mega if performance is needed. In conclusion i dont think that Arduino is in as much danger as i have thought, but still the pico is backed by a similarly well-known company. It would not be equivalent to compare STMicro the same way. (Also sorry for not checking for a week)

  • @eFeXuy
    @eFeXuy 3 роки тому +64

    Finally! someone talking the PIO.
    And it has to be our favorite reverse engineer.

  • @suncrafterspielt9479
    @suncrafterspielt9479 3 роки тому +50

    A lot of knowledge, nice video. But I could not quite follow without examples

    • @stacksmashing
      @stacksmashing  3 роки тому +54

      For sure quite a dry topic, tried my best to create it as a 'reference' :) Next one will have some practical examples, that should help!

    • @suncrafterspielt9479
      @suncrafterspielt9479 3 роки тому +7

      Ok cool, cant wait for the next video

    • @frollard
      @frollard 3 роки тому +2

      Agreed. as stack says, needs to be a reference first...but would be nice to show a very brief example of an instruction executing (like how the effect on square wave is demonstrated).

    • @zetaconvex1987
      @zetaconvex1987 3 роки тому +3

      It would also help if he slowed down a bit. It's difficult to absorb information when it's blasted at you.

    • @spotlight-kyd
      @spotlight-kyd 3 роки тому

      @@stacksmashing Maybe videos are not the best medium for a reference, surprising as that may be in the YT age.

  • @gustavkusnir483
    @gustavkusnir483 2 роки тому +7

    Around 8:25, JMP (X--), the documentation says: JMP X-- and JMP Y-- always decrement scratch register X or Y, respectively. The decrement is not conditional on the
    current value of the scratch register. The branch is conditioned on the initial value of the register, i.e. before the
    decrement took place: if the register is initially nonzero, the branch is taken. (RP2040 Datasheet, page 320,321)
    The emphasis is on ALWAYS so that the decrement is ALWAYS done.

  • @GodmanchesterGoblin
    @GodmanchesterGoblin 3 роки тому +33

    I have been around microcontrollers off and on since the MK3870 at the end of the 1970s. Having this level of IO functionality driven by separate execution units with well thought out instruction sets is just mind-blowing in its possibilities. I know other chip families have had smart, programmable IO systems, but this takes it to a new level. As someone who used only to program in assembler for most of the 1980's, I found that this was a great video that explained the capabilities very well. Thanks. Subscribed.

    • @seancharles1595
      @seancharles1595 Рік тому +3

      Me too. I spent five solid years working with 6809,8085,Z80,68K and this video has left my mind reeling with questions like "Yes, but what can/can't you do with it?" I've seen one video of a guy who has recreated the original Transputer boards. I learned Occam for a bit on one of those.

  • @masonp1314
    @masonp1314 3 роки тому +60

    I love assembly language for it being so simple yet so complicated.
    If I'm programming, I always prefer low level, for some reason.... Yet I hate myself afterwards 😂

    • @edgeeffect
      @edgeeffect 3 роки тому +2

      Assembly language is delicious!

    • @chonchjohnch
      @chonchjohnch 3 роки тому +1

      If you want a good challenge, try implementing string.h

    • @JyrkiKoivisto
      @JyrkiKoivisto 2 роки тому +2

      Coming from Amiga programming background I always find myself reinventing the wheel... :) Love the low level stuff!
      I haven't watched the whole video yet, but somehow I think that the Amiga co-processor (Copper) has been made to do I/O

  • @TimoBirnschein
    @TimoBirnschein 3 роки тому +7

    This looks like the perfect uC to implement some very serious bus sniffers like I2C or SPI. BusPirate has proven to be too slow and unreliable for this, FPGAs as a bit too unapproachable for most.

  • @raulrrojas
    @raulrrojas 3 роки тому +5

    This clarifies lots what this board is intended to be, it is not just another microcontroller but a very advanced one. Thanks for the deep explanation

  • @ikocheratcr
    @ikocheratcr 3 роки тому +7

    I really like this feature in RP2040, I wonder how they come up with it. Is there any other microcontroller that has something like this?

    • @brycem8161
      @brycem8161 3 роки тому +1

      Cypress' PSOC series have fpga like programmable hardware blocks builtin.

    • @edgeeffect
      @edgeeffect 3 роки тому +2

      It's like a more accessible version of the Parallax Propeller.

  • @0xTJ
    @0xTJ 3 роки тому +9

    Nice to have this video! I've read through the datasheet section, but this helps in visualising how it all comes together

  • @WistrelChianti
    @WistrelChianti 3 роки тому +2

    9:08 isn't it off for 1 cycle, on for 2? (the 2nd cycling being the jmp command execution) just checking really.

    • @tmkkka8093
      @tmkkka8093 3 роки тому +2

      You are correct, but your timecode is wrong ;)

    • @peter9477
      @peter9477 3 роки тому +2

      More like 8:55 but yeah.

  • @rubenschaer960
    @rubenschaer960 3 роки тому +5

    Currently working on a PIO based project, and this video has been a life saver. I'd love see a video that has more examples of how IO mapping works in practice, especially with overlapping pins. Thanks for the great work!

  • @stal1963
    @stal1963 3 роки тому +6

    Excellent explanation. Thank you for this video! I reduced the speed of the video to 75% though which helped me watching the video in a more relaxed manner 🙂

    • @tmkkka8093
      @tmkkka8093 3 роки тому +1

      You know it's the creme de la creme when you go 0.75 speed :)

    • @chinoto1
      @chinoto1 3 роки тому

      Meanwhile, I'm watching at 1.5 and not fully processing everything.
      Oh well, I'm just trying to get the gist of it and I'll look at documentation when I'm actually working with it.

    • @zyxwvutsrqponmlkh
      @zyxwvutsrqponmlkh 3 роки тому

      ​@@chinoto1 Lel, I had to jump down to 1.5 from 3.5; video speed controller is my best plugin.

  • @agniveshadhikari
    @agniveshadhikari 3 роки тому +1

    So basically, my processor gave me a bunch of more complicated processors for free, and now I have to learn them. Great.
    /s

  • @johnadriaan8561
    @johnadriaan8561 2 роки тому +1

    12:03 Sorry, but you've got IRQ WAIT the wrong way around. You said "IRQ WAIT waits for it to be clear before setting it". No: IRQ WAIT immediately sets the IRQ but then waits for the IRQ to be cleared again.

    • @csbluechip
      @csbluechip Рік тому

      I'd like to confirm this should be added to the errata, qv. C SDK #3.4.9.3 : "irq wait Means set the IRQ and wait for it to be cleared before proceeding"

  • @turtius
    @turtius 3 роки тому +3

    wow, that was a fantastic video! _marlin 2.0 might be able to run on this_

  • @RebelPhoton
    @RebelPhoton 3 роки тому +4

    This is the video I've been looking for for the last two months! Thanks! Watching it on loop

    • @tmkkka8093
      @tmkkka8093 3 роки тому

      Exactly. It's quite complicated if one is new to assembler. .wrap_target at video start :)

  • @taranagnew436
    @taranagnew436 3 роки тому +1

    is there a cheatsheet on the io pins commends?

  • @BrownianMotionPicture
    @BrownianMotionPicture 2 роки тому +2

    I never fail to be impressed by the features of the rp2040, and it's

  • @LeoDDJ
    @LeoDDJ 3 роки тому +2

    Very concise and visual explanation. I like it very much! It gives a great overview _and_ details

  • @larsmuldjord9907
    @larsmuldjord9907 2 роки тому +1

    Currently looking into implementing i2s audio using the PIO sm's. It's easy enough to imagine "how to do it" in my head. But I have a hard time grasping "the right way". Been watching videos and read up on the documentation. Some stuff confuses me, some makes sense. This video was helpful, although I did miss some examples for some of the instructions and the whole concept of mapping certain pins to PINS are still a bit confusing to me. I'm a visual guy, so I definitely got more from the first part of the video with the visual aids. Great video nonetheless. :) Thanks.
    EDIT: Btw, one thing I am having a very hard time with, is trying to connect my data in my C / C++ code with whatever the sm reads / works on. That whole IRQ, DMA, FIFO, ISR, OSR situation makes my head explode. :D It's probably simpler than it seems. I just need to slowly work my way into it.

  • @mr.unbekannt2163
    @mr.unbekannt2163 3 роки тому +3

    Nice to have this video! This helps me to realize my project. But I don't understand the state machine, because from the UML perspective this is not really a state machine. A state machine must have an entry point and transitions between states, including conditions. The exit state is optional.

    • @peter9477
      @peter9477 3 роки тому

      Not sure where you're getting that definition. If it's from UML, then they've redefined the term. A state machine doesn't need an exit point. And it certainly doesn't need transitions defined between every state (if that's what you meant there). I've built many no-exit state machines, and almost none with all possible transitions allowed.

    • @mr.unbekannt2163
      @mr.unbekannt2163 3 роки тому +2

      @@peter9477 de.m.wikipedia.org/wiki/Zustandsdiagramm_(UML) im Vergleich dazu der de.m.wikipedia.org/wiki/Endlicher_Automat

    • @peter9477
      @peter9477 3 роки тому

      @@mr.unbekannt2163 I'm not sure what you're expecting me to get from that page. Are you claiming something in it contradicts me? Or are you claiming that the UML definition does require all possible transitions to be allowed? (In which case as I said they have redefined the term, and inappropriately, I might add.)

  • @edgeeffect
    @edgeeffect 3 роки тому +1

    After you've come through the assembly language door with PIO you can carry on down the rabbit hole and program the ARM cores in assembly too!

  • @LittleRainGames
    @LittleRainGames 3 роки тому +1

    So wait this runs separate from the main code?
    Man this micro is unbelievable, I want to switch to this, but not sure about the IDE, and Id need to be able to purchase chips.

  • @tubeDude48
    @tubeDude48 2 роки тому +1

    MOV Y, Y How about adding a *NOP* instruction instead.

    • @stacksmashing
      @stacksmashing  2 роки тому +2

      On a lot of architectures (like arm) no actual NOP instruction exists. Instead NOP will be encoded by the assembler to be i.e. MOV r0, r0.

  • @DigitalJedi
    @DigitalJedi Рік тому +1

    I absolutely love PIO in my chips. It means you can hook up just about anything you want, unconstrained by physical ports or dedicated controllers. It's almost like a tiny FPGA on your chip. My ultimate goal is to get multiple RP2040s running as a cluster using their PIOs.

    • @drivers99
      @drivers99 3 місяці тому

      I’m actually working on clustering a bunch of picos to rebuild Ben Eater’s 8 bit computer (but planning on using 16 bit addresses instead of 4 bit addresses for memory; 65536 bytes instead of only 16 bytes). It kind of silly to build a (slow) cup out of a bunch of processes but some good things are: lots of lights, ability to experiment with cpu architectures quickly (easier than wiring lots of 7400 series chips), and it’s fun and I just want to haha. Python is good enough but I want to using PIO if possible.

  • @edgeeffect
    @edgeeffect 3 роки тому +1

    After a lot of explanations that are either too vague or too specific, this is a nice concise description of how the PIOs work. Thanks.

  • @xyz2112zyx
    @xyz2112zyx 8 місяців тому

    I'm expecting for the Raspberry Pi Pico 2, with more SRAM, more PIO instruction memory and more GPIO's. I hope it will be showed in 2024 or 2025... who knows?

  • @martinrousselle6380
    @martinrousselle6380 3 роки тому +1

    WoW !!! exactly to the point , fast paced and covers everything , now when I read the spec. it will make sense ... thanks
    this is the BEST !!!

  • @lukamarin9622
    @lukamarin9622 9 місяців тому

    If this post wasn't so 'old', I could have swear it is 100% machine (AI) generated! The speed, rhythm, regularity of reading a text is definitely a robot's voice, no doubt in my mind. Anyways, a good presentation, although a bit superficial.

  • @TheFerdi265
    @TheFerdi265 2 роки тому +1

    I recently got a Pico and a VGA drmo board, and I've spent the last few days getting to know all of the nice peripherals the Pico has. This video is a great overview of the PIO!

  • @bennguyen1313
    @bennguyen1313 Рік тому

    Any examples of some of the cool things that people have imagined with this type of I/O power? For example, I looked for some logic analyzer or AWG, but nothing on YT shows up!

  • @WistrelChianti
    @WistrelChianti 3 роки тому +1

    Best PIO explanation I've seen so far! Thanks so much. Looking forward to the examples video. I tried to follow the one in hackspace mag but really struggled. I think largely I'm falling down on the buffers and the the shift registers and keep getting lost on what direction things are going relative to what (PIO SM, main cores, or pins/IO). Your diagrams/animations really helped in this video though so thanks for that effort.

  • @Lugeix
    @Lugeix Рік тому

    This remind be of 6502 coding in the 1970's. Looks like the same instruction set.

  • @piperna5786
    @piperna5786 3 роки тому +1

    Love this video, all I wanted to know in a pretty information-dense format

  • @zyxwvutsrqponmlkh
    @zyxwvutsrqponmlkh 26 днів тому

    I have this phantasy, where I go back in time with a boatload of these chips. And start selling them, but not as they are. Instead someone wants a ram chip, I gimp this thing down to be a ram chip. Someone wants a rom or a math compressor or a dac or whatever, they are all just this chip repackaged and trimmed down. When someone discovers what I did I leave never to be seen again. Leaving the world to scratch their heads.

  • @SimonTekConley
    @SimonTekConley Рік тому

    Wow, I didn't realize the Raspberry PI Pico's have been out for 2 years now.

  • @oskarboer1511
    @oskarboer1511 3 роки тому +1

    Great, sounds like an awesome thing to learn asm and how low level stuff actually works. Thanks for the great explanation!

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 3 роки тому +1

    8:28 The Motorola 68000 family had an unusual decrement-and-branch instruction: instead of decrementing and branching until the count reached zero, in which case it would stop branching and fall through (existing the loop), it would decrement to -1 before exiting. This let you deal easily with the case where the loop count was initially zero, in which case you want to just jump over the loop completely. E.g.
    move.w #count, d0
    bra loop_end
    top_of_loop:
    .... body of loop ...
    loop_end:
    dbra d0, top_of_loop

    • @lukamarin9622
      @lukamarin9622 9 місяців тому

      So had the Z80: 'djnz address', which stands for Decrement and Jump if Not Zero, where register b (8 bit) was the one being decremented. But these very rare and useful instructions (for creating loops) have not much to do with this discussion about PIO, which are far more complex and programmable!

  • @alexhirsch889
    @alexhirsch889 3 роки тому +8

    This is amazing. Thank you for the effort you obviously put into this (and your other) videos.

  • @michael-rommel
    @michael-rommel 3 роки тому +1

    Hi, I think there is another errata to be written: at 7:37 and 14:04 you explain, that "set pins, 1" turns an output ON, whereas at 9:01 you explain it as turning it OFF. Or did I misunderstand something here? Thanks for the great video - that was well-paced with dense information!

    • @stacksmashing
      @stacksmashing  3 роки тому +1

      You are absolutely correct, great catch! It's off for 1 cycle and on for 2 cycles. Added it to the errata.
      Glad you liked it!

  • @Grazfather
    @Grazfather 3 роки тому +1

    Great vis. How did you make these animations?

  • @RussTanner
    @RussTanner Рік тому

    Fantastic video - very well done. Do you have a followup video to this? I cannot find it on your channel.

  • @informativt
    @informativt 3 роки тому +1

    Was this designed by zachtronics?

  • @DeLaCruzer11
    @DeLaCruzer11 5 місяців тому

    This tie up everything together I've read or watched so far about PIO, but never quite get to breaking that threshold of solidifying my understanding of PIO. But the video did it for me. Great job!

  • @markderlo212
    @markderlo212 Рік тому

    Interesting but you talk too fast; this is a technical material so some time is needed to comprehend the new knowledge and put it into context

  • @rjameslower
    @rjameslower 3 роки тому +1

    Stupid question . What Is the diference between stm32 AND this pio?

    • @MrEdwardhartmann
      @MrEdwardhartmann 3 роки тому

      pio is a programable co-processor of the RP2040 micro processor made by Raspberry Pi. STM32 is a family of microprocessors (I think the company name is ST Microelectronics) - there are probably more than a hundred different versions of STM32 microprocessors depending on what capability you need. Here is a video comparing the black pill with an STM32f411ceu6 with a Pico - ua-cam.com/video/I2VcIKlL-9w/v-deo.html

  • @AZOffRoadster
    @AZOffRoadster Рік тому

    I was surprised to see Pi make this product. What, no linux? I'm in. It reminds me of bit slice programming on the AM2900, or the TPU on the 68332, or Motorola DSCs, or even EPROM based state machines. Now I just gotta think up an application.

  • @schwellhaimbassriot2660
    @schwellhaimbassriot2660 3 роки тому

    mal kurz weg vom nüntändö, hehe. didn't know that you can do so naice stuff with pio - fantastic.

  • @satelliteowner
    @satelliteowner Місяць тому

    great video . but where is the next vifeo you mentioned😂

  • @lohikarhu734
    @lohikarhu734 3 роки тому

    Quite a bit like the lighting control 'engines' that in the LP5523 LED controller (ca.2006), but maybe without the engine priorities(?), although the pin mux idea is similar. this allows for some pretty fast real-time functionality, without needing cpu intervention, and with a LOT of flexibility. (BTW, if you do need an LED controller that doesn't need you to constantly execute code to do complex LED functions, the LP5523 was designed to offload the cpu, and allow LED functionality when the cpu is in deep sleep, even has an "interrupt" input/output to respond to, or initiate, other hardware functionality.)

  • @txd
    @txd 3 роки тому +1

    Wow amazing video :D

  • @mr1enrollment
    @mr1enrollment 3 роки тому

    nine simple instructions and 42,000 modifying parameters,...
    ...
    I am a retired electronics engineer, I have been reading the pico docs, watching videos, and experimenting. This video is as close to an explanation of the PIO as I have found, and yet it is way too fast for absorption. What would be nice to find would be a Map of the instructions with the parameters shown in a graph format coupled with examples and explanations of the code.
    The PIO system IS NOT A SIMPLE SYSTEM, when you hear that it is, run.
    It may turn out to be a useful system, but if it remains as inaccessible as it is today, it will fail.
    I will push thru it, and learn it but I see a climb ahead.

  • @fred-9929
    @fred-9929 Рік тому

    Thanks for this PIO introduction! I now understand what I read in the datasheet ;o)
    I have a question: as IN and OUT pins groups can overlap, how are common pins handled? Do they automatically change direction depending if they are shifted in or shifted out?
    I'm asking because I would like to interface the Pico with a Z80 bus, so IN and OUT should point to the same pins...

  • @GottZ
    @GottZ 3 роки тому +1

    This is sooo nice! Imagine someone would create a gameboy cartridge with it xD

    • @stacksmashing
      @stacksmashing  3 роки тому

      Someone did! www.reddit.com/r/raspberry_pi/comments/lhym1v/gameboypico_update_we_have_a_working_game_but/

  • @davidsuzukiispolpot
    @davidsuzukiispolpot Рік тому

    I just stumbled upon this and am blown away by this feature. I wanted something like this in the past and was considering programmable logic.
    Does anyone know which other processors have this feature? Maybe the raspberry Pi computers?

  • @dougjones468
    @dougjones468 3 роки тому

    extremely helpful!! i had to play @ 3/4speed because i am from southern US and i listen as slowly as i speak)) i have posted question on rpi-forum about feasibility of pio-state-machines to implement canbus (would need external differential drivers), but sadly no answers. Please reply with opinion if you are familiar with canbus. many thanks for well done vid.

  • @kumarbhatia6566
    @kumarbhatia6566 3 роки тому

    Very good but very fast in the discussion. Have to rewind and listen a few times to digest the topics. 8:59 example for JMP is documented in reverse? First the output will be OFF and then ON for 2 cycles? Please confirm.

  • @m1geo
    @m1geo 7 місяців тому

    Really cool, thanks!

  • @thegenxgamerguy6562
    @thegenxgamerguy6562 3 роки тому

    Is PIO fast enough to emulate the bus operation of an 8 MHz CPU?
    I want to hardware emulate an 8086.

  • @TheJaguar1983
    @TheJaguar1983 Рік тому

    This reminds me a lot of the code in Shenzhen I/O.

  • @BashingDinosaurs
    @BashingDinosaurs 2 роки тому

    Thanks, cool video. Can the PIO instructions read analog inputs?

  • @xy-box
    @xy-box 3 роки тому

    I’m not clear: what is application for this? Maybe any examples? Do you continue?

  • @chrismeggs8795
    @chrismeggs8795 3 роки тому

    All this bitbanging is great! Takes me back to channel programming IBM/360. What I need now is a slightly higher level helicopter to understand the pico’s application in an architecture dimension.

  • @stylesoftware
    @stylesoftware 2 роки тому

    Can you do a vid on software tooling and first examples? Seems a lack out there in youtube land, we are all super keen to get PIOing!

  • @r.pizzamonkey7379
    @r.pizzamonkey7379 3 роки тому

    "So that's all there is to the state machine, pretty simple" after explaining like 11 different components, some of which have their own sub components in turn

  • @SWJIAO
    @SWJIAO 3 роки тому

    is it possible to implement QSPI(Quad-SPI) with PIO of Pico?

  • @philrod1
    @philrod1 3 роки тому

    This [stacksmashing] thing is pretty cool, I should learn more about it

  • @MrEdwardhartmann
    @MrEdwardhartmann 3 роки тому

    Thanks - I have been waiting for someone to make this video - you got my sub! I modified the ws2812 RGB example in the python code to work with sk6812 RGBW leds, and it was really hard to find any good examples of exactly what the PIO assembly instructions were doing. And even less info on what the python calls to that code was doing. I hope you will cover this in your future videos. Thanks for all your work.

  • @madierardmovies9634
    @madierardmovies9634 2 роки тому

    Aren't the arrows for RX and TX backwards on the shift register slide?
    ISR IN has a RX FIFO arrow pointing away from ISR IN. (and Vice versa for out)

  • @DeepspaceHorizon
    @DeepspaceHorizon Рік тому

    This is actually what i have been waiting for, if i understand it correctly. Thanks for this video! Do i get it right that i can read 8 bit in parallel by only one state machine and write it into memory via dma while data is being transferred via wlan from memory, and all this runs concurrently?

  • @vojtechmarsal8576
    @vojtechmarsal8576 3 роки тому

    What a nonsense, there surely is an adder since JMP can decrement and yet it is the only instruction that can do some math
    I appreciate stacksmashing's video a lot, to say its helpful is understatement. Thanks

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 3 роки тому

    16:33 Those are just labels that don’t have any special meaning to the assembler. The CPU program then has to set the values of these labels into the relevant PIO registers to enable wrapping.

  • @mandelbro777
    @mandelbro777 2 роки тому

    awesome explanation.
    these 8 PIO's will be super useful.

  • @patrickcs
    @patrickcs 3 роки тому

    I will make document from this it’s great. Do you have access to more info ?

  • @y2ksw1
    @y2ksw1 2 роки тому

    Thanks, this overview helped a lot to clarify some concepts.

  • @elektron2kim666
    @elektron2kim666 5 місяців тому

    Great run through.

  • @only1leddy
    @only1leddy Рік тому

    Is this assemblers?

  • @krystostheoverlord1261
    @krystostheoverlord1261 3 роки тому

    Oooo, this is very interesting! Could be cool to use the pio to hook up some picos together, honestly now I am super excited to get my hands on a batch;

  • @kaki9927
    @kaki9927 3 роки тому

    I always really enjoy watching these videos but afterwards I feel like I know nothing xD

  • @patrickcs
    @patrickcs 3 роки тому +1

    Great video. I would love to have this as a document. I’ll run through this slowly and make a lot of notes. It’s very useful. I’d love to know where you got the data from .

    • @zakz1586
      @zakz1586 3 роки тому

      Datasheets I presume

    • @_laxman_vijay
      @_laxman_vijay 10 місяців тому

      datasheets.raspberrypi.com/pico/pico-datasheet.pdf

  • @gudenau
    @gudenau 3 роки тому +1

    I'm going to want to make a specialized one wire serial adapter with this thing one day.
    Edit:
    Is there a simulator for this? I don't have the hardware to debug the input and output of one of these, would love to be able to provide some basic pin states over time and be able to plot what it does over time.

    • @dieSpinnt
      @dieSpinnt 3 роки тому

      Search for "Signal/Noise Ratio". One Wire ... ROTFL
      From Wikipedia: "1-Wire is a device communications bus system designed by Dallas Semiconductor Corp. that provides low-speed (16.3 kbit/s[1]) data, signaling, and power over a single conductor."
      There is a reason why this is low speed. By specification you don't need high-speed shenanigans like shown in the video and simply by the physics. It is impossible to get a good signal integrity via this bus-implementation at high frequencies. If you are flying up to the 100MHz+ range, nobody can deny technologies like LVDS and the study of high frequency behavior of electronics and the corresponding physics. Also, that the pico can theoretically generate these signals must not mean that he can also DRIVE the signals necessary.
      Don't get me wrong, please try your (by my understanding) worthless experiments. Maybe with a better bus? At least two wires? Well wired for high frequencies with buffers?
      The simulator: RTFM, I mean the data-sheet (Reference and Programming) and really ... you need a simulator for a $5 device you can debug and watch at the oscilloscope? Please stop joking ... no, have fun!:)

    • @gudenau
      @gudenau 3 роки тому

      @@dieSpinnt If you want me to get a DSO by all means send me the money.

    • @dieSpinnt
      @dieSpinnt 3 роки тому

      @@gudenau Nope. I am not forcing you into something. You can live without one, but then ... you simply can't do what you are trying to do. Just that:)

    • @stacksmashing
      @stacksmashing  3 роки тому

      Jedzia you should really overthink your attitude, you are not contributing positively.

    • @dieSpinnt
      @dieSpinnt 3 роки тому

      @@stacksmashing Take for example the very good qemu-arm emulator. It is impossible to translate timings to a real chip.
      High speed one-wire protocol ... I overthought it: He will try it with or without me.
      DSO: There are $29 STM32F103 based ones out there which would be fine for 16kbit/s. I don't gave that advice from thin air. To prevent tears and frustration!
      Low speed applications, but not for 200MHz SPI or something in that region .... which always works and you can as a bonus ... rely on!
      Skepticism is always not seen as positivity. But thanks that you RTFM and present that here with your videos. Can't wait for a real world app of PIO.

  • @paulmaher5434
    @paulmaher5434 3 роки тому

    Great video. Been reading around this all week without making much progress. Feel like I am starting to understand after watching this video. Well done.

  • @vamshioruganti6319
    @vamshioruganti6319 3 роки тому

    Great video, Thanks for your efforts, It is very useful.

  • @devnol
    @devnol 3 роки тому

    I like how this was released the same time as Rpf's video that explains PIO (but simply what it is, not how it works).

  • @Xperimenter
    @Xperimenter Рік тому

    This was very clear, thanks!

  • @tav9755
    @tav9755 3 роки тому

    Very good introduction into this interesting topic. Thanks for sharing

  • @deBaer
    @deBaer 3 роки тому

    Very well-made and informative video, thanks!

  • @aleXelaMec
    @aleXelaMec Рік тому

    Sad you didnt make some examples. But overall a great vid. Thanks

    • @trhosking
      @trhosking Рік тому +1

      He links to examples in the description

    • @aleXelaMec
      @aleXelaMec Рік тому

      @@trhosking my bad. Thanks

  • @mattsephton
    @mattsephton 3 роки тому

    00:06 thought my iPhone was upside down

  • @nithssh
    @nithssh 3 роки тому

    This video is amazing. Very comprehensive! Thanks for making it!

  • @critical_always
    @critical_always Рік тому

    What are you doing? Reading the manual?

  • @FluffyAngelUwU
    @FluffyAngelUwU 3 роки тому

    Go pio yeah yeah go pio yeah

  • @ryanj4274
    @ryanj4274 3 роки тому

    Outstanding explanation!
    Now I just need to get my hands on one...

  • @coder_rc
    @coder_rc 3 роки тому

    I literally never seen a raspberry pie nor even I am a hardware guy still understood everything in this video
    Awesome work!
    Gonna watch your all hardware videos!!!

  • @hariranormal5584
    @hariranormal5584 3 роки тому

    i kinda wanna make a calculator with this UwU

  • @magiceireann
    @magiceireann 3 роки тому

    I took this at a high level but thank you for bring this to my attention

  • @proxy1035
    @proxy1035 3 роки тому

    3:05 wait, since the Arduino core for the Pico allows for overclocking to ~250MHz does that also make the PIO run faster?

    • @tmkkka8093
      @tmkkka8093 3 роки тому

      Yes, PIO runs with system clock (so 250MHz overclocked) or you can set it to custom, lower frequency via a divider.

    • @csbluechip
      @csbluechip Рік тому

      I have seen reports of the RP2040 being overclocked to 270MHz, but the Pico Dev Board UNDERclocks the CPU to 125MHz ...so remember to calculate your divider based on the clock speed returned by `clock_get_hz(clk_sys)`

  • @Thaumatichthys
    @Thaumatichthys 3 роки тому

    8:19 shouldn't x be decremented even if it is zero?

    • @johnadriaan8561
      @johnadriaan8561 2 роки тому +1

      You're right. According to the RP2040 datasheet: "JMP X-- and JMP Y-- always decrement scratch register X or Y, respectively. The decrement is not conditional on the current value of the scratch register."