Professional Documents
Culture Documents
• Forming a total of 128 addressable bits (i.e., 16-byte location x 8 bits). Each bit can
be accessed by its bit addresses from OOH to 7FH.
Auxillary Flag(AC):
• This auxiliary carry is affected when a bit is generated from the 3rd position to the
4th position.
• AC=0 auxiliary is reset, AC=1 auxiliary is set
Overflow Flag (OV):
• This flag is set whenever the result of a signed number operation is too large,
causing the high-order bit to overflow into the sign bit. In general, The overflow
flag is only used to detect errors in signed arithmetic operations.
• This flag is set whenever there is a carry out of bit 6 or out of bit 7, but not both.
• OV=0 overflow flag resets, OV=1 overflow flag sets
Instructions that affects flag bits
• The locations 08 to IF (RB1-RB3) in the 8051 RAM can be used for the
stack.
• This is because locations 20 – 2FH of RAM are reserved for bit-addressable
memory and must not be used by the stack.
• If in a given program we need more than 24 bytes (08 to 1FH = 24 bytes) of
stack, we can change the SP to point to RAM locations 30 – 7FH.
• This is done with the instruction
• The Serial Buffer or SBUF register is used to hold the serial data
while transmission or reception.
TCON (Timer Control)
• It is used to start or stop the Timers of 8051 Microcontroller.
• It also contains bits to indicate if the Timers has overflowed.
• The TCON SFR also consists of Interrupt related bits.
TMOD (Timer Mode)
• The lower four bits are used to configure Timer0 and the higher
four bits are used to configure Timer1.
TL0/TH0 (Timer 0 Low/High)
• The Timer 0 consists of two SFRs: TL0 and TH0. The TL0 is the lower
byte and the TH0 is the higher byte and together they form a 16-bit
Timer0 Register.
TL1/TH1 (Timer 1 Low/High)
• The TL1 and TH1 are the lower and higher bytes of the Timer 0.
IE (Interrupt Enable)