??? 02/22/06 08:49 Read: times |
#110465 - iap p89v51rd2 Responding to: ???'s previous message |
I have migrated from p89c51rd2 to p89v51rd2.i am trying to do iap using the following code:
ORG 03000H MOV IE,#00H HERE: JB P3.0,HERE SETB P2.0 SETB P2.1 LCALL WRITEM SETB P2.2 THERE: JB P3.1,THERE MOV A,#00H MOV DPTR,#0F000H MOVC A,@A+DPTR MOV P1,A MOV P0,A NOWHERE: LJMP NOWHERE WRITEM: MOV R1,#02H MOV DPTR,#05000H MOV A,#019H LCALL 01FF0H WRITEM1 CJNE A,#00H,WRITEM1 RET My program doesnt function as required P2.0 and P2.1 become set for a short priod of time and again get cleared where as p2.2 doesnt change status atall. i use 12Mhz crystal and 1uF/10k for reset ckt please verify my code and give me sme suggestions regards harshada |