Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
40Activity
0 of .
Results for:
No results containing your search query
P. 1
Atmel 8051

Atmel 8051

Ratings:

4.73

(15)
|Views: 5,646|Likes:
Published by Amit Kumar Karna

More info:

Published by: Amit Kumar Karna on Apr 03, 2007
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/01/2013

pdf

text

original

 
Atmel 8051 MicrocontrollersHardware Manual
 
Atmel 8051 Microcontrollers Hardware Manual1
4316D–8051–05/05
Table of Contents 
2.1 Introduction............................................................................................2-662.2Special Function Registers.....................................................................2-682.3Oscillator and Clock Circuit.....................................................................2-702.4CPU Timing.............................................................................................2-712.5Port Structures and Operation................................................................2-732.6Accessing External Memory....................................................................2-772.7PSEN......................................................................................................2-782.8ALE.........................................................................................................2-792.9Timer/Counters.......................................................................................2-812.10Timer 0....................................................................................................2-822.11Timer 1....................................................................................................2-842.12Timer 2....................................................................................................2-892.13Serial Interface........................................................................................2-942.14Framing Error Detection........................................................................2-1042.15Automatic Address Recognition............................................................2-1052.16Interrupts...............................................................................................2-112
 
Atmel 8051 Microcontrollers Hardware Manual1-2
Rev. 4316D–8051–05/05
Section 1The 8051 Instruction Set
The 8051 instruction set is optimized for 8-bit control applications. It provides a variety offast addressing modes for accessing the internal RAM to facilitate byte operations onsmall data structures. The instruction set provides extensive support for one-bit vari-ables as a separate data type, allowing direct bit manipulation in control and logicsystems that require Boolean processing.An overview of the 8051 instruction set is presented below, with a brief description ofhow certain instructions might be used.
1.1Program StatusWord
The Program Status Word (PSW) contains several status bits that reflect the currentstate of the CPU. The PSW, shown inTable 1-1 on page 3, resides in SFR space. Itcontains the Carry bit, the Auxiliary Carry (for BCD operations), the two register bankselect bits, the Overflow flag, a parity bit, and two user-definable status flags.The Carry bit, other than serving the functions of a Carry bit in arithmetic operations,also serves as the “Accumulator” for a number of Boolean operations.The bits RS0 and RS1 are used to select one of the four register banks shown below.A number of instructions refer to these RAM locations as R0 through R7. The selectionof which of the four banks is being referred to is made on the basis of the bits RS0 andRS1 at execution time.The parity bit reflects the number of 1’s in the Accumulator: P = 1 if the Accumulatorcontains an odd number of 1’s, and P = 0 if the Accumulator contains an even number of1’s. Thus the number of 1’s in the Accumulator plus P is always even.Two bits in the PSW are uncommitted and may be used as general purpose status flags.The PSW register contains program status information as detailed inTable1-1.

Activity (40)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Jyotika Aggarwal liked this
Jyotika Aggarwal liked this
jerrinjoseph liked this
Little Lulu liked this
Suhas Altruistic liked this
Sunny Dedhia liked this
Balaji Subramani liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->