Sunday, 5 October 2014

i) Keep monitoring the P1.2 bit until it becomes high. ii) When P1.2 becomes high, write value 45H to port 0 and iii) Send a high-to-low(H-to-L) pulse to P2.


      SETB P1.2      ;make P1.2 an input
      MOV  A,#45H    ;A=45H
AGAIN:JNB  P1.2,AGAIN;get out when P.2=1
      MOV  P0,A      ;issue A to P0
      SETB P2.3      ;make P2.3 high

      CLR  P2.3      ;make P2.3 low for H-to-L

No comments:

Post a Comment