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

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

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

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

oh ok I got confused with transistor c :)

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.