Central processing unit (CPU) is the brain of a microcontroller. CPU is responsible for finding and fetching the right instruction which needs to be executed, for decoding that instruction, and finally for its execution.
Central processing unit connects all parts of the microcontroller in one systems. CPU most important function is to decode program instructions. When programmer writes a program, instructions have a clear form like MOVWF PORTB. However, in order for a microcontroller to understand that, this 'letter' form of an instruction must be translated into a series of zeros and ones which is called an 'opcode'. This translation from a letter to binary form is done by translators such as assembler translator or also known as an assembler.
Instruction fetched from program memory must be decoded by a central processing unit (CPU). We can then select from the table of all the instructions a set of actions which execute a assigned task defined by instruction. As instructions may within themselves contain assignments which require different transfers of data from one memory into another, from memory onto ports, or some other calculations, CPU must be connected with all parts of the microcontroller. This is made possible through a data bus and an address bus.
Saturday, March 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment