HomeCalendarSearchRegisterLog in

Share | 
 

  Registers

View previous topic View next topic Go down 
AuthorMessage
amr mohamed
 
 


Male
Libra
Dog
Occupation: : 369
Date of Birth : 1994-09-29
Join Date : 2010-11-12
Age : 22

PostSubject: Registers   Tue 22 Mar 2011, 11:38 am


Registers




Introduction

Recorders is a fast memory used to store data within the processor .. This volume
These records is important because it determines the size of the data and calculations that can
Computer to make.


Speed ​​records

Speed ​​high enough to match the speed of the processor in it .. Any failure which is
Palaces in the wizard


The function of the log register

Control in the implementation of the program.
Maintain the interim information and results


An overview of the records: Registers

The registry is a place inside Almicrockntrulr which can write it or read from or
Both of them so-called record or file.

Think of the record as if it were a piece of paper, where you can look at it (read) and write
Information tags.

Figure shows the map for details of the records or files for Maikarokontrulr PIC16F84.

Do not worry if I saw were not like before, it is now only to show where the cells reside
And records within the various Almikrokontrulr as it will help explain and interpret some
Commands.





The
first thing you will notice that it is divided into two sections each
section is called Bank of Bank (the sense of group or department

Or heap) and are called Bank 0 (Bank 0) and Bank 1 (Bank 1) 1)).
Bank 1 is used to control the actual operation of the Maikarokontrulr For example: that
Tell Almikrokontrulr any boxes port A to be income and you have got out as we shall see.
Bank 0 is used for data processing.

Example:

Let's say we want to make one box from the port A is high.
First we need to go to Bank 1 to set or determine the allocation of block or bit or
Party is required to port A pin Kkrj. Then go back to Bank 0 and send a logic 1 (case
High) to this party.

Records the most common and famous in the Bank 1, which we will use are STATUS and TRISA and TRISB

STATUS register in Bank 0 allows us to switch to Bank 1.

Register TRISA allows us to choose and select any of the Parties (Girls - pins) from the port A
Kkrj O and income.

Register TRISB allows us to choose and select any of the Parties (Girls - pins) from the port B
A. Kkrj and income.

STATUS register in Bank 1 allows us to return to Bank 0

An invitation to take a closer look at these three records.

Register case STATUS:

At the beginning of running the program, the default mode is the bank 0, to move from bank 0 to
Bank 1, we tell the situation is this, and do it by making the No. 5 box recorder case
Equal to 1.

To return to the bank 0 again make the block 5 to the Registrar of the situation is equal to 0.

Case record is located the address 03h and h means hexadecimal.

Records control ports TRISA and TRISB:

Address is 85h TRISA and TRISB address is 86h.

Programming party Kkrj income or simply send either 0 or 1 block required to register.

It can be done either on a bilateral or hexadecimal, or both, because
Duo help
Clarify the status of the port.

If you are not familiar with the conversion from binary to hexadecimal, or vice versa you can use the calculator
Scientific.

We have five parties to the port A and thus we have 5 boxes.

If we want to make one of the parties income send '1 'to block the corresponding relevant.

If we want to make one of the parties Kkrj make the relevant box corresponding to '0 '

Cells resulted in exactly the same way the parties.

In other words, column 0 is the RA0 and Block 1 is RA1, and box 2 is RA2 and so on.

Let's take an example:

If we are to make RA0, RA3 and RA4 jacks and make RA1 and RA2 as entry points:

Send the number 00110 (06h). . Register for TRISA, noted that a cell 0 be in the right as is
Shown



The same applies to the TRISB


Logs ports PORTA and PORTB

Parties to make a high output simply send '1 '(in writing) to the corresponding box in the record
PORTA or PORTB register
The same shape, body or Alformp followed in each of the TRISA and TRISB followed here.

To check whether the party high or low we might check on the box required and the knowledge that they are
High (1) or low 0

Before giving the example of the code or code should be explained only two other Sjlan w and f


W Register

Log W is public record that you can put any value you want.

Once the value in W is that you can add to the value of another, or copy, or ......

If you put another value in thethe log W erased the previous value and writes the new value
Instead.


Log f

Variable represents whether a special register or log in.


cherry


Back to top Go down
View user profile http://elect-mk.own0.com
 
Registers
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
www.elect-mk.own0.com :: 
Department of Digital Electronics
 :: 
The foundations of digital
-
Jump to: