7 ms·
An interactive-speed Linux computer made of only 3 8-pin chips
- classichasclass 2y agoThis pleasantly reminds me of the little 6502 or 1802 Altoids-tin computers you can buy and assemble, but arguably more "useful" (though I get a lot of use out of a 6502 ;-).
- SpaceNoodled 2y agoWhat do you do with your 6502?
- FirmwareBurner 2y agoI knew it was gonna be dimitry from reading the title
- dmitrygr 2y agoNot sure if compliment or insult :)
- yapyap 2y ago> There was a time when one could order a kit and assemble a computer at home I think I get what OP means but you can definitely order a pc kit and just assemble it nowadays
- dmitrygr 2y agoNot in the same way. Not with a soldering iron and schematics.
- mrguyorama 2y agoI recognize there is something hard describe about how "it's not the same", but: https://eater.net/shop https://eater.net/shop
- dmitrygr 2y agoYes, but sadly that cannot run modern Linux
- dvh 2y agoPlease tell me you didn't use ENIG for the USB connector. It would be sacrilege.
- dmitrygr 2y agoI am just a lowly software guy who pretends to know how to use EAGLE. To me “ENIG” just means “5% more expensive boards”. What did I miss?
- Neywiny 2y agoENIG is gold coated not solid gold so it'll wear off and the metals under it will likely corrode. I think the majority of my USB connectors I eventually see wear marks on them.
- dmitrygr 2y agoI see. These contacts are just lead-free-solder coated, and thus is easy to re-apply with a soldering iron if they start wearing.
- deleted 2y ago[deleted]
- myself248 2y agoI have the perverse urge to forego even the board, and just make this a circuit sculpture.
- alnwlsn 2y agoIt's almost 2 chips. One is just a USB-serial IC! But you didn't count the SD card, so you're up to 3 again. Total pin count is so low on this, I'm very tempted to make a dead bug version.
- dmitrygr 2y agoI didn’t make a dead bug version so you’d be first :). Microsd-to-sd adapters make good solderable microsd holders.
- blacklion 2y agoUSB2Serial IC could go to the cable made by others and "doesn't count" as µSD doesn't count.
- russdill 2y agoThe SD card itself contains a fairly powerful processor, likely a 32-bit ARM. It would be a fun hack to do a similar trick with that.
- genewitch 2y agoi have an eye-fi SD card that has wifi built in. So you don't even need the serial port!
- dmitrygr 2y agoBeen there. Done that. Got the t-shirt: https://dmitry.gr/?r=05.Projects&proj=15.%20Transcend%20WiFiSD https://dmitry.gr/?r=05.Projects&proj=15.%20Transcend%20WiFi...
- genewitch 2y agoreal nice work! I didn't think a mere upvote conveyed how cool it was to see this, and have a response nearly immediately.
- userbinator 2y ago
- zokier 2y agoI think it would be cute to also use 8 pin SPI flash chip instead of SD card for storage.
- dmitrygr 2y agoLooked into it. But then the “getting files in and out” story gets hard.
- mystified5016 2y agoI'd be very surprised if there isn't a filesystem driver for SPI flash. Linux obviously can speak SPI and SPI flash is extremely common in a lot of applications.
- dmitrygr 2y agoI mean once assembled. In my design you can remove card, put files in, boot again, use the files.
- ajb 2y agoTheoretically you can use one of these: https://www.tindie.com/products/bobricius/micro-sd-card-to-spi-flash-adapter/ https://www.tindie.com/products/bobricius/micro-sd-card-to-s... I haven't tried it so I don't know how well it works
- Neywiny 2y agoIt looks like a passive mechanical adapter. I'd argue that a SOIC-8 programming clip thing would be better. This looks like you need to write a decent amount of code for a computer to talk to it as easily as a FAT-16 SD card.
- ajb 2y agoYou're right; it looks like SD cards implement a protocol on top of SPI. They don't just map the content to SPI addresses. So a flash chip won't look like an SD card to the OS
- em3rgent0rdr 2y agoI'm always a bit saddened to see that a separate chip is the go-to method to interface with USB. Unfortunately USB is an incredibly-complex protocol that it seems anything beyond a basic V-USB running USB 1.1 at low-speed is generally not doable without specialized hardware and a significant software stack. Meanwhile a protocol like SPI is ridiculously simple...the minimum hardware needed is a shift register that can be clocked fast enough. I miss how desktop and labtops used to have an exposed serial and parallel port, which could communicate at this low level. I often wonder if instead of USB existing that we instead stuck with UART, I2C, or SPI multidrop (using a small set of standard clock rates) for simple peripherals (maybe over a single connector like the 4-pin JST SH cable for Stemma QT, Qwiic and Grove) over a short distance, and then jumped to IEEE 802.3 Ethernet links for data-heavy peripherals like monitors and external drives. Then instead of having to have separate support for USB and Ethernet, you just would support Ethernet links.
- tylerflick 2y agoI mean technically you have all of these interfaces on a raspberry pi.
- malfist 2y agoTad more than 8 pins on a pi
- em3rgent0rdr 2y agoYes, but the RPi is not yet quite a standard desktop/labtop workstation. And it would be nice if the RPi exposed its SPI, I2C, and UARTs over a standard mini connector like JST-SH connectors to ease plugging in peripherals (like is done with Stemma QT, Qwiic and Grove).
- parl_match 2y agoi mean... someone did try this with i2c. a couple of dead computer companies shipped a bus that i forget the name of, based on this concept. its descendant is the vga hdmi control channel spec (which was implemented as a de facto separate standard but is very similar) the name is escaping me
- coupdejarnac 2y agoUnder parts selection.. Even considering the PIC 16F. Why.
- dmitrygr 2y agoEvery 8 pin MCU was given a shot
- rhelz 2y agoWas there no native ARM linux you could have used? As I recall, you have used this emulated MIPs technique in many of your published projects, so it's good to prove that the hardware is working? Or why not just go full native....grab some MIPS-core IP and make your own with an FPGA?
- dmitrygr 2y agoBecause no FPGAs come in 8-pin packages And no Linux runs on cortex-m0 with ram attached over SPI. And MIPS is the easiest Linux-compat architecture to emulate.
- IAmLiterallyAB 2y agoSurely emulating ARM on ARM would be faster / easier to JIT? Or at least it seems that way
- dmitrygr 2y agoActually, no, mips is an easier JIT target than arm as well. Source: I've written both ARM-to-thumb1 and MIPS-to-thumb1 JITs
- IAmLiterallyAB 2y agoFascinating!
- dmitrygr 2y agoThe main hang-up is that ARM uses PC as a general register a lot and in ways that make translating ARM instrs rather messy. ADD R0, SP, PC, ROR SP is entirely valid, even if nonsensical, instruction. But you must translate all valid inputs, else you risk breaking things. That may be a contrived example, but here is a common one: if one has a jumptable of relative offsets somewhere, pointed to by R10, even this is valid: LDR R0, [R10, R0, LSL #2] ADD PC, R10, R0 That gets messy to translate
- nine_k 2y ago> So, which pins could be combined with SDIO's three? After much thinking, the solution is obvious. RAM's nCS can be the SD card's CLK. RAM's CLK can be the SD card's CMD. RAM's MOSI can be the SD card's DAT. Try and figure out all the possible interactions with each device and what that would look like to the other, to convince yourself that it will work safely. This is truly a brilliant hack, well worth publishing at Hacker News.
- jlg23 2y agoAnd worth a shirt "After much thinking, the solution is obvious."
- dmitrygr 2y agoThere was an old joke. University math class. Professor writes a huge formula on the board. Says, "and from this, it is obvious that," and writes another very different large formula on the board. He stands for a second, says "hm...", and walks out of the lecture hall. He returns 30 minutes later, throws a stack of papers freshly-covered in writing unto the desk, mutters "yeah, that indeed was obvious", and continues the lecture.
- mionhe 2y agoMy dad actually did a form of this, at the encouragement of a teacher. He was working out the proof to a problem in college and got stuck half way through. He had the problem and the answer, so he worked it from both ends and got stuck in the middle. He had to present the process in class, so he went to the professor for help. His professor (who had done it originally) couldn't remember how anymore, and told him when he got to that point, he should say "and from this, it's obvious that..." and just jump to the next step. That's exactly what he did, and no one in class (half hour into the class) even noticed.
- pclmulqdq 2y ago"It is obvious that..." usually means "with large amounts of algebra but very little actual thinking" when properly used in a math textbook or lecture. It has its utility.
- thedanbob 2y agoI've dabbled in microcontrollers and enjoy how the limitations force me to find creative solutions, but this is truly next level. I'm not great with a soldering iron but I'm seriously considering assembling one of these.
- curtisszmania 2y ago[dead]
- kragen 2y agoAside from the project itself being very cool, this page is a great source for information about small microcontrollers, even if it does omit the WLCSP ones. And it links to the MIPS emulator page for ARM at https://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard https://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard which seems very interesting.
- kibwen 2y agoExcellent article, thanks. At the risk of missing the forest for the trees, I wonder how much simpler things would have been if you had been slightly flexible on the 8-pin requirement. It seems as though having just a few more pins would have reduced the complexity of the project significantly while only marginally increasing the time it takes to solder.
- dmitrygr 2y agoIt would be no challenge at all then. And no fun. There are plenty much faster chips with USB built-in Hell, allwinner v3s is hand solderable and has built in RAM and will happily boot Linux natively Rp2350 would also be an excellent choice. It has a very good QSPI ram interface with cache built-in and usb support.
- RainyDayTmrw 2y agoHand-solderable might be relative. Certainly, QFNs and BGAs are more difficult. But I don't think the average hobbyist can solder QFPs, especially with an exposed underside pad. Heck, as a hobbyist, I don't think I'd trust myself to solder SOICs.
- dmitrygr 2y agoSoic8 is doable as your first soldering project. I tried this out on a few people successfully.
- tromp 2y ago> but I am allergic to RISC-V for personal reasons. Do you mind elaborating?
- dmitrygr 2y agoI find the instruction set distasteful. I don’t want to start a flame war. This is just my opinion, but it is a strong one. It was designed late enough in history to have taken advantage of a lot of available information. None of it was taken advantage of. Which is why a lot of extensions are now being proposed to actually fix things that should’ve been done right in the first place. With all the additions, it is slowly approaching sanity, only 10 years later. And I don’t buy the excuses that the learning process needed to happen. All the information was available all along, and the mistakes were obvious to basically all of us all along Some of the extensions are only Band-Aids for the real design issues. Eg shadd2 is a bandaid for not having proper addressing modes for accessing arrays. A common refrain to answer this is composed of promises of magical instruction fusion in the core. This is often promised, but never delivered. Certainly not in the cheap kind of processors that are the only target for RISC – V. Not having instructions for a bitfield extraction and insertion is also an amateur mistake. That’s why there are extensions to fix that one too. But it should’ve been obvious from the beginning that it would be necessary. A conditional branch based on a bit in a register is another obvious thing that should’ve been considered from the very beginning as it is commonly encountered. Any analysis of modern software would’ve shown this. What annoys me is the information was available. We know what sorts of things modern software does. It was all ignored. Instead, we got a slightly updated mips-1. And now with all the extensions, it’s fragmentation galore. You can either target the final result (RV23, I think is the name), which is somewhat sensible, but no hardware implements, or you can target the least common denominator, which will run everywhere, shittily There are other, more serious, design issues when it comes to attempting to use RISC – V for actual high-performance computing. I’ll save those for another rant. At approximately the same point in history, another instruction set was designed. It actually took advantage of all the knowledge available about what modern software looks like, and it shows: aarch64.
- mixmix 2y ago
- _Microft 2y agoThanks, this was very insightful and entertaining once again! One thing: you might want to mention the required board thickness (0.8mm, iirc?) for people planning to have their own boards made. Edit, explanation for others: that is required to make the "USB-C edge connector" fit the plug.
- sim7c00 2y agosuper fun read thanks. cool result too :)! also love all the different options for hw discussed in lot of details. thx!
- blacklion 2y agoIt is very cool project, buy I think author (I know, you will read this) take it to the extreme. Again, it is very cool technically, but it contradicts declared goal: to make new computer kit for beginners. IMHO, it is doesn't matter for novice, what to solder, SOIC8 or SOIC28. SOIC28 is as easy (or hard, if you want) as SOIC8. And larger chip could make much more useful computer: it will be possible to add some minimal sound (as such chips typically have DAC), keyboard, and, maybe later, true monitor output in VGA style (not DP or HDMI of course). It will be not much harder (if at all) to solder, but could be good base for expansion if owner gain interest in such things.
- dmitrygr 2y agoYes. And you’re free to use my code to do that. I wanted the fun artificial limitations 8 pins
- blacklion 2y agoIt is interesting how to go to the limits of low-end author needs to implement CPU emulator. It is not obvious, that you need ADD layers at this level, not REMOVE them!
- jdndjsjndn 2y agoI agree! While it is a fairly common approach -- eg the Apollo guidance computer interpreted the equations instead of directly executing them, or sweet16 by woz -- it is not obvious at first
- ingohelpinger 2y ago> It does not help that modern operating systems require gigabytes of RAM, terabytes of storage, and always-on internet connectivity to properly spy on you Love it.
- Imustaskforhelp 2y agoWhy am I imagining this being used for really serverless iot infrastructure? Like imagine that you wanted to deploy something on a lot of huge devices, well by using something like this open source and really limited but (with it just works), you can actually have pcb providers build it and ship it in their warehouse / wherever and just provide it energy and ethernet and now you can probably ssh into it / even create some sort of Vercel-like UI on top of it(Coolify/Dokploy? though we would need to slim down docker a lot for Dokploy? ) and when the work is done , they would actually scrape the metal /pcb and / reuse it again... I am not sure if such metal /pcb recycling makes sense... If anyone technical can respond to this, it would be great. This can also be done with risc-v as well. I am not sure but I was thinking of creating a very dead simple company (my brain and its weird thoughts... , also Don't copy me or if you do, then hire me xD) which just can take a device like old phones and then just root them using AI? / manual or maybe not even root it? IDK..., Basically then providing them internet access and energy (Not a traditional warehouse) because you actually only pay for the one time fees and afterwards all the fees that you pay, they are of the real costs bore by the company operating it / no middle man profits. Kind of like a "Costco" (oh I had forgotten name of Costco and I had to search target alternatives xD) where they actually are there to help you save money but for you to use their services you gotta have a card.