lundi 11 avril 2011

Complete the components of micro PIC16f84

Grandfather of distribution legs Almicrockntrulr the man No. 4 used in the work of the reset and this word means re-Micro to develop his well-known and so when it is Almicrockntrulr in a strange or inaccurate results.
As we have stated previously that the line above the word means the work of MCLR reset the micro in the case that these men equal to zero and not 1The following figure shows the circuit used in this


The Service is a more detailed




It also happens to Micro reset in the following cases1 - when you run it and connect it to the source of the ability of2 - When you use the SLEEP3 - when there is an increase of the Watchdog4 - at least when the power source for the required value
In industrial applications, the power source to be irregular and constantly changing, so it will not happen, but the reset after 72 seconds of the stability of the power source until Etjb work without needless Rest
Described in the following figure
Central Processing UnitCPU
In this section we'll examine the CPU more detail as it represents a brain Almicrockntrulr part responsible for the fetch and carry out the instructions and installed the program described in the following figure:


It should be noted that when a programmer writing a program, the instructions are given for example in the picture following MOVLW 0 × 20, but these instructions are not understood by the microMust therefore be converted to zero and one, and this formula is called opcode that is understood by a micro.
The process of converting characters to the formula opcode is done by the translator or interpreter is sometimes called the assembler.There is also a Balmicrockntrulr sub-unit called the unit of account and logic ALU, which is responsible for calculations and logical operations, and also the implementation of the transfers and the transfer of data to and from registered In the following figure to see and unit of account and reason, where enters her instruction to be performed from instruction register with the condition and status of the instruction the previous status register and then you eject the outputs to the working register.


In the following figure we see the overall structure of parts of the Micro Kntrulr

STATUS Register
One of the most important recorders found in AlmikirkntrulrBut let's now take a look at the existing registered in AlmicrockntrulrIt is illustrated in the following figure:


We note from the previous format and the presence of a double-digit Bank 0, which is used to dealing with them and Bank 1 is an exact copy of the Bank 0And also divided the data memory to the upper part and lower partThe upper part of 00h, which is 11 to 0bh place is called
Special Function Registers(SFR)Is to control the micro and external devices relatedAnd the lower part is called
General Purpose Registers (GPR)Which considers RAM Cram
As we can see the Registrar STATUS exist at the address 03h and can also be used at the address 83hAnd also installed as the following:


As is clear from the figure that contains 8-bit and now we will begin to identify each bit and its function on its own
bit 0 C (Carry) Transfer
And be equal to 1 when there is an increase in the output of any calculation of any output increase of 255, a 8-bit available in this case puts the micro in this action 1 because it does not find a place to store the resultingIn the case do not exceed 255, the value of this bit remains 0
This decision is very important and is called Carry Flag
bit 1 DC (Digit Carry) DC Transfer
Powell is a special 4-bit where a value of 1 if the result is more than 15 It means that a product may be consumed in the first 4-bit and will store it in the remaining 4 bits in the case of the contrary be worth equal to zero
bit 2 Z (Zero bit) Indication of a zero result
This bit is used to illustrate the result of any calculation or logical operation is zeroAnd be equal to 1 when the output of operations is equal to 0And the value is equal to 0 when the output processes are not equal to 0
bit 3 PD(Power-down bit)
Be the value of this bit equal to 1 when the micro starts to work after the reset and be zero when it starts operating in the reconstruction and the implementation is SLEEP and the implementation of this would be when you lack the required capacity.
bit 4 TO Time-out; Watchdog overflow.
Be equal to its value when one end of the reboot and execute a command SLEEP and become equal to zero when the value is up to us a specific error Watchdog
bit6: 5 RP1: RP0(Register Bank Select bits)
As noted in the distribution of recorders that there is the so-called Bank0 Bank1 These two Pathans and allow us the process of selecting the bank zero or bank oneIt should be noted that the memory addresses Ttanthy Title FFh This is equal to 255, we find that Almikr PIC16f84 has 256 Hence we will need only one bit is either RP0 RP1 are not used, but has been developed for the future development and are always worth zeroRP0 either be 1 when we use Bank 1 and be 0 when we use Bank 0
bit 7 IRP(Register Bank Select bit)
Itstkhaddm and in the case of addresses where the indirect selection of the work required by the Bank

Aucun commentaire:

Enregistrer un commentaire