954,490 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

what did this instruction do ?

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

Mike_99
Newbie Poster
7 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

MOV C, P1.2 simply moves the value on the port pin to the carry.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

so the carry is = 1 because of the mov or because it was ON ?

Mike_99
Newbie Poster
7 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

If P1.2 is set and you move P1.2 to C, then C is set.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

oh ok I got confused with transistor c :)

Thank you

Mike_99
Newbie Poster
7 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You