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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/17/08 21:06
Read: times


 
#153638 - Re: about using interrupts
Responding to: ???'s previous message
I don't know why do you need photodiodes to read the ouputs since it's the uC who is calculationg it.

; On X1 change
if(X1)
Y1 = not Y2
else
Y1 = 1

; On X2 change
if(X2)
Y2 = not Y1
else
Y2 = 1

Like each on is the inverse of the other or 1 (there is ne loop), it only need to be calculated on change of state of inputs.
Using interrupts like you said.
But there will be a problem, usually the 8052 has an interrupt on only one of the 2 edges of signal; datasheet must be checked.
But you can use other input an some logic to detect and have interrupt on the 2 edges.

--------
Dufour


List of 4 messages in thread
TopicAuthorDate
about using interrupts            01/01/70 00:00      
   Re: about using interrupts            01/01/70 00:00      
   different interrupt            01/01/70 00:00      
   switches and interrupts            01/01/70 00:00      

Back to Subject List