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.

[SOLVED] What is the assembly instruction to shift right for pic16F84A

Status
Not open for further replies.

bimalkamal

Member level 1
Joined
Nov 27, 2011
Messages
32
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,529
Suppose my PORTB register contains decimal 128(Hex0x80)

now in a loop the value must change like:- 128->64->32->16->8->4->2->1

Divide by 2 or shift left operation is needed.what to do?


RRF PORTB,1 instruction changes like this:-
(Bits shown)
10000000->11000000->11100000->11110000->11111000->.....->11111111 so, it is not what I want
 

Clear the carry bit before you do the each RRF instruction.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top