A user interface consists of the different elements, which make up the application, e.g. a word processing application, a game, a desktop system. A microcontroller communicates with the various elements of the computer by way of standard communications protocols. The protocols are used to describe how the microcontroller can send commands and receive responses from the computer, typically via one or more serial ports.
The microcontroller is the brain of the application. Microcontrollers are usually embedded in integrated circuits. An application that requires the control of the microcontroller often communicates through hardware devices. Examples of these devices are trackballs, touch screens, and buttons.
In addition to communicating between the microcontroller and the host computer, the microcontroller communicates with other components, such as the keyboard and mouse. The application uses an abstraction layer that provides a generic message passing model.
A microcontroller has a number of different levels of abstraction. The lowest level of abstraction is the software layer. This layer provides a virtual machine for the application. Other components in the virtual machine provide signals to the microcontroller, such as interrupts, I/O signals, or the virtual memory.
Next comes the hardware abstraction layer, where device drivers handle communications between the microcontroller and the host computer. In addition to providing signals to the microcontroller, the device drivers also act as dispatch mechanisms for the bus. These are sometimes referred to as bus dispatch units.
Another layer, called the hardware abstraction layer, is made up of device drivers for peripherals. These peripheral devices are general purpose devices, such as printers, scanners, and cameras. They connect directly to the device drivers on the software abstraction layer. Devices that connect to the device drivers on the software abstraction layer are called core devices.
The device drivers, as well as the core devices, provide input and output signals to the application. The application also communicates with the device drivers by sending messages to the device. The device drivers perform a similar function for the data from the application. Both these layers contain the various device drivers and the core devices. They are also responsible for the communication between the host computer and the microcontroller.
There are two types of device drivers – the peripheral device driver and the core device driver. Peripheral device drivers are designed to perform functions related to the device. For example, the keyboard driver is a peripheral device driver, as it is designed to perform specific functions related to the keyboard.
Core device drivers, however, are designed to provide common routines that all devices that communicate through the device drivers should follow. For example, the keyboard driver provides a generic set of functions for all keyboards. The driver ensures that the keyboard works correctly with all computers that use the device.
The microcontroller abstraction layer is the final layer. This layer is the main component of the virtual machine. It provides the abstractions for each of the devices that an application requires. It also manages the communication between the host computer and the microcontroller.
The microcontroller abstraction layer implements the drivers for peripheral devices, core devices, and the data buses. It also provides a virtual memory system for handling application memory as well as the dispatch system. All of these functions are part of the virtual machine.
A microcontroller controls the behavior of computer programs by managing signals, operations, and communication between the microcontroller and the host computer. Programs and applications must be designed to take advantage of this control in order to be successful.