Just when you thought it was safe to go back into the lab…
The chip designers at Microchip must have a lot of time on their hands. Either that, or the company keeps several design teams working in parallel. Whatever the process, these guys keep cranking out new microcontrollers faster than we can keep track of them.
Exhibit A is the new batch of 8-bit (sort of) MCUs called the PIC16something-or-other. There’s no point in trying to memorize Microchip’s part numbers because they never make any sense anyway. Like Mercedes-Benz, the company long ago passed the point where the naming system follows any rational progression. But if you’re doing a Google search, you’ll want to look up PIC16F1703 through PIC16F1719, or PIC16LF1703–19. Oh, never mind.
These are 8-bit MCUs (sort of), so don’t let the number 16 in the part number fool you. Oh, sure, Microchip also makes 16-bit MCUs, but they’re called PIC24 – obviously. The company also has other existing lines of 8-bitters, but they’re called PIC10, PIC12, and PIC18 – as you would expect. They even make other components in the PIC16 family, but they’re different. It’s the 16x17x combination that you’re looking for here. Perhaps it’s some elaborate form of cryptography meant to thwart corporate espionage.
The bits that we care about are the new configurable-logic elements, the new analog components, and the new (sort of) pin configurability. All of these goodies conspire to move the new PIC16(L)F17xx parts closer to the one-chip-does-it-all ideal. And they get pretty close. And did I mention that the price starts at just $0.59?
First up: The configurable logic. For all you FPGA aficionados out there… this isn’t an FPGA. Whereas Xilinx and Altera offer a “sea of gates” in their devices, this is more like a small puddle of gates. You can count them on one hand. Four, to be exact. Still, it is pretty nifty. Each of the four configurable logic cells (CLCs) can be configured to be a D-, RS-, or JK flip-flop (yes, one flop), or it can become a simple Boolean logic gate (AND, OR, etc.). That’s all it does. But speaking as someone who’s put a 50-cent logic gate right next to a $200 microprocessor because I needed that one extra gate, I can honestly say that this is a useful feature.
The CLC’s simplicity belies its effectiveness. Its best and highest use is in eliminating hardware interrupts to the processor. If all you want to do is toggle an LED or switch a pin output on some event, you can totally eliminate the (admittedly simple) code required to do this by handling it with the CLCs. That means no software, no interrupt, and no latency. It’s a back-to-basics approach to logic functions that many programmers have overlooked. The user-defined flip-flops and logic gates embodied in the PIC16Fwhatever will play an outsized role in their success, methinks.
Moving on to the analog stuff, the new chips include two op amps, a 10-bit ADC, a 5-bit DAC, an 8-bit DAC, and a new zero-cross-detection (ZCD) circuit. Like the CLC, the ZCD is a small bit of internal hardware that can save you a lot more external hardware. With nothing more than an external current-limiting resistor, you can hook up 220V AC directly to the chip and not destroy it. That lets you sense when the AC voltage crosses zero so you can switch triacs more efficiently, or just keep track of the time (assuming a regular 50/60-Hz input).
These new MCUs also sport something called a complementary output generator (COG), which is kind of like an inverter for analog signals, and a numerically controlled oscillator (NCO), which is sort of the opposite of a PWM. Whereas PWMs vary their duty cycle (pulse width) but keep a constant frequency, the NCO varies its frequency but maintains a constant 50% duty cycle. A simple frequency generator, then. In a 59-cent part.
Finally, there’s the pin configurability. Plenty of Microchip devices let you tweak the pin assignment on a few of their I/O pins, but the new PIC16Ffoobar parts let you reassign all the digital pins. If you’re unhappy with the default pinout, or just have an oops! on your circuit board, you can reassign the pins to suit your PCB layout.
As far as the normal stuff goes, the new PIC16blahblah chips have the now-familiar Microchip PIC16 processor core that has been around for a few years. It’s an 8-bit (sort of) design with a 14-bit instruction word but 8-bit registers. The PIC16 line isn’t new, so it’s well supported by Microchip’s software tools. And, as with most MCUs, the chips can be had with varying amounts of ROM and RAM, from 3500 bytes of the former and 256 bytes of the latter, to 28K/2K configurations. In its simplest form, the PIC16F1703 fits in a 14-pin package and lists for just $0.59 in 10K quantities.
That’s a lot of goodness in a small package, and with a small price tag. There are almost a dozen variations planned, with more probably on the way. Hurry up and pick yours before the company runs out of part numbers.
Don’t worry – by the time Microchip gets anywhere near to running low on part numbers, they will have integrated a fractional part number converter circuit on-chip. 🙂
The CLC is a nice addition, though they are hardly the first with something like that. The Cypress PSOC chips have had programmable peripheral logic cells (including analog capability) for a long time.
Very true. And Actel (now Microsemi) has something similar. Farther back, Scenix did all of its peripherals in software; there were no “real” peripherals at all, just code.
I will say I have appreciated some of the bits of “glue” microchip has included in some of the processors. Coupled with the relatively high output drive capability, and some PICs (the nnHVxxx flavors) with a built-in shunt regulator, it can really help keep parts count down – nice for a consumer hobby-oriented product I’m working on, with a downright tiny circuit board.