what did this instruction do ?

Thread Solved

Join Date: Oct 2008
Posts: 7
Reputation: Mike_99 is an unknown quantity at this point 
Solved Threads: 0
Mike_99 Mike_99 is offline Offline
Newbie Poster

what did this instruction do ?

 
0
  #1
Oct 20th, 2008
Hello

Ok P1.2 is connected to a two external devices if I write a “1” to P1.2 and transistor B is OFF and transistor C is ON and I did MOV C, P1.2 instruction

c = 1 right ? now since c = 1 is it because its ON or because we wrote 1 to P1.2 ?

any help is appreciated
Last edited by Mike_99; Oct 20th, 2008 at 6:39 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 327
Reputation: Colin Mac is on a distinguished road 
Solved Threads: 22
Colin Mac Colin Mac is offline Offline
Posting Whiz

Re: what did this instruction do ?

 
0
  #2
Oct 20th, 2008
MOV C, P1.2 simply moves the value on the port pin to the carry.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 7
Reputation: Mike_99 is an unknown quantity at this point 
Solved Threads: 0
Mike_99 Mike_99 is offline Offline
Newbie Poster

Re: what did this instruction do ?

 
0
  #3
Oct 20th, 2008
so the carry is = 1 because of the mov or because it was ON ?
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 327
Reputation: Colin Mac is on a distinguished road 
Solved Threads: 22
Colin Mac Colin Mac is offline Offline
Posting Whiz

Re: what did this instruction do ?

 
0
  #4
Oct 20th, 2008
If P1.2 is set and you move P1.2 to C, then C is set.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 7
Reputation: Mike_99 is an unknown quantity at this point 
Solved Threads: 0
Mike_99 Mike_99 is offline Offline
Newbie Poster

Re: what did this instruction do ?

 
0
  #5
Oct 20th, 2008
oh ok I got confused with transistor c

Thank you
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 608 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC