As I browse through many embedded electronics forums, I continue to see people making statements referencing Intel’s 8051 line of microcontrollers and how they are “obsolete”. However, nothing could be further from the truth. While Intel ceased production of the MCS-51 family in 2007, there are an abundance of manufacturers still making 8051-compliant microcontrollers under intellectual property license from Intel.
Getting Better with Age
Take for instance Atmel’s AT89S microcontroller series. These are not only 8051-compliant, they also come with many enhancements. While the original 8051 maxed out at an external clock speed of 12MHz, variants such as the AT89S8253 can run up to a 24MHz crystal and also have a x2 clock option, which effectively runs the instruction clock at 1/6th the crystal speed (versus the original 1/12th Fosc spec).
While this only amounts to a 4MHz instruction clock — which may seem slow in comparison to modern micros such as a PIC18F4550 that can run a 12MHz instruction clock — the MCS-51 family’s CISC architecture allows for a larger instruction set than many modern RISC micros. This means there are some operations that an 8051 can do with one instruction what it would take a routine of several instructions for a PIC to accomplish.
For instance, an 8051 has the cjne instruction, which compares two values and executes a jump if they are not equal. For a PIC 16F to do that, you would require three instructions to load the two values, subtract or XOR them, then test the zero bit and jump if not set. So, theoretically, a PIC running a 4MHz instruction clock would take roughly the same amount of time as an 8051 running a 1MHz instruction clock to do an operation equivalent of the 8051’s cjne instruction.
Out in Front of the Modern Micro
Where the MCS-51 wins out against modern micros once again is its external, front-side bus. This allows the 8051 to run programs stored in an external parallel EPROM, thereby making it easy to change firmware by swapping EPROMs. It also offers the option of using a larger program ROM than is offered on chip (up to 64KB). And, it addresses external parallel RAM (also up to 64KB) making the system memory expandable. While parallel memory may seem outdated with the availability of serial EEPROM, a parallel interface is much faster than serial.
The external memory bus isn’t just limited to memory, either. Through the use of hardware buffers and a clever hardware gating scheme, we can also create a topology of addressable I/O. This allows us to interface other hardware such as LCD/LED displays and switch arrays to the memory bus and treat them as external memory via the MOVX instruction. The bus makes for an easily expandable system with minimal code changes.
Furthermore, some newer 8051 variants even offer symmetrical source/sink ratings on their I/O pins, such as Atmel’s AT89LP52.
Tried — and True to the Core
While I’ve touched on the basics, there are many other manufacturers offering DSP chips with an 8051 core in current production and the enhancement of the 8051 seems to still be in full swing. They are a super-easy chip to learn and they’ve stood the test of time over the decades. While other microcontrollers do seem more updated by comparison, the age old addage “If it ain’t broke, don’t fix it” seems to be keeping the MCS-51 family alive and well.
In short…don’t expect the MCS-51 family to disappear anytime soon…at least not in our lifetime.
Comments
Post a Comment