5 ms·
Even worse than that, people still use legacy devices like 8051 MCUs in modern products. I'm currently working on an assembly codebase for a SiLabs part. Like.
by falcrist 9y ago
Even worse than that, people still use legacy devices like 8051 MCUs in modern products. I'm currently working on an assembly codebase for a SiLabs part.
Like... Please move to an ARM MCU with a C codebase.
- pjmlp 9y agoWell, if it is an ARM MCU, Basic, Pascal, Java, C++, Oberon, Ada and Rust are also possible options. :)
- pkaye 9y agoThere is C available for an 8051. The Keil 8051 compiler (now owned by ARM) was pretty good and it had a nice GUI environment. The 8051 is pretty good for certain tasks but when you push it beyond the limits, your effort switches from solving the core problem to managing memory and micro optimization to make things work. Meanwhile with an ARM MCU you don't have to worry about a lot of things. I once spent a couple days optimizing a 32-bit divide for an 8051 to squeeze a couple % improvement in product performance.
- magduf 9y agoAn ARM might be overkill (and a bit expensive) for something that can be done with an 8051. A better choice might be something like an Atmel AVR or Microchip PIC(16 or 32 probably). Those are dirt-cheap, and specifically designed for microcontroller applications with features like on-board ADCs, comparators, timers, GPIOs, etc.
- morio 9y agoI hear this argument a lot in the EE community. Yet, the cheapest 8051 part in single quantities on DigiKey: $0.43. Cheapest ARM Cortex-M0 part on DigiKey: $0.47. I'll take the ease of development and features on ARM for $0.05. You can develop without proprietary development environments. I do my development with a basic gcc+make setup. Of course you can pick up old parts which fell off a truck for cheaper but I'd rather not do that when I depend on these parts for many years to come.
- janekm 9y agoThe cheaper 8051s aren't on digikey (they are usually integrated into something like the custom MCU used for a pregnancy test or tooth brush), and $0.05 is very worth it if you are making 1000000.
- vardump 9y ago8051 is a complete overkill for a pregnancy test or a toothbrush. That's why those applications use less known 4-bit processors.
- jdblair 9y agoYou can program 8051 in c using tinycc. It functions great as an assembler as well. You can structure the parts that must be in assembly as c functions using inline assembly. Very convenient! Using c does come at the cost of some code compactness, but you can selectively optimize as the need arises.