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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/27/00 18:28
Read: times


 
#5362 - RE: help! 8031vs keyboard(pc)
Im not sure if this code works but it might be worth a try:

setb CLOCK
setb DATA


LOOP: acall recieve
mov p1,a
sjmp LOOP

Recieve:

AT1: clr a
mov r0,#8
acall H2L

AT2: jb CLOCK,AT2

mov c,DATA
rrc a
AT3: jnb CLOCK,AT3
djnz r0,AT2

acall H2L
acall H2L

ret


SEND: clr CLOCK

mov r0,#120
AS0: djnz r0,AS0

clr DATA
setb CLOCK

acall H2L


mov r0,#8

mov c,P
cpl c
mov PARITY,c


AS1: rrc a
mov DATA,c

acall H2L

djnz r0,AS1


mov c,PARITY
mov DATA,C
acall H2L


setb DATA
acall H2L
ret




H2L: jb CLOCK,H2L
HL2: jnb CLOCK,HL2
ret




List of 4 messages in thread
TopicAuthorDate
help! 8031vs keyboard(pc)            01/01/70 00:00      
RE: help! 8031vs keyboard(pc)            01/01/70 00:00      
RE: help! 8031vs keyboard(pc)            01/01/70 00:00      
RE: help! 8031vs keyboard(pc)            01/01/70 00:00      

Back to Subject List