Sunday, July 31
Embedded System IIT Delhi Video Lectures
Sub: Embedded System
Prof. Santanu ChaudharyIIT Delhi NPTEL Course
Please click on this link: http://freevideolectures.com/Course/2341/Embedded-Systems
Monday, July 18
8051 Embedded C Value Based 8bit Addition Program (Output get in P0 Port)
#include<reg51.h>
void main(void)
{
P0 = 0x30 + 0x45;
}
void main(void)
{
P0 = 0x30 + 0x45;
}
Saturday, July 16
8051 Assembly Address Based 16 bit Multiplication with carry program
ORG 0000H
MOV DPTR, #0030H
MOVX A, @DPTR
MOV B, A
MOV R7, A
INC DPTR
MOVX A, @DPTR
MUL AB
MOV DPTR, #0090H
MOVX @DPTR, A
MOV A, B
MOV R0, A
MOV A, R7
MOV B, A
MOV DPTR, #0032H
MOVX A, @DPTR
MUL AB
ADD A, R0
MOV R6, A
MOV A, B
MOV R5, A
INC DPTR
MOVX A, @DPTR
MOV R3, A
MOV B, A
MOV DPTR, #0031H
MOVX A, @DPTR
MUL AB
ADD A, R6
MOV DPTR, # 0091H
MOVX @DPTR, A
MOV A, B
MOV R4, A
MOV DPTR, #0032H
MOVX A, @DPTR
MOV B, A
MOV A, R3
MUL AB
ADD A, R5
ADD A, R4
MOV DPTR, #0092H
MOVX @DPTR, A
MOV A, B
INC DPTR
MOVX @DPTR, A
MOV PCON, #02H
8051 Assembly Address Based 16 bit Subtraction program with Carry
ORG 0000H
CLR C
MOV R1, #00H
MOV DPTR, #0030H
MOVX A, @DPTR
MOV R0, A
INC DPTR
MOVX A, @DPTR
SUBB A, R0
JNC OVER1
INC R1
CPL A
ADD A, #01H
MOV DPTR, #0090H
MOVX @DPTR, A
MOV A, R1
MOV R7, A
OVER1: MOV DPTR, #0090H
MOVX @DPTR, A
MOV A, R1
MOV R7, A
MOV DPTR, #0032H
MOVX A, @DPTR
MOV R2, A
INC DPTR
MOVX A, @DPTR
MOV R3, A
MOV A, R2
ADD A, R7
MOV R2, A
MOV A, R3
SUBB A, R2
JNC OVER2
INC R4
CPL A
MOV A, #01H
MOV DPTR, #0091H
MOVX @DPTR, A
MOV A, R4
INC DPTR
MOVX @DPTR, A
OVER2: MOV DPTR, #0091H
MOVX @DPTR, A
MOV A, R4
INC DPTR
MOVX @DPTR, A
MOV PCON, #02H
8051 Assembly Address Based 16 bit Addition with carry program
ORG 0000H
MOV DPTR, #0030H
MOVX A, @DPTR
MOV R0, A
INC DPTR
MOVX A, @DPTR
MOV R1, A
INC DPTR
MOVX A, @DPTR
MOV R2, A
INC DPTR
MOVX R3, A
MOV A, R1
ADD A, R1
ADD A, R0
JNC OVER1
INC R7
OVER1: MOV DPTR,#0090H
MOVX @DPTR, A
MOV A, R7
ADD A, R2
ADD A, R3
JNC OVER2
INC R6
OVER2: INC DPTR
MOVX @DPTR, A
MOV A, R6
INC DPTR
MOVX @DPTR, A
MOV PCON, #02H
Software: x8051 Dos Assembler for 32 and 64 bit windows 7
Mediafire Link: http://www.mediafire.com/?k3eyidzn92wlyqh
Install Procedure:-
Install Procedure:-
1. Unzip the x8051 for 7.
2. Install the DOSBox0.74-win32-installer.
3. Create a folder on C:\ , and rename it x8051.
4. Copy downloaded Link, x8051 Application File and paste it on C:\x8051.
5. Open DOSBox 0.74 from desktop.
6. Write dos commend
Z:\> mount d c:\x8051\ (Enter)
Z:\>d: (Enter)
D:\>x8051 (Enter)
7. Assemble your .asm file.
8051 Assembly Boolean Algebra NAND operation program
ORG 0000H
MOV DPTR, #0030H
MOVX A, @DPTR
MOV R0, A
INC DPTR
MOVX A, @DPTR
ANL A, R0
CPL A
MOV DPTR, #0090H
MOVX @DPTR, A
MOV PCON, #02H
Subscribe to:
Posts (Atom)