Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

using 8051(89c51) Microcontroller

Status
Not open for further replies.

fawad_hd97

Junior Member level 3
Joined
Jun 22, 2006
Messages
25
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,281
Activity points
1,411
I need the coding for 8051(89c51) to implement the logic function by using C(Cy) carry flag shown in doc file attached with this topic.

the output should be on port P1.3
P1.0 is XORed with P1.1 and their result is ORed with P1.2 and their result is sholud be on port bit P1.3
 

Code:
       MCS-51 Family Macro Assembler   A S E M - 5 1   V 1.3
       =====================================================



	Source File:	xrl_orl1.txt
	Object File:	xrl_orl1.hex
	List File:	xrl_orl1.lst



 Line  I  Addr  Code            Source

    1:	  0000	E4	   CLR A
    2:	  0001	A2 90	MOV C, P1.0
    3:	  0003	33	   RLC A
    4:	  0004	F5 F0	MOV B, A
    5:	  0006	E4	   CLR A
    6:	  0007	A2 91	MOV C, P1.1
    7:	  0009	33	   RLC A
    8:	  000A	65 F0	XRL A, B
    9:	  000C	F5 F0	MOV B, A
   10:	  000E	E4	   CLR A
   11:	  000F	A2 92	MOV C, P1.2
   12:	  0011	33	   RLC A
   13:	  0012	45 F0	ORL A, B
   14:	  0014	13	   RRC A
   15:	  0015	92 93	MOV P1.3, C
   16:
   17:		END

Regards,
IanP
 

    fawad_hd97

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top