zlacker

[parent] [thread] 22 comments
1. zahlma+(OP)[view] [source] 2026-02-04 18:43:04
> I like the Raspberry Pi RP2040 a lot. It's relatively cheap (around $1 USD) and has tons of on-board RAM - 264 KB in fact! It also has what is called Programmable IO, or PIO.

I wonder how benchmarks would compare between the RP2040 and, say, a Z80.

replies(2): >>burnte+n3 >>ajross+wf
2. burnte+n3[view] [source] 2026-02-04 18:59:02
>>zahlma+(OP)
It would destroy the Z80. It's a 32bit, dual core CPU running at 133MHz. Even single cored it'll thrash a Z80. Heck, I bet you could create a drop-in replacement board for the Z80 using an RP2040.
replies(3): >>ge96+84 >>PaulHo+9e >>zahlma+Aj
◧◩
3. ge96+84[view] [source] [discussion] 2026-02-04 19:01:33
>>burnte+n3
Crazy what you can buy nowadays like the Teensy 4.0 with 600MHz base clock

Granted that's $20 not $1

replies(2): >>fortra+B7 >>MPSimm+1a
◧◩◪
4. fortra+B7[view] [source] [discussion] 2026-02-04 19:17:50
>>ge96+84
The key here is the "PIO" which you won't find on a Teensy. It lets you do extreme "bit banging" tricks including generating video. People have even implemented Ethernet on it. I've used it for some custom serial protocols ("Weigand") used by alarm panels.
replies(1): >>ge96+f9
◧◩◪◨
5. ge96+f9[view] [source] [discussion] 2026-02-04 19:26:30
>>fortra+B7
Really I guess I don't know what that is then as I buy the Teensy since it has so much IO, multiple UART, multiple I2C busses, sd card reading, etc...

edit: interesting

(Teensy | Pico)

Special Features: CAN Bus (3x), SDIO, S/PDIF | PIO (Programmable I/O) (8 SMs)

replies(1): >>fortra+XG
◧◩◪
6. MPSimm+1a[view] [source] [discussion] 2026-02-04 19:30:10
>>ge96+84
My sweet spot of choice between power and price is the ESP32 S3 (2x core @ 240mhz) at ~$6 per board, but yeah, the power to dollar ratio is crazy these days, across the board. And they are absolutely tiny and sip power if you write the code well.
◧◩
7. PaulHo+9e[view] [source] [discussion] 2026-02-04 19:52:48
>>burnte+n3
Note it was possible to use a Z80 to function as a display controller, people used to do it back in the day...

https://archive.org/details/Cheap_Video_Cookbook_Don_Lancast...

replies(1): >>TapamN+fV
8. ajross+wf[view] [source] 2026-02-04 19:59:16
>>zahlma+(OP)
The RP2040 is a Cortex-M0, which is about the smallest core you find on modern systems but still a pipelined 32 bit RISC machine running in the dozens of MHz.

Note though, that the article is really about the PIO device on these SOCs', which isn't part of the main CPU at all. It's sort of a very limited programmable hardware engine for the specific task of doing PCB level interconnect using GPIO and lightly buffered streaming. In some sense it's like a thematic midpoint between an FPGA and a CPU.

It's... honestly it's just really weird. And IMHO has really, really, REALLY limited application. It's for people who would otherwise be tempted to bitbang an I2C or UART, but not for ones who can put hardware on the board themselves, or who have a FPGA handy, or even for people who want to do non-trivial stuff like QSPI displays[1] or whatnot.

Basically PIO smells like a wart to me. I genuinely don't know who wants it. Regular hackers aren't sophisticated enough to use it productively and the snobby nerds have better options.

[1] The linked article appears to be doing a quarter-VGA display in 3-bit/8-color, and is sort of right at the limit of the power of the engine.

replies(2): >>dmitry+Zl >>duskwu+ou
◧◩
9. zahlma+Aj[view] [source] [discussion] 2026-02-04 20:19:32
>>burnte+n3
Yes, I understand that, but I wonder about the multiple (obviously there is more to it than clock speed). I chose the Z80 because of its long-standing reputation.
◧◩
10. dmitry+Zl[view] [source] [discussion] 2026-02-04 20:29:06
>>ajross+wf

  >Basically PIO smells like a wart to me. I genuinely don't know who wants it. Regular hackers aren't sophisticated enough to use it productively and the snobby nerds have better options.
what are you blathering on about, sir?

driving complex displays with no spu use: https://dmitry.gr/?r=06.%20Thoughts&proj=09.ComplexPioMachin... (my work)

pretending to be memory stick and sd card at dozens of mhz as a slave to a sync bus (my work)

ethernet: https://github.com/kingyoPiyo/Pico-10BASE-T (not my work)

68k bus slave (my work)

usb host https://github.com/sekigon-gonnoc/Pico-PIO-USB (not my work)

all on a $1 chip

replies(1): >>ajross+vp
◧◩◪
11. ajross+vp[view] [source] [discussion] 2026-02-04 20:43:03
>>dmitry+Zl
> what are you blathering on about, sir?

Please don't.

I mean, I applaud your work. But let's also be honest (in the "tough love" sense): those are all toys with significant limitations that preclude anyone shipping any of them on an actual device to an actual consumer. I mean, your SOC (maybe a $2 one) surely already includes a SPI master and USB host!

