1904 views|5 replies

3

Posts

0

Resources
The OP
 

Please guide me, what is = for? Why not just use = [Copy link]

This post is from NXP MCU

Latest reply

First, set the specified bit to 1, and then assign a value. That is, PX = PX | 0x01, and finally the 0th bit of PX will be assigned a value of 1;   Details Published on 2021-8-30 09:00
 

2w

Posts

341

Resources
2
 

A compound assignment operator

|= bitwise logical OR assignment

This post is from NXP MCU

Comments

|=0x01, only change BIT0 to 1, 0x02 only change BIT1...  Details Published on 2021-8-29 17:27
 
 
 

9702

Posts

24

Resources
3
 
qwqwqw2088 posted on 2021-8-29 17:21 A type of compound assignment operator |= bitwise logical or assignment

|=0x01, only change BIT0 to 1, 0x02 only change BIT1...

This post is from NXP MCU

Comments

This bit operation is commonly used in 430 microcontrollers  Details Published on 2021-8-29 17:39
 
 
 

2w

Posts

341

Resources
4
 
littleshrimp posted on 2021-8-29 17:27 |=0x01, only change BIT0 to 1, 0x02 only change BIT1...

This bit operation is commonly used in 430 microcontrollers

This post is from NXP MCU
 
 
 

2w

Posts

341

Resources
5
 

MSP430 MCU general I/O port settings sharing

https://en.eeworld.com/bbs/thread-1144655-1-1.html

This post is from NXP MCU
 
 
 

1942

Posts

2

Resources
6
 

First, set the specified bit to 1, and then assign a value. That is, PX = PX | 0x01, and finally the 0th bit of PX will be assigned a value of 1;

This post is from NXP MCU
 
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

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