Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/13/12 13:22
Read: times


 
#185868 - please help me to interface 24c16 with 89c51
hi
my asm code is working well p0.0 need (0 ) input when you put 0 input to the p0.0 then after each 8 second p1.0 bit will clear and after 8 second p1.1 bit clear so on till p1.6 bit clear and p0.6 bit will hold it for 0 input , i just want when it working i mean p1.0 clear after 8 second p1.1 clear after 8 second p1.2 clear and at this point power cut i just want when the power resume 89c51 should not reset it should be start from the p1.2 bit ....
hope understand,,
regard
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$mod51
ORG 0b

mov p0,#11111111b

mov p2,#0b ;port 2 clear
mov p3,#0b ;port 3 clear
start:
mov p1,#11111111b ;port 1 makes input port
name: jb p0.0,name ;wait for 0 input
clr p1.0 ; port 1 zero bit clear
acall was ; time delay 8 second
clr p1.1 ;p1.1 bit clear
acall was ;time delay 8 second
clr p1.2 ;p1.2 bit clear
acall was ; time delay 8 second
clr p1.3 ;p1.3 bit clear
acall was ;time delay 8 second
clr p1.4 ;p1.4 bit clear
acall was ;time delay 8 second
clr p1.5 ;p1.5 bit clear
acall was ;time delay 8 second
clr p1.6 ; p1.6 bit clear
ahmad: jb p0.6,ahmad ; wait for zero input
sjmp start ; start again

was: mov r0,#45 ; time delay
loop1: mov r1,#25
loop2: mov r2,#250
loop3: nop

djnz r2,loop3
DJNZ r1,loop2
djnz r0,loop1

ret

List of 2 messages in thread
TopicAuthorDate
please help me to interface 24c16 with 89c51            01/01/70 00:00      
   Duplicate Thread!            01/01/70 00:00      

Back to Subject List