Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

UNIT –II

MICROCONTROLLERS
Microprocessors
CPU for Computers
No RAM,ROM,I/O on CPU chip It self
Example: Intel's x86, Motorola’s 680x0
What is Microcontroller?

Micro Controller

Very Small Amechanism that controls


the operation of a machine
Microcontroller
Asmaller computer
On -chip RAM,ROM,I/O ports...
Example: Motorola’s 6811 , Intel’s 8051 , Zilog’s Z8 and PIC
Criteria for Choosing a Microcontroller
1. Meeting the computing needs of the task at hand efficiently and cost effectively

• Speed

• Packaging

• Power consumption

• The amount of RAM and ROM on chip

• The number of I/O pins and the timer on chip

• How easy to upgrade to higher performance or lower power-consumption


versions

Dilshad SK CMR Technical Campus


The Key features of the 8051 Microcontroller

 4 KB on-chip ROM (Program memory).


 128 bytes on-chip RAM (Data memory).
 The 8-bit data bus (bidirectional).
 16-bit address bus (unidirectional).
 Two 16-bit timers.
 Instruction cycle of 1 microsecond with 12 MHz crystal.
 Four 8-bit input/output ports.
 128 user-defined flags.
 Four register banks of 8 bit each.
 16-byte bit-addressable RAM.
 The general purpose registers are 32 each is 8-bit.
 8051 has two external and three internal interrupts.
 8051 microcontroller specifies some special function features like UARTs, ADC, Op-
amp, etc.
 It has a 16-bit program counter and data pointer.

Dilshad SK CMR Technical Campus


Pin Diagram :

Dilshad SK CMR Technical Campus


Description of the Pins:
 Pin 1 to Pin 8 (Port 1) – Pin 1 to Pin 8 are assigned to Port 1 for simple I/O
operations. They can be configured as input or output pins depending on the logic
control i.e. if logic zero (0) is applied to the I/O port it will act as an output pin and if
logic one (1) is applied the pin will act as an input pin. These pins are also referred to
as P1.0 to P1.7 (where P1 indicates that it is a pin in port 1 and the number after ‘.’
tells the pin number i.e. 0 indicates first pin of the port. So, P1.0 means first pin of
port 1, P1.1 means second pin of the port 1 and so on). These pins are bidirectional
pins.
 Pin 9 (RST) – Reset pin. It is an active-high, input pin. Therefore if the RST pin is
high for a minimum of 2 machine cycles, the microcontroller will reset i.e. it will
close and terminate all activities. It is often referred as “power-on-reset” pin because
it is used to reset the microcontroller to it’s initial values when power is on (high).
 Pin 10 to Pin 17 (Port 3) – Pin 10 to pin 17 are port 3 pins which are also referred to
as P3.0 to P3.7. These pins are similar to port 1 and can be used as universal input or
output pins. These pins are bidirectional pins. These pins also have some additional
functions which are as follows:
 P3.0 (RXD): 10th pin is RXD (serial data receive pin) which is for serial
input. Through this input signal microcontroller receives data for serial
communication.
 P3.1 (TXD): 11th pin is TXD (serial data transmit pin) which is serial
output pin. Through this output signal microcontroller transmits data for
serial communication.
 P3.2 and P3.3 (INT0′, INT1′): 12th and 13th pins are for External
Hardware Interrupt 0 and Interrupt 1 respectively. When this interrupt is
activated(i.e. when it is low), 8051 gets interrupted in whatever it is doing
and jumps to the vector value of the interrupt (0003H for INT0 and 0013H
for INT1) and starts performing Interrupt Service Routine (ISR) from that
vector location.
 P3.4 and P3.5 (T0 and T1): 14th and 15th pin are for Timer 0 and Timer 1
external input. They can be connected with 16 bit timer/counter.
 P3.6 (WR’): 16th pin is for external memory write i.e. writing data to the
external memory.
 P3.7 (RD’): 17th pin is for external memory read i.e. reading data from
external memory.
 Pin 18 and Pin 19 (XTAL2 and XTAL1) – These pins are connected to an external
oscillator which is generally a quartz crystal oscillator. They are used to provide an
external clock frequency of 4MHz to 30MHz.
 Pin 20 (GND) – This pin is connected to the ground. It has to be provided with 0V
