8-pin microcontrollers are pretty neat things. I’d only used the larger PICs before, I didn’t see how these could be all that useful. And the 16C74s could do more… twenty years ago. These days, the 8-pin PICs have caught up with the older models in internal features, if not pincount. It’s really quite remarkable:
Same amount of program memory as the one from PICrat (actually, the modern version of the chip from PICrat, with the fancy flash memory), the CPU’s faster, it has more RAM, it has an internal EEPROM for persistent storage, same number of digital comms, one less CCP (but 32 fewer pins, so okay), half as many ADC channels (again, 32 fewer pins) but higher precision on those channels, same number of timers, a new comparator, a wider range of operating voltages and it takes less power (much less, it turns out).
Yes, it’s an 8-pin microcontroller; most of us forget that these shiny PCs are only a tiny, tiny, tiny fraction of the deployed computers in the world. These PICs probably outnumber them, and Moore’s law is in full swing on that side of the industry still.
So anyway, a fortnight or so back I’m watching a Big Clive video about making up a DMX cable tester with a PIC12F635…
…and I thought I’d like to play with a 12F so I bought a tube of them (they’re a lot less than a euro apiece) and a programmer. I splurged and got one of the higher-end 12Fs, the 12F1840, and then got to wrestling with resurrecting a 20-year-old toolchain.
GPASM, it turns out, has improved considerably, and there’s finally a CLI for the PICkit3 (I remember it coming out and the sheer daftness of the dropping of the PICkit2’s pk2cmd program that rendered the PICkit3 useless on launch to anyone running linux at the time). It only took a few hours of rereading manuals and poking things randomly before getting the flashing LED “hello world” program to work.
So, what’s next? Well, apart from the really neat WS2812 array in the vice there, which has a fun data protocol that’ll need a bit of programming work to hook up to (there is a C library for it, but I’ll have to rework that in assembly for my toolchain), and ignoring this idea I have for an interface between a sensor and an I2C link to a raspberry Pi that I have for another project, there’s also a little box dropped off by the postman to one side here. See, ebay’s one of those places where you can get fun toys for next to nothing if you look and are patient…
70 5×7 LED matrix displays for €17. 70! Mind you, I’ll need a few 74 series parts, some darlington arrays and a bit of wiring, but this could be fun…