PUSH & POP
STACK:
it s part of RAM in which data will store temporary during execution of program.
STACK work on last in first out principal.to store and retrieve data during program execution in stack push and pop instruction work for it.
PUSH:
its used to store data into stack.
POP:
to retrieve data from stack.
SP:
stack pointer is 8 bit register which store value of top of the stack.
by default stack pointer contain 07h.
PUSH...
Wednesday, September 11, 2013
10:30 PM
1 comment
In 8051 micro controller have in built RAM and ROM,but size of this memory is limited size of RAM is 128 byte while size of ROM is 4KB some time we need more memory then this so we connect external memory with micro controller.
access external RAM
To access external RAM we used MOVX instruction.
MOVX A,@DPTR;this code used for read data from external RAM.
MOVX @DPTR,A;this code used for write data into external RAM.
access External...
Wednesday, September 4, 2013
12:16 AM
3 comments
Serial Interface
The serial port of 8051 is full duplex, i.e., it can transmit and receive simultaneously.
The register SBUF is used to hold the data. The
special function register SBUF is physically two registers.
One is,
write-only and is used to hold data to be transmitted out of the 8051
via TXD.
The other is, read-only and holds the received data from
external sources via RXD. Both...
12:16 AM
1 comment
In this mode PCON (power control register).in this register two bit play important role for power control of 8051.
Below show the format of PCON
8051 has two power saving modes.they are
idle mode
power down mode.
The two power saving modes are entered by setting two bits IDL and PD in the special function register (PCON) respectively.
POWER DOWN MODE:
the schematic diagram of power down mode shown below.
By setting the PD bit of...
Tuesday, September 3, 2013
11:28 PM
2 comments
To write data to serial port
To write a byte to the serial port one must simply write the value to the SBUF
(99h) SFR.
if you wanted to send the letter "A" to the serial port, it
could be accomplished as easily as
MOV SBUF,#A
Upon execution of the above instruction the 8051 will begin transmitting...
Subscribe to:
Posts (Atom)