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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/31/05 03:08
Read: times


 
#94130 - to be precise...
Responding to: ???'s previous message
Hi Vignesh,

Before going further, IF YOU HAD MADE THIS POST FIRST IT WOULD HAVE MADE LOT EASIER FOR MEMBERS TO UNDERSTAND YOUR PROBLEMS AND SUGGEST ACCORDINGLY.

Both P0^1 == 1 and P0^1 & 0xF0 will XRL on P0.
code produced is

?C0003:
; while(P0^7==1) ;
MOV A,P0
JNZ ?C0003
?C0005:
; while( (P0^7 & 0xF0) == 1);
; SOURCE LINE # 63
MOV A,P0
XRL A,#01H
JZ ?C0005

If you want to check an individual input declare first using sbit as you have done in your first post and check on that like this

while (UP) { ;} // if UP input is high wait
code produced is
?C0001:
; while(UP) {;}
JB UP,?C0001

>>as Leo suggested, while((P0 &0xF0)==x). But not getting the required action. Am I missing something?

Now you can go through the sample code given in my earlier post and relate.



List of 22 messages in thread
TopicAuthorDate
Keil: getting input            01/01/70 00:00      
   If it works in ASM it Works in C            01/01/70 00:00      
      Why C?!            01/01/70 00:00      
         Irrelevant            01/01/70 00:00      
         Of Course            01/01/70 00:00      
   key scan            01/01/70 00:00      
      Delay..            01/01/70 00:00      
         Delay            01/01/70 00:00      
         Software Delay Loops            01/01/70 00:00      
            Software Delay Loops            01/01/70 00:00      
   Learning 'C'            01/01/70 00:00      
   to be precise..            01/01/70 00:00      
      Debounce            01/01/70 00:00      
         completely missed it..            01/01/70 00:00      
      to be precise...            01/01/70 00:00      
         Sorry Leo !            01/01/70 00:00      
         Inferences            01/01/70 00:00      
            Right answer, wrong reason            01/01/70 00:00      
               and therefore            01/01/70 00:00      
            Congratulations            01/01/70 00:00      
               to: Raghu Sir            01/01/70 00:00      
      BIts!            01/01/70 00:00      

Back to Subject List