power supply. Hence it is connected to the negative terminal of the power supply.
 Pin 21 to Pin 28 (Port 2) – Pin 21 to pin 28 are port 2 pins also referred to as P2.0 to
P2.7. When additional external memory is interfaced with the 8051 microcontroller,
pins of port 2 acts as higher-order address bytes. These pins are bidirectional.
 Pin 29 (PSEN) – PSEN stands for Program Store Enable. It is output, active-low pin.
This is used to read external memory. In 8031 based system where external ROM
holds the program code, this pin is connected to the OE pin of the ROM.
Dilshad SK CMR Technical Campus
 Pin 30 (ALE/ PROG) – ALE stands for Address Latch Enable. It is input, active-
high pin. This pin is used to distinguish between memory chips when multiple
memory chips are used. It is also used to de-multiplex the multiplexed address and
data signals available at port 0. During flash programming i.e. Programming of
EPROM, this pin acts as program pulse input (PROG).
 Pin 31 (EA/ VPP) – EA stands for External Access input. It is used to enable/disable
external memory interfacing. In 8051, EA is connected to Vcc as it comes with on-
chip ROM to store programs. For other family members such as 8031 and 8032 in
which there is no on-chip ROM, the EA pin is connected to the GND.
 Pin 32 to Pin 39 (Port 0) – Pin 32 to pin 39 are port 0 pins also referred to as P0.0 to
P0.7. They are bidirectional input/output pins. They don’t have any internal pull-ups.
Hence, 10 K? Pull-up registers are used as external pull-ups. Port 0 is also designated
as AD0-AD7 because 8051 multiplexes address and data through port 0 to save pins.
 Pin 40 (VCC) – This pin provides power supply voltage i.e. +5 Volts to the circuit.

I/O PORTS:
The 8051 has four important ports. Port 0, Port 1, Port 2 and Port 3. These ports
allow the microcontroller to connect with the outside world. The four ports of 8051
microcontrollers have certain specific functions and corresponding features. In this
post, we will take a gander at the purpose of each of these ports.

Dilshad SK CMR Technical Campus


Features of the four ports

 Each port has 8 pins. Thus the four ports jointly comprise 32 pins.
 All ports are bidirectional.
 They are constructed with a D type output latch. They have output drivers and
input buffers.
 We can modify their functions using software and hardware that they connect to.
 All the ports are configured as input ports on Reset.
 To configure ports as an input port 1 must be written to that port
 To configure it as an output port 0 must be written to it.

8051 MICROCONTROLLER ARCHITECTURE

o In the diagram, the system bus connects all the support devices to the CPU. The
system bus consists of an 8-bit data bus, a 16-bit address bus and bus control
signals. All other devices like program memory, ports, data memory, serial
interface, interrupt control, timers, and the CPU are all interfaced together through
the system bus. Interrupt is a sub-routine call that given by the microcontroller
Dilshad SK CMR Technical Campus
when some other program with high priority is request for acquiring the system
buses the n interrupts occurs in current running program. Address Bus 8051
microcontrollers is consisting of 16 bit address bus. It is generally be used for
transferring the data from Central Processing Unit to Memory.
o Data bus: 8051 microcontroller is consisting of 8 bits data bus. It is generally be
used for transferring the data from one peripherals position to other peripherals.

Dilshad SK CMR Technical Campus


Memory organization:
The 8051 microcontroller has 128 bytes of Internal RAM and 4kB of on chip
ROM. The RAM is also known as Data memory and the ROM is known as program
memory. The program memory is also known as Code memory .This Code memory
holds the actual 8051 program that is to be executed. In 8051 this memory is limited to
64K Code memory may be found on-chip, as ROM or EPROM. It may also be stored
completely off-chip in an external ROM or, more commonly, an external EPROM. The
8051 has only 128 bytes of Internal RAM but it supports 64kB of external RAM. As the
name suggests, external RAM is any random access memory which is off-chip. Since
the memory is off-chip it is not as flexible interms of accessing, and is also slower. For
example, to increment an Internal RAM location by1, it requires only 1 instruction and
1 instruction cycle but to increment a 1-byte value stored in External RAM requires 4
instructions and 7 instruction cycles. So, here the external memory is 7 times slower.
Internal RAM OF 8051:
This Internal RAM is found on-chip on the 8051.So it is the fastest RAM
available, and it is also the most flexible in terms of reading, writing, and modifying its
contents. Internal RAM is volatile, so when the 8051 is reset this memory is cleared.
The 128 bytes of internal RAM is organized as below.
(i) Four register banks (Bank0, Bank1, and Bank2and Bank3) each of 8-bits
(total32 bytes). The default bank register is Bank0. The remaining Banks are
selected with the help of RS0 and RS1 bits of PSW Register.
(ii) 16bytes of bit addressable area and
(iii) 80 bytes of general purpose area (Scratch pad memory) as shown in the
diagram below. This area is also utilized by the microcontroller as a storage area
for the operating stack.
The 32 bytes of RAM from address 00 H to 1FH are used as working registers
organizedasfourbanksofeightregisterseach.TheregistersarenamedasR0-R7.Each register
can be addressed by its name or by its RAM address.
EX: MOVA,R7 or MOVR7,#05H

