To make a change in functionality of a digital circuit, the hardware circuitry must be modified and this may require a redesign. For simple design tasks, this might work however in many mechatronic systems; the control tasks may involve complex relationships among many inputs and outputs which makes hardware solution impractical. A more practical, and satisfactory approach in complex digital design involves the use of a microprocessor-based system to implement software solution.
Software is a procedural program of set instructions to execute logic and arithmetic functions and to access input signals and control signals. The advantage of software solution is that, you don’t need to make any changes in the hardware; the program can easily be modified to alter a mechatronic system’s functionality. Therefore a microprocessor is single, very-large scale integration (VLSI) chip that contains many digital circuits that perform arithmetic, logic, communication and control functions.
When a microprocessor is packaged on a printed circuit board with other components, such as interface and memory chips, the resulting assembly is referred to as a microcomputer or single-board computer.
The microprocessor is also called the central processing unit (CPU) or microprocessor unit (MPU); this is where the primary computation and system control operation occur.
The arithmetic logic unit (ALU) within the CPU executes mathematical functions and data structured as binary words. A word is an ordered set of bits, usually 8, 16, or 64 bits long. The instruction decoder interprets instructions fetched sequentially from memory by the control unit and stored in the instruction register. Each instruction is a set of coded bias that commands the ALU to perform bits manipulation, such as binary addition and logic functions, on words stored in the CPU data registers. The ALU results are also stored in data registers and then transferred to memory by the control unit.
The bus is a set of shared communication lines that serves as the central nervous system of the computer. Data address, and control signals are shared by all system components via the bus. Each component connected to the bus communicates information to and from the bus via its own bus controller. The data lines, address lines, and control lines allow a specific component to access data addressed to that component. The data lines are used to communicate words to and from data registers in the various system components such as memory, CPU, and input/output (I/O) peripherals. The address lines are used to select devices on the bus or specific data locations within the memory. Devices usually have a combinational logic address decoder circuit that identifies the address code and activates the device. The control lines transmit read and write signals, the system clock signal, and other control signals such as system interrupts.
Recommended: The Ultimate Guide to Electrical Maintenance
The key to CPU’s operation is the storage and retrieval of data from a memory device. Different types of memory are used that include: Read-only memory (ROM), Random access memory (RAM), and Erasable-programmable ROM (EPROM). ROM is used for permanent storage of data that the CPU can read, but the CPU cannot write to data to ROM. ROM does not require a power supply to retain its data and hence is called non-volatile memory. RAM can be read from or written to at any time, provided power is maintained. The data in RAM is considered volatile because it is lost when power is lost.
You can also read: Mechatronic Systems
There are 2 main types of RAM: static RAM (SRAM), which retains its data in flip-flops as long as the memory is powered, and dynamic RAM (DRAM), which consists of capacitor storage of data that must be refreshed (rewritten) periodically because of charge leakage.
Data stored in an EPROM can be erased with ultraviolet light applied through a transparent Quartz window on top of the EPROM IC. The new data can be stored on the EPROM. Another type of EPROM is electrically erasable (EEPROM). Data in EEPROM can be erased electrically and rewritten through its data lines without the need for ultraviolet light. Because data in RAM are volatile; ROM, EPROM, EEPROM and peripheral mass memory storage devices such as magnetic, optical and solid-state drives maybe needed to provide permanent data storage.
The communication to and from the microprocessor occurs through I/O devices connected to the bus. External computer peripheral I/O devices include: Keyboards, Displays, Printers, and Network devices. For mechatronic applications, analog-to digital A/D, digital-to analog (D/A), and digital I/O devices provide interfaces to switches, sensors and actuators.
Related: Microcontrollers
The instructions that can be executed by the CPU are defined by a binary code called machine code. The instructions and corresponding codes are microprocessor dependent. Each instruction is usually represented by a unique binary string that causes the microprocessor to perform a low-level function e.g. add a number to a register or move a register’s value to a memory location. Microprocessors can be programmed using assembly language which has a mnemonic command corresponding to each instruction for example, ADD to add a number to a register and MOV to move a registers value to a memory location. However, assembly language must be converted to machine code, using software called an assembler, before it can be executed on the microprocessor. When the set of instruction is small, the microprocessor is known as a RISC (reduced instruction-set computer) microprocessor. RISC microprocessors are cheaper to design and manufacture and usually faster however more programming steps may be required for complex algorithm due to limited set of instructions.
Don’t miss out on key updates, join our newsletter List
Related: FS PCBA
You can also write programs in higher level language such as C or Basic provided a compiler is available that can generate machine code for the specific microprocessor used. Using a high level language has advantage like the ease of learning and comprehending the programs, the programs are also easier to debug. The main disadvantages of using a high-level language are that the resulting machine code may be less efficient i.e. slower and require memory than a corresponding well-written assembly language program.
Related link: ELE PCB
The importance of printed circuit board (PCB) technology has escalated throughout the years with the…
One of the key challenges in measuring the electrical current in high voltage, high power…
The Concept behind Wiegand Effect Based Sensors The Wiegand effect technology employs the unique…
An accelerometer is a sensor that is designed to measure acceleration or rate of change…
The USB-6009 is a small external data acquisition and control device manufactured by National Instruments…
X-Y tables are utilized as components in many systems where reprogrammable position control is desired.…
View Comments