Flash lets customers conveniently and cost-effectively fix software bugs, accommodate other software changes, and enable end users to upgrade products such as modems remotely and without removing the microcontroller from the end product. Once a microcontroller's OTP memory is programmed, changing program code means throwing the device away and replacing it with a new one. Companies typically use OTP parts for limited production runs to test code before investing in a ROM mask. The peripheral mix is what really distinguishes microcontrollers, and most device families have dozens of members, each with its own unique combination. Here's a quick introduction to some of the more basic peripherals.
Timers synchronize events in the processor with events in the real world.
They can also generate a pulse train on an infrared LED or create a pulsed output to drive a motor at a particular duty cycle. Every microcontroller has at least one timer. A converters take a digital number and convert it to an analog voltage level, typically an output signal for controlling circuitry. Serial communications ports let the controller communicate with other chips or systems, or via a bus. These lines can also sense high or low voltage to gather information from a piece of circuitry.