3138 views|14 replies

968

Posts

0

Resources
The OP
 

How to use the instruction MOV C, P1.1? There is no instruction MOV C, XX in the 51 assembly instruction table. [Copy link]

 

邀请:@maychang   @chenzhufly   @wsmysyn   参与回复

This post was last edited by Yishayishi on 2022-7-8 08:39

MOV C, P1.1; Read the level on the P1.1 pin

How to use the instruction MOV C, P1.1? There is no instruction MOV C, XX in the 51 assembly instruction table?

This post is from 51mcu

Latest reply

I hope there are more posts like this that I can answer, haha I thought there was something wrong with the grammar, but it turns out there was nothing wrong. BTW, if it is a C51 program, that bit should be written as P1^1, otherwise the compiler will not recognize it.   Details Published on 2022-10-11 23:26
 

2w

Posts

0

Resources
2
 

『MOV C , P1.1 Usage of this instruction』

That's how it is used.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
3
 

"There is no MOV A, XX instruction in the 51 assembly instruction table?"

There is such an instruction.

Read the book carefully.

This post is from 51mcu

Comments

Wrong question, there is no MOV C, XX instruction in the 51 assembly instruction table?  Details Published on 2022-7-8 08:41
 
 
 

968

Posts

0

Resources
4
 
maychang posted on 2022-7-8 07:37 "There is no MOV A, XX instruction in the 51 assembly instruction table? 】 There is such an instruction. Read the book carefully.

Wrong question, there is no MOV C , XX instruction in the 51 assembly instruction table?

This post is from 51mcu

Comments

This should be the most common MOV instruction, is there anything special about it?  Details Published on 2022-7-8 09:15
This should be the most common MOV instruction, is there anything special about it?  Details Published on 2022-7-8 09:12
This should be the most common MOV instruction, is there anything special about it?  Details Published on 2022-7-8 08:46
 
 
 

5998

Posts

6

Resources
5
 
Yishayishi published on 2022-7-8 08:41 Wrong question, there is no MOV C, XX instruction in the 51 assembly instruction table?

This should be the most common MOV instruction, is there anything special about it?

This post is from 51mcu
 
 
 

2865

Posts

4

Resources
6
 

Bit transfer instruction MOV C, BIT, bit transfer instruction

Don't ask about everything. Read a few days first.

This post is from 51mcu

Comments

I treat others as assistants. I am too lazy to read books or think. I doubt whether I can learn well.  Details Published on 2022-7-8 10:03
 
 
 

2w

Posts

0

Resources
7
 
Yishayishi posted on 2022-7-8 08:41 Wrong question, there is no MOV C, XX instruction in the 51 assembly instruction table?

"There is no MOV C , XX instruction in the 51 assembly instruction table ?"

Yes. The arrow in the picture below points to such a command.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
8
 
Yishayishi posted on 2022-7-8 08:41 Wrong question, there is no MOV C, XX instruction in the 51 assembly instruction table?

"There is no MOV C, XX instruction in the 51 assembly instruction table?"

Bigbat on the 6th floor is right: read a few days first.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
9
 
Yishayishi posted on 2022-7-8 08:41 Wrong question, there is no MOV C, XX instruction in the 51 assembly instruction table?

"There is no MOV C, XX instruction in the 51 assembly instruction table?"

I doubt whether you have read the 51 assembly instruction set in its entirety.

This post is from 51mcu
 
 
 

6062

Posts

4

Resources
10
 
This post was last edited by damiaa on 2022-7-8 09:40

Bit addressing, the operand is the bit address:

for example:

SETB P1.1 ; Set P1.1 to 1

CLR P1.1

MOV 32H, C; 32H←carry bit CY

MOV C, P1.1; bit transfer instruction: MOV C, bit

; P1.1 bit address is 91H

; You can query the relevant chapters of the stc8051 series microcontroller reference manual: 8051 bit-addressable data registers

; Check the bit operation instruction and bit transfer instruction again

; The host should read the book carefully. Come on.

This post is from 51mcu
 
 
 

968

Posts

0

Resources
11
 

Thank you very much.

This post is from 51mcu
 
 
 

2145

Posts

8

Resources
12
 
bigbat posted on 2022-7-8 09:08 Bit transfer instruction MOV C, BIT, bit transfer instruction Don't ask everything, read a few days of books first.

I treat others as assistants. I am too lazy to read books or think. I doubt whether I can learn well.

This post is from 51mcu

Comments

Thanks.  Details Published on 2022-7-9 07:04
 
Personal signature坐而言不如起而行
 
 

968

Posts

0

Resources
13
 
wsmysyn posted on 2022-7-8 10:03 I treat others as assistants, I am too lazy to read books, too lazy to think. . . Can I learn well? I doubt it

Thanks.

This post is from 51mcu
 
 
 

210

Posts

3

Resources
14
 

The understanding of assembly instructions is not thorough enough. It is best to have a deep understanding of each instruction, including what kind of instruction it is, how the data changes and is transferred, which addresses are involved, etc. It is recommended to understand the working principle of the microcontroller.

This post is from 51mcu
 
 
 

224

Posts

0

Resources
15
 

I hope there are more posts like this that I can answer, haha

I thought there was something wrong with the grammar, but it turns out there was nothing wrong.

BTW, if it is a C51 program, that bit should be written as P1^1, otherwise the compiler will not recognize it.

This post is from 51mcu
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
MATLAB APP Designer serial port debugging tool writing

This post was last edited by lb8820265 on 2019-5-9 23:11 Previously, we introduced two ways to use VC6 to make serial ...

About the original picture and packaging

Does anyone have the original picture and package of STM32F103 series?

How to use CPLD to collect asynchronous signals

Scenario: Use CPLD to decode a serial data channel. The data has no accompanying clock and has a fixed frequency but a d ...

Measuring poles and zeros from a Bode plot

This post was last edited by Jack315 on 2021-1-25 00:52 The transfer function of a single zero is: 522846 The Bode plot ...

Encoder counting principle and motor speed measurement principle - multi-picture analysis

This post was last edited by DDZZ669 on 2021-2-14 23:30 Encoder is a sensor used to measure mechanical rotation or displ ...

35 "Ten Thousand Miles" Raspberry Pi Car——ROS Learning (Realizing Hello World)

The best way to learn ROS is to use it. The ROS official website has a Chinese version of the tutorial . After install ...

36 "Ten Thousand Miles" Raspberry Pi Car——ROS Learning (VSCode to Implement Hello World)

It is very convenient to run ROS projects in VSCode. In this section, we use ROS to write and run the "Hello world" pro ...

[The strongest open source] Hand-rubbed 120W switching power supply

I recently took the time to make a switching power supply 645265 645262 645263 645264 645261 645260

Record a blue screen pit

I mentioned a while ago that my company's computers would occasionally blue screen. Now I think about it, the blue scree ...

ESP8266 01+DHT11 acquisition

Could anyone give me some advice? When I collect DHT11 data through one of GPIO 0 and 2, the 8266 01 keeps restarting. O ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list