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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/06/03 09:44
Read: times


 
#52187 - question
I need to write a program to read a toggle switch and then write the output to an LED, but before I even switch on the toggle switch, the LED has already turned on. Can anyone tell me what are the possible reasons for this?

Below is the main part of the program I wrote:

mov dptr,#PINSA ; read PORTA pins
movx a,@dptr
setb acc.0
movx @dptr,a

mov dptr,#PORTBCFG
setb acc.0

mov dptr,#OUTB
movx a ,@dptr
setb acc.0
movx @dptr,a

mov acc , #00000001b
movx @dptr, a
mov dptr,#OEB
setb acc.0
movx @dptr, a
end

thanks



List of 4 messages in thread
TopicAuthorDate
question            01/01/70 00:00      
   RE: question            01/01/70 00:00      
      RE: question            01/01/70 00:00      
      RE: question            01/01/70 00:00      

Back to Subject List