The first single chip microprocessor was the 4 bit Intel 4004 released in 1971, with other more capable processors available over the next several years.
These however all required external chip(s) to implement a working system, raising total system cost, and making it impossible to economically computerise appliances.
The first computer system on a chip optimised for control applications - microcontroller was the Intel 8048 released in 1975, with both RAM and ROM on the same chip. This chip would find its way into over one billion PC keyboards, and other numerous applications.
Most microcontrollers at this time had two variants. One had an erasable EEPROM program memory, which was significantly more expensive than the PROM variant which was only programmable once.
In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning with the Microchip PIC16x84) to be electrically erased quickly without an expensive package as required for EPROM, allowing both rapid prototyping, and In System Programming.
The same year, Atmel introduced the first microcontroller using Flash memory.
Other companies rapidly followed suit, with both memory types.
Cost has plummeted over time, with the cheapest 8-bit microcontrollers being available for under $0.25 in quantity (thousands) in 2009, and some 32-bit microcontrollers around $1 for similar quantities.
Nowadays microcontrollers are low cost and readily available for hobbyists, with large online communities around certain processors.
In the future, MRAM could potentially be used in microcontrollers as it has infinite endurance and its incremental semiconductor wafer process cost is relatively low.