Dilshad SK CMR Technical Campus


Figure.Internalmemory8051Microcontroller

Internal ROM (On–chip ROM):


The 8051 microcontroller has 4kB of on chip ROM but it can be extended up to 64kB.This

5/30/2014 8051 by Vijay Kumar K


ROM is also called program memory or code memory. The CODE segment is accessed using the
program counter (PC) for opcode fetches and by DPTR for data. The external ROM is accessed
when the EA(active low)pin is connected to ground or the contents of program counter exceeds
0FFFH.When the Internal ROM address is exceeded the 8051 automatically fetches the code bytes
from the external program memory.

Figure: External memory 8051 Microcontroller

5/30/2014 8051 by Vijay Kumar K


Special Function Registers:

5/30/2014 8051 by Vijay Kumar K


The 8051 Microcontroller Special Function Registers act as a control table that monitor and control
the operation of the 8051 Microcontroller. If you observe in Internal RAM Structure, the Address
Space from 80H to FFH is allocated to SFRs. Out of these 128 Memory Locations (80H to FFH),
there are only 21 locations that are actually assigned to SFRs. Each SFR has one Byte Address and
also a unique name which specifies its purpose. Since the SFRs are a part of the Internal RAM
Structure, you can access SFRs as if you access the Internal RAM. The main difference is the address
space: first 128 Bytes (00H to 7FH) is for regular Internal RAM and next 128 Bytes (80H to FFH) is
for SFRs.

List of 8051 Microcontroller Special Function Registers

 A or ACC
 B
 DPL
 DPH
 IE
 IP
 P0
 P1
 P2
 P3
 PCON
 PSW
 SCON
 SBUF

5/30/2014 8051 by Vijay Kumar K


 SP
 TMOD
 TCON
 TL0
 TH0
 TL1
 TH1

Categories of 8051 Microcontroller Special Function Registers

All the 21 8051 Microcontroller Special Function Registers (SFRs) along with their functions and
Internal RAM Address is given in the following table.

5/30/2014 8051 by Vijay Kumar K


There are many ways to categorize these 21 Special Function Registers but I find the following way as
an appropriate one. The 21 Special Function Registers of 8051 Microcontroller are categorized in to
seven groups. They are:

5/30/2014 8051 by Vijay Kumar K


Math or CPU Registers: A and B Status Register: PSW (Program Status Word)

Pointer Registers: DPTR (Data Pointer – DPL, DPH) and SP (Stack Pointer)

I/O Port Latches: P0 (Port 0), P1 (Port 1), P2 (Port 2) and P3 (Port 3)

Peripheral Control Registers: PCON, SCON, TCON, TMOD, IE and IP

Peripheral Data Registers: TL0, TH0, TL1, TH1 and SBUF

A or Accumulator (ACC): The Accumulator or Register A is the most important and most used 8051
Microcontroller SFRs. The Register A is located at the address E0H in the SFR memory space. The
Accumulator is used to hold the data for almost all the ALU Operations . The name “Accumulator”
came from the fact this register is used to accumulate (or store) the result of all Arithmetic and most of
the Logical Operations.

5/30/2014 8051 by Vijay Kumar K


