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

Back to Subject List

Thread Closed: Issue successfully resolved

???
01/22/04 13:09
Read: times


 
#63125 - RE: Help Please!!!
Responding to: ???'s previous message

push button = input switch

connection is as follow

p1.0 connected to 1 pin of the switch

the other pin of the switch connected as follows
ground then the pin of the switch then resistance 330 ohm and then to +5v and connected

i tested it and its working as i used it to give signal to the external interupt 0 and in the interupt handler i make led blink once on p0.0

that is to check that the interupt working
then i compare the switch value if i found it = to the first switch i make a led on p0.1 blink once

if the second switch i make the led on p0.1 blink 2 times and so on till switch no 5

and if it didnt found pressed switch it lights both the leds on p0.1 & p0.0

and when i test it it blinks the led of the interupt
then lights both the led on p0.0 and p0.1

the problem is i dont know the right value to compare with the p1 value so i get inside the condition
(cjne a,# this is the value i dont know :S ,label)
the part of the code is

mov a,p1
CPL A

cjne a,#11111100b,s_w22
cpl p0.1
lcall delay
lcall delay
cpl p0.1
jmp e_o
s_w22:
cjne a,#11111101b,e_o
cpl p0.1
lcall delay
lcall delay
cpl p0.1
lcall delay
lcall delay
cpl p0.1
lcall delay
lcall delay
cpl p0.1



jmp e_o

cpl p0.1
lcall delay
lcall delay
cpl p0.1
lcall delay
lcall delay
cpl p0.1
lcall delay
lcall delay
cpl p0.1
cpl p0.0
e_o:



List of 51 messages in thread
TopicAuthorDate
Help Please!!!            01/01/70 00:00      
   RE: Help Please!!!            01/01/70 00:00      
      RE: Help Please!!!            01/01/70 00:00      
         RE: Help Please!!!            01/01/70 00:00      
            RE: Help Please!!!            01/01/70 00:00      
               RE: Help Please!!!            01/01/70 00:00      
                  RE: Help Please!!!            01/01/70 00:00      
                     RE: Help Please!!!            01/01/70 00:00      
                        RE: Help Please!!!            01/01/70 00:00      
                           RE: Help Please!!!            01/01/70 00:00      
                              RE: Help Please!!!            01/01/70 00:00      
   RE: Help Please!!!            01/01/70 00:00      
   RE: Help Please!!!            01/01/70 00:00      
      RE: Help Please!!!            01/01/70 00:00      
         RE: Help Please!!!            01/01/70 00:00      
            RE: Help Please!!!            01/01/70 00:00      
               RE: Help Please!!!            01/01/70 00:00      
                  RE: Help Please!!!            01/01/70 00:00      
            RE: Help Please!!!            01/01/70 00:00      
               RE: Help Please!!!            01/01/70 00:00      
   RE: Help Please!!!            01/01/70 00:00      
      RE: Help Please!!!            01/01/70 00:00      
         RE: Help Please!!!            01/01/70 00:00      
            RE: language            01/01/70 00:00      
               RE: language            01/01/70 00:00      
   I miss some points...            01/01/70 00:00      
      RE: I miss some points...            01/01/70 00:00      

Back to Subject List