Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to change two pins of a PIC port simultaneously without affecting the other pins?

Status
Not open for further replies.

Int Art

Member level 4
Joined
Dec 15, 2001
Messages
70
Helped
9
Reputation
18
Reaction score
6
Trophy points
1,288
Activity points
389
how to change two pins of a port simultaneously without affecting the other pins?
 

Re: PIC port

Example:

MOVLW B'00000011'
MOVWF PORTA

..

MOVLW B'00000000'
MOVWF PORTA
 

Re: PIC port

Bad example. Code:
MOVLW B'00000011'
MOVWF PORTA
will effect all 8 pins in register. Better use ANDWF, IORWF or XORWF,
depend on required value.
For example:
MOVLW B'11111100'
ANDWF PORTA will set bit 0 and bit 1 to 0 without effecting other bits.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top