Meaning of P3DIR|=BIT0, P3OUT&=~BIT0

Publisher:HeavenlyMelodyLatest update time:2015-11-10 Source: eefocusKeywords:BIT0 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
P5OUT |= BIT5

P5OUT is ORed with BIT5 and then assigned to  P5OUT.

P3OUT&=~BIT0

BIT0 is actually 0x0001; then P3OUT&=~BIT0; is equivalent to P3OUT=P3OUT&(~0X0001), 
which is actually P3OUT=P3OUT&0XFFFE(11111111111111110), clearing the lowest bit of port P3 and keeping the other bits as they are.

 

BIT0: 0x0001 (0000 0000 0000 0001), ~BIT0: 0xFFFE (1111 1111 1111 1110), P3OUT and ~BIT0 are ANDed, and then assigned to P3OUT, that is, the lowest position is cleared and the other bits remain unchanged

Keywords:BIT0 Reference address:Meaning of P3DIR|=BIT0, P3OUT&=~BIT0

Previous article:MSP430 5438 MCU Study Notes
Next article:How to turn on and off interrupts in MSP430, code and command for turning on and off interrupts

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号