Actual interconnects that solve real market problems have big boring spec books and competing implementations and silicon vendors. The application for PIO is basically limited to "I have to connect to this crazy old junk and no one makes the part I'd otherwise need".

replies(2): >>Gracan+kw >>dmitry+HO
◧◩
12. duskwu+ou[view] [source] [discussion] 2026-02-04 21:04:05
>>ajross+wf
> The linked article appears to be doing a quarter-VGA display in 3-bit/8-color, and is sort of right at the limit of the power of the engine.

The resolution and color depth restrictions were the product of the low data rate of USB FS (~12 Mbps), not inherent limitations of PIO.

> It's... honestly it's just really weird. And IMHO has really, really, REALLY limited application.

I'd agree with "weird". But it's useful weird; it turns out that there are a lot of situations where PIO can avoid the need for an application-specific peripheral, and can provide that function in a more flexible fashion than a fixed-function peripheral could. Dmitry's SDIO device emulator is a great example - almost every other SDIO peripheral on the market is host-only.

replies(1): >>ajross+9y
◧◩◪◨
13. Gracan+kw[view] [source] [discussion] 2026-02-04 21:13:03
>>ajross+vp
Having dealt with the errata sheets for microcontrollers with all those fancy IO devices that solve real marketing problems etc, I'd kill to fix those problems with a software upgrade.
◧◩◪
14. ajross+9y[view] [source] [discussion] 2026-02-04 21:20:48
>>duskwu+ou
> it turns out that there are a lot of situations where PIO can avoid the need for an application-specific peripheral

And I can only repeat: I think that's an aspirational delusion. I'm not aware of anyone shipping a PIO solution to anyone in volume. It's "useful weird" to Hackerspace nerds like us, and that leads to some epistemological skew.

Hardware needs to be boring and reliably supported (by people you can sue!) or else no one will bet a 10k unit PCB run on it. This is anything but.

◧◩◪◨⬒
15. fortra+XG[view] [source] [discussion] 2026-02-04 22:07:32
>>ge96+f9
The Pico PIO has an instruction set and can be programmed.

You write PIO assembly that runs autonomously on a state machine, with explicit timing (e.g., out, in, set, mov, jmp, wait) and cycle‑accurate interfaces. The CPU communicates via small FIFOs, and interrupts are optional; the PIO can be “fire‑and‑forget” for many protocols.

replies(1): >>ge96+8M
◧◩◪◨⬒⬓
16. ge96+8M[view] [source] [discussion] 2026-02-04 22:33:36
>>fortra+XG
That's cool, I'm not at that level right now, side note I bought an FPGA like 5 years ago and still haven't used it.
◧◩◪◨
17. dmitry+HO[view] [source] [discussion] 2026-02-04 22:47:53
>>ajross+vp
if you find a SoC for $1 that has 2 Ethernet ports, and a usb host on it, while also having two cores and supporting 32MB of RAM you'll surprise me. rp2350 does all of the above for $1
replies(1): >>duskwu+yU
◧◩◪◨⬒
18. duskwu+yU[view] [source] [discussion] 2026-02-04 23:21:29
>>dmitry+HO
Have you tested out the 2x PSRAM configuration; if so, have you written anything up about it? :) I've thought about a configuration like that myself but haven't committed to any hardware yet.
replies(1): >>dmitry+od1
◧◩◪
19. TapamN+fV[view] [source] [discussion] 2026-02-04 23:25:39
>>PaulHo+9e
The Galaksija computer used it's Z80 to help generate the video signal. I'm not sure how its implementation compares to your link.

https://en.wikipedia.org/wiki/Galaksija_(computer)

https://media.ccc.de/v/29c3-5178-en-the_ultimate_galaksija_t...

◧◩◪◨⬒⬓
20. dmitry+od1[view] [source] [discussion] 2026-02-05 01:40:33
>>duskwu+yU
yes i have tested it and no i have not written about it (yet). it does work and with the new ISSI 16MB chips, it gives 32MB of continuous memory!
replies(1): >>duskwu+ie1
◧◩◪◨⬒⬓⬔
21. duskwu+ie1[view] [source] [discussion] 2026-02-05 01:48:44
>>dmitry+od1
Awesome - I might just have to try it.

How are you handling startup? The approach I had in mind was putting boot flash on the second channel with a separate CS pin from PSRAM and configuring that in OTP; any idea if that would work?

replies(1): >>dmitry+oj1
◧◩◪◨⬒⬓⬔⧯
22. dmitry+oj1[view] [source] [discussion] 2026-02-05 02:30:36
>>duskwu+ie1
Yes, sort of. Basically a tiny loader in OTP that enables nCS1 on some pin, copies code from there to ram on nCS0, reconfigures nCS1 to point to second ram. This does break usb flashing. Use swd.
replies(1): >>duskwu+xn1
◧◩◪◨⬒⬓⬔⧯▣
23. duskwu+xn1[view] [source] [discussion] 2026-02-05 03:08:44
>>dmitry+oj1
Is there no way to do that without code in OTP? The bootrom is supposed to scan for an IMAGE_DEF on both memory banks, and can use nCS1 as specified in FLASH_DEVINFO. Unless there's something I'm missing, that should be sufficient.
[go to top]