B (Register B)
The B Register is used along with the ACC in Multiplication and Division operations. These two
operations are performed on data that are stored only in Registers A and B. During Multiplication
Operation, one of the operand (multiplier or multiplicand) is stores in B Register and also the higher
byte of the result. In case of Division Operation, the B Register holds the divisor and also the
remainder of the result. It can also be used as a General Purpose Register for normal operations and is
often used as an Auxiliary Register by Programmers to store temporary results.

PrograProgram Status Word (PSW)


The PSW or Program Status Word Register is also called as Flag Register and is one of the important
SFRs. The PSW Register consists of Flag Bits, which help the programmer in checking the condition
of the result and also make decisions.Flags are 1-bit storage elements that store and indicate the nature
of the result that is generated by execution of certain instructions. The following image shows the
contents of the PSW Register.

5/30/2014 8051 by Vijay Kumar K


 CY, the carry flag − This carry flag is set (1) whenever there is a carry out from the D7 bit. It
is affected after an 8-bit addition or subtraction operation. It can also be reset to 1 or 0 directly
by an instruction such as "SETB C" and "CLR C" where "SETB" stands for set bit carry and
"CLR" stands for clear carry.
 AC, auxiliary carry flag − If there is a carry from D3 and D4 during an ADD or SUB
operation, the AC bit is set; otherwise, it is cleared. It is used for the instruction to perform
binary coded decimal arithmetic.
 P, the parity flag − The parity flag represents the number of 1's in the accumulator register
only. If the A register contains odd number of 1's, then P = 1; and for even number of 1's, P = 0.
 OV, the overflow flag − 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. It is used only to detect errors in
signed arithmetic operations.
 F0- Flag 0 available to user for general purpose.
We can select the corresponding Register Bank bit using RS0 and RS1 bits .

5/30/2014 8051 by Vijay Kumar K


Stack Pointer (SP) Register:

A value stored in the Stack Pointer points to the first free stack address and permits stack
availability.
Stack pushes increment the value in the Stack Pointer by 1. Likewise, stack pops decrement
its value by 1. Upon any reset and power-on, the value 7 is stored in the Stack Pointer, which
means that the space of RAM reserved for the stack starts at this location. If another value is
written to this register, the entire Stack is moved to the new memory location.

5/30/2014 8051 by Vijay Kumar K


Timer Registers
TCON (Timer Control register)
TCON is an 8-bit register. Its bits are used for generating interrupts internal or external. The most
important bits of the timer TR and TF are also in it. TR (timer run) and TF (timer overflow) bits which
we use in almost all over timer applications are in it.
TCON Register

5/30/2014 8051 by Vijay Kumar K


 TCON is an 8-bit control register and contains a timer and interrupt flags.

 Bit 7 - TF1: Timer1 Overflow Flag

 1 = Timer1 overflow occurred (i.e. Timer1 goes to its max and roll over back to zero).

 0 = Timer1 overflow not occurred.

 It is cleared through software. In the Timer1 overflow interrupt service routine, this bit will get cleared
automatically while exiting from ISR.

 Bit 6 - TR1: Timer1 Run Control Bit

 1 = Timer1 start.

 0 = Timer1 stop.

 It is set and cleared by software.

 Bit 5 – TF0: Timer0 Overflow Flag

 1 = Timer0 overflow occurred (i.e. Timer0 goes to its max and roll over back to zero).

 0 = Timer0 overflow not occurred.

 It is cleared through software. In the Timer0 overflow interrupt service routine, this bit will get cleared

5/30/2014 8051 by Vijay Kumar K


automatically while exiting from ISR.

 Bit 4 – TR0: Timer0 Run Control Bit

 1 = Timer0 start.

 0 = Timer0 stop.

 It is set and cleared by software.

 Bit 3 - IE1: External Interrupt1 Edge Flag

 1 = External interrupt1 occurred.

 0 = External interrupt1 Processed.

 It is set and cleared by hardware.

 Bit 2 - IT1: External Interrupt1 Trigger Type Select Bit

 1 = Interrupt occurs on falling edge at INT1 pin.

 0 = Interrupt occur on a low level at the INT1 pin.

 Bit 1 – IE0: External Interrupt0 Edge Flag

 1 = External interrupt0 occurred.

 0 = External interrupt0 Processed.

 It is set and cleared by hardware.

 Bit 0 – IT0: External Interrupt0 Trigger Type Select Bit

5/30/2014 8051 by Vijay Kumar K


 1 = Interrupt occurs on falling edge at INT0 pin.

 0 = Interrupt occur on a low level at INT0 pin.

TMOD (Timer Mode register): 8-bit register used to select timer mode. There are 4 modes in
which timer can be loaded.
TH0/TL0->Timer 0 16 bit register (byte addressable only) 8 bits can be send at a time.
TH1/TL1-> Timer 1 16 bit register (byte addressable only) 8 bits can be send at a time.
TMOD register is an 8-bit register used to set timer mode of timer0 and timer1 .

Its lower 4 bits are used for Timer0 and the upper 4 bits are used for Timer1
Bit 7,3 – GATE:
1 = Enable Timer/Counter only when the INT0/INT1 pin is high and TR0/TR1 is set.

5/30/2014 8051 by Vijay Kumar K


0 = Enable Timer/Counter when TR0/TR1 is set.
Bit 6,2 - C/T (Counter/Timer): Timer or Counter select bit
1 = Use as Counter
0 = Use as Timer
Bit 5:4 & 1:0 - M1:M0: Timer/Counter mode select bit.
Bit 4:3 –Represents the mode of operation

SCON (Serial Control)


It’s an 8 bit register, Used for serial data communication. It is bit addressable.

5/30/2014 8051 by Vijay Kumar K


SBUFF (Serial Buffer): This register is used when we are transmitting or receiving data serially. We
put or data in it which we want to transmit, it also contains the data which is transmitted from other
Peripherals like PC personal computers to 8051 micro controller. It is not bit addressable.

5/30/2014 8051 by Vijay Kumar K


PCON (Power Control Register): PCON is an 8-bit register used to control the baud rate during
serial communication and 8051’s power control modes. Setup double baud rate when timer1 is used
for serial communication in modes 1, 2 &3 Switch to sleep mode on PD Power down Switch to Idle
mode when IDL bit is set.

Register bits and Functions


SMOD: Double Baud rate when Serial port is used in mode 1, 2 or 3.
GF1: General purpose flag bit.
GF0: General purpose flag bit.
PD: Power down. Activates power down operation.
IDL: Ideal mode. Activates ideal mode operation.
— => Reserved
ADDRESSING MODES OF 8051: There are six types of addressing modes.
1. Immediate addressing mode: In this Immediate Addressing Mode, the data is provided in
the instruction itself. The data is provided immediately after the opcode. These are some
examples of Immediate Addressing Mode .
MOVA, #0AFH;
MOVR3, #45H;
MOVDPTR, #FE00H;

5/30/2014 8051 by Vijay Kumar K


In these instructions, the # symbol is used for immediate data. In the last instruction, there is DPTR.
Using this, it points the external data memory location. In the first instruction, the immediate data is
AFH, but one 0 is added at the beginning. So when the data is starting with A to F, the data should be
preceded by 0.

2. Register addressing mode


In the register addressing mode the source or destination data should be present in a register (R0 to
R7). These are some examples of Register Addressing Mode.

MOVA, R5;
MOVR2, #45H;
MOVR0, A;
3. Direct Addressing Mode

In the Direct Addressing Mode, the source or destination address is specified by using 8-bit data in the
instruction. Only the internal data memory can be used in this mode. Here some of the examples of
direct Addressing Mode.

MOV80H, R6;
MOVR2, 45H;
MOVR0, 05H;

5/30/2014 8051 by Vijay Kumar K


The first instruction will send the content of registerR6 to port P0 (Address of Port 0 is 80H). The
second one is forgetting content from 45H to R2. The third one is used to get data from Register R5
(When register bank RB0 is selected) to register R5.

4. Register indirect addressing Mode

In this mode, the source or destination address is given in the register. By using register indirect
addressing mode, the internal or external addresses can be accessed. The R0 and R1 are used for
8-bit addresses, and DPTR is used for 16-bit addresses, no other registers can be used for
addressing purposes. Let us see some examples of this mode.

MOV0E5H, @R0;
MOV@R1, 80H

In the instructions, the @ symbol is used for register indirect addressing. In the first instruction, it
is showing that theR0 register is used.

5. Indexed addressing mode: In the indexed addressing mode, the source memory can only
be accessed from program memory only. The destination operand is always the register A.
These are some examples of Indexed addressing mode.
MOVCA, @A+PC;
MOVCA, @A+DPTR;

5/30/2014 8051 by Vijay Kumar K


6. Implied Addressing Mode

In the implied addressing mode, there will be a single operand. These types of instruction can work on
specific registers only. These types of instructions are also known as register specific instruction. Here
are some examples of Implied Addressing Mode.

RLA
SWAPA;

These are 1- byte instruction. The first one is used to rotate the A register content to the Left. The
second one is used to swap the nibbles in A.

The instructions of 8051 Microcontroller can be classified into five different groups. These groups are
like below

 Data Transfer Group


 Arithmetic Group
 Logical Group
 Program Branch Group
 Bit Processing Group

5/30/2014 8051 by Vijay Kumar K


Data Transfer Instructions
Mnemonic Description

MOV A,Rn Moves the register to the accumulator

MOV A, direct Moves the direct byte to the accumulator

MOV A,@Ri Moves the indirect RAM to the accumulator

MOV A, data Moves the immediate data to the accumulator

MOV Rn,A Moves the accumulator to the register

MOVRn,#data Moves the immediate data to the register

MOVdirect,A Moves the accumulator to the direct byte

MOVdirect,Rn Moves the register to the direct byte

MOV@Ri,A Moves the accumulator to the indirect RAM

5/30/2014 8051 by Vijay Kumar K


Arithmetic Instructions
Mnemonic Description
ADDA, Rn Adds the register to the accumulator
ADDA, direct Adds the direct byte to the accumulator
ADDA,@Ri Adds the indirect RAMto the accumulator
ADDA, #data Adds the Immediate data to the accumulator

ADDCA,Rn Adds the register to the accumulator with a carry flag

ADDCA, direct Adds the direct byte to the accumulator with a carry flag

ADDCA,@Ri Adds the indirect RAMto the accumulator with a carry flag

ADDCA, data Adds the immediate data to the accumulator with a carry flag

SUBBA, Rn Subtracts the register from the accumulator with a borrow

SUBBA, direct Subtracts the direct byte from the accumulator with a borrow

5/30/2014 8051 by Vijay Kumar K 136


Mnemonic Description

SUBBA,@Ri Subtracts the indirect RAMfrom the accumulator with a borrow

SUBBA,#data Subtracts the immediate data from the accumulator with a borrow
INC A Increments the accumulator by 1

INC Rn Increments the register by 1

INC Rx Increments the direct byte by 1

INC@Ri Increments the indirect RAM by 1

DEC Rn Decrements the register by 1

DEC Rx Decrements the direct byte by 1

DEC @Ri Decrements the indirect RAM by 1

MUL AB Multiplies A and B

DIV AB Divides A by B
BranchInstructions
Mnemonic Description
ACALLaddr11 Absolute subroutine call
LCALLaddr16 Long Subroutine call
RET Returns from subroutine
RETI Returns from interrupt subroutine
AJMPaddr11 Absolute jump
LJMPaddr16 Long jump
Short jump ( from – 128 to +127 locations relative to the following
SJMPrel
instruction)

JCrel Jump if carry flag is set. Short jump.


JNCrel Jump if carry flag is not set. Short jump.
JB bit,rel Jump if direct bit is set. Short jump.
Mnemonic Description

JBCbit,rel Jump if direct bit is set and clears bit. Short jump.

JMP@A+DPTR Jump indirect relative to the DPTR

JZrel Jump if the accumulator is zero. Short jump.

JNZrel Jump if the accumulator is not zero. Short jump.

Compares immediate data to the register and jumps if notequal. Short jump.
CJNERn,#data,rel
DJNZRn,rel Decrements register and jumps if not 0. Short jump.

DJNZRx,rel Decrements direct byte and jump if not 0. Short jump.

NOP No operation
Bit-oriented/Processing Instructions:
Mnemonic Description

CLRC Clears the carry flag

CLR bit Clears the direct bit

SETBC Sets the carry flag

SETBbit Sets the direct bit

CPLC Complements the carry flag

ANLC, bit AND direct bit to the carry flag

ANLC,/bit AND complements of direct bit to the carry flag

ORLC,bit OR direct bit to the carry flag

ORLC,/bit OR complements of direct bit to the carry flag

MOVC, bit Moves the direct bit to the carry flag

You might also like