Friday, July 12
Using Undergrads As Mine Detectors Edition
- So it turns out that someone has already tried to implement my DMA-driven video idea on a PIC32MX. Two of the students of the Cornell University course I linked to previously did it for their final project.
Only ICs they needed to add were two 74LS quad AND gates.
Except they ran into a serious issue, specifically that the CPU always has priority for memory access over the DMA controller. So they couldn't take their original approach, which was a full-colour display, because the timing wasn't reliable enough.
Instead they used the SPI to drive a high-speed 640x480 monochrome signal - which is not something I'd thought of - and used the DMA for a low-resolution colour and ANDed the two signals together. SPI is a neat hack because it that parallel-to-serial conversion is very costly in software but the chip has two SPI interfaces that handle it for free, and at the necessary 25MHz clock.
It's not perfect, but it's very impressive for a student project. Remember, this chip has no video hardware at all. They created VGA graphics out of thin air.
- The PIC32MX is the only chip available that you can use on a breadboard that can pull this off, and it can't pull it off perfectly. To get any further you'd need to go to surface mount and either go to all the time and trouble and cost of assembling the boards yourself or ship the designs and parts off to... Ten boards for $5 plus assembly? And the assembly is as little as a dollar a board? Oh, plus $25 setup.
Well, that explains why no-one does it the old way anymore. If you plan to produce more than one, maybe two boards, it's cheaper to outsource it all. Cheaper and much, much easier.
- I might go back and take another look at Arm chips like the SAM4C32 I mentioned before. (Microchip)
Where previously I had exactly four options (plus two variants of the dsPIC audio chip), Mouser has 4,709 different models of Arm microcontrollers in stock. (Mouser)
Time for some parametric mining. I saw that STM had some parts with built-in DACs, which would avoid the need for a separate audio chip. Although if I'm using surface mount, I can find any number of I2C audio codecs or multi-channel DACs to use.
If I exclude all parts with less than 128KB of RAM (previously I was planning to use two parts with 64KB) or slower than 100MHz (previously two 50MHz parts) I get down to 1104 choices, ranging from A$5.41 for a basic 120MHz M4F part from Microchip (who also make the PIC) with 256KB flash and 128KB RAM, all the way up to A$178.52 for a Texas Instruments safety-critical microcontroller with ECC parity throughout and dual CPUs running in lockstep like the Tandem Nonstop or the Shuttle flight computers.
Should be something in there...
Update: So, two relatively inexpensive options are the STMicro STM32F413RGT6 and the Microchip ATSAME53J20A. Both are Arm Cortex M4F parts. The STMicro part has 1MB flash, 320KB RAM, and runs at 100MHz, price $13; the Microchip part has 1MB flash, 256KB RAM, and runs at 120MHz, price $8. So it's 20% faster but has 20% less RAM, and a fair bit cheaper.
The STMicro part has a built-in dual 12-bit DAC, which would otherwise cost me $5, making up the price difference.
The Microchip part has an Ethernet MAC (though not a PHY, so it still needs an external part). Wait, the Microchip part also has a built-in dual 12-bit DAC. Hmm.
The Microchip ATSAME70J20 has 1MB flash, 384KB RAM - so 20% more again - and, um, is Cortex M7 running at 300MHz, putting it in an entirely different performance class. Three, probably four times faster. Still a tiny 64-pin package, price $14. Also available with 2MB flash for another $3, which is about 2000x the going rate for SSD storage but whatever.
- Update: I've figured out an, um, interesting way to make my original idea work by adding one more part - a 32Kx8 12ns static RAM chip. I can attach it to the CPLD system controller and use it as the line buffer in place of internal memory. That can hold 50 output lines, which would make it pretty much immune to glitches.
The RAM and CPLD are both fast enough to run double the pixel clock if I need them to, but I can probably run at pixel clock and refill during retrace. If I use the larger size CPLD I can feed the spare output pins of the CPU in as well and have it generate sprites and do 8-bit hardware RGBZ - 64 colours with 4 graphics layers.
Also, the RAM a 28-pin narrow DIP just like the PIC32MX, the dsPIC33, and the headphone amp. So it's one row of matching 28-pin parts, one PLCC CPLD, and maybe an 8-pin flash chip if I can source it.
- I see the good Mike Masnick has the keyboard today: Alexandria Ocasio-Cortez is being sued for blocking people on Twitter. (TechDirt)
Mike points out that the arguments trying to differentiate this case from President Trump are pure partisan bias.
- Why is the Washingon Post publishing blatantly false propaganda? (TechDirt)
"Democracy Dies in Darkness" isn't a warning, it's a mission statement.
- YouTube got something right. (TechDirt)
If you file a manual copyright complaint, you now have to specify exactly what parts of the video infringe on exactly what content. This is good for everyone but the automated DMCA takedown robots.
- Deuglifying Java. (GitHub)
You missed a golden opportunity to name it PyJeon.
- Twitter fell over. (Bleeping Computer)
How could anyone tell?
"Twitter is broken."
- An article on consciousness that isn't garbage. (Quanta)
Because they interviewed a robotics engineer rather than a philosopher.
- Creative Assembly, the Total War people, have been busy banning user mods not because there's anything wrong with them but because they upset one of their community managers. (One Angry Gamer)
The solution to this problem is to fire your community managers, because they are not just incompetent, but actively and wilfully harmful.
Posted by: Rick C at Saturday, July 13 2019 02:01 AM (Iwkd4)
Posted by: Rick C at Saturday, July 13 2019 02:05 AM (Iwkd4)
There was some Unix project, maybe the original /bin/sh?, that was written in C by someone who hated C, and abused the hell out of the macro preprocessor to make the source look like Pascal.
Posted by: Rick C at Saturday, July 13 2019 02:17 AM (Iwkd4)
That has about as much chance of being successful as the eminent domain attempt against former Justice (as in title, not concept) Souter after Kelo.
Posted by: StargazerA5 at Saturday, July 13 2019 06:11 AM (jl9eJ)
Posted by: Rick C at Saturday, July 13 2019 08:04 AM (Iwkd4)
54 queries taking 0.1606 seconds, 288 records returned.
Powered by Minx 1.1.6c-pink.