Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Pico's PIO peripheral is actually a really innovative feature in a microcontroller. It plugs the gap where you need some sort of fast custom I/O but you don't want to go to the complexity and cost of an FPGA. I'd love to see more mainstream vendors offer something similar.


It has been a feature of many TI microcontrollers ( and CPUs ) for quite a while under the name “PRU”



I thought the PRU was only available on their ARM A-series SoCs? I'm more referring to a bare metal microcontroller class part.


Exactly. And people have been also using them for this exact purpose. https://hackaday.com/2015/02/19/turn-your-beagleboneblack-in...

But hey, put 'Raspberry' or 'Arduino' label on it and suddenly it's so new and innovative it makes me sick.


> But hey, put 'Raspberry' or 'Arduino' label on it and suddenly it's so new and innovative it makes me sick.

I get why you feel that way. I think that's the nature of the huge internet and younger folk learning every day. I totally get pissy every time I see someone repost a "discovery" that is 20~30 years old and I've seen many times, just to farm clicks, karma, or whatever internet points their platform rewards. But I think that's just life now: everything is "look at me!" tiktok-ified, even engineering.

But the dude really is pushing the limits of the PICO here, always nice to see someone doing something other than blinking LEDs and jizzing about it on reddit, right?


My reaction was only meant as a response to @Sanzig calling PIOs innovative.

The logic analyzer itself, even the usage of cheap Pico in it is very cool.


Well dammit, now I'm the a*hole. ;)


For one thing, the PRUs require TI’s bloated mess called CCS and knowing C whereas the PIO assembly can be written in Python. What’s really innovative is the ability to get PRU-like functionality on a literal $1 IC. Sure, you only get 32 instructions per state machine, but not everyone needs full blown ARM cores for real-time.


They don't require it. When I used it, everything was just written in assembly (you get a few more instructions but you're still basically doing bitbanging with cycle counting, so using C is a bit awkward anyway). The PIOs are a pretty neat trimmed down version of the idea though, clearly someone put a fair amount of effort into making them as flexible as they are for how minimalist they are.


I think C is a trap, honestly. I have used the PRUs before and wrote my code in C. 99% of the time, I was just reading the assembly outputs trying to figure out how many instructions some C statement actually compiles to. Should have just written raw assembly for the timing-sensitive parts.



Bit of a difference between a cheap microcontroller board and a BeagleBone Black.

Superficially the PRU and the PIO do indeed look similar. Look more closely and you'll see the PRU is both more complex and more capable than the PIO. It's a small CPU core in its own right with predictable timing. PIO is significantly simpler, almost more of a programmable state machine than a proper CPU. So yes less capable but also integrated into a cheap micro-controller rather than a Linux booting SoC with all the complexity and cost that brings.

That really is why the PIO is interesting, it's the significant capabilities they bring combined with the low price point and simple chip.


Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRUICSS).

Documentation: Pages 198-521 out of this 5118 page PDF:

https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf


Or, more like TI locked you in to their garbage IDE that cost quite a lot of money to unlock fairly standard debugging and compilation features. They entirely shot themselves in the foot with that one.


Maybe because the primary markets for TI and Raspberry are different.


And let's not forget poor XMOS.


Vendors won't offer that capability cheaply. That's against their business model of "differentiating" on peripherials and extracting value from that.

So it would be interesting how this will affect the mcu market, long term.


I would love a version of Pico PIO with analog out (along with a limited integer ALU, or perhaps just shifts and some logical ops). A fast DAC should be cheap in silicon, right?


The pimoroni servo2040 uses the PIOs to PWM 18 servo channels: https://shop.pimoroni.com/products/servo-2040?variant=398005...

I'm annoyed at the power arrangement on the board but they're fun to play with.


That's a nice usecase. Servos are slow mechanical things.

I wanted to make a CGA/EGA-to-VGA converter, possibly combined with a scandoubler. Maybe it's still possible using resistor arrays on the output side.


Have you seen gbs-control?[1] It's not exactly what you're trying to do, but maybe close enough?

[1] https://github.com/ramapcsx2/gbs-control


(Very late, sorry.)

I hadn't. That does look very interesting. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: