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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/01/06 04:14
Read: times


 
#108853 - default case to continue serial communic
Hello, I am really new to assembly language i wrote this program to send a Character on serial port and take complement of port P1.0----P1.3,with keys A,B,C,D. here i could not make a default case that if i press any of key rather then A,B,C,D, do nothing, in this case my hardware stop performing anything please tell me about the change in code to make continue to work with hardware

MOV TMOD,#20H
MOV TH1,#0f9h
MOV SCON,#50H
SETB TR1

HERE: JNB RI,HERE
MOV A,SBUF
acall check
reti

check:
one:
cjne A,#'A',two
cpl P1.0
CLR RI
SJMP HERE

two:
cjne A,#'B',three
cpl P1.1
CLR RI
SJMP HERE

three:
cjne A,#'C',four
cpl P1.2
CLR RI
SJMP HERE

four:
cjne A,#'D',one
cpl P1.3
CLR RI
SJMP HERE

END


List of 2 messages in thread
TopicAuthorDate
default case to continue serial communic            01/01/70 00:00      
   Are you using Serail Interrupt            01/01/70 00:00      

Back to Subject List