Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

PIC asm : how to get indirect bit value ?

Status
Not open for further replies.

tgq

Full Member level 5
Joined
Jul 15, 2002
Messages
289
Helped
7
Reputation
14
Reaction score
4
Trophy points
1,298
Activity points
2,360
hi
how can I make indirect access to check a special bit ?
it will be like BTFSS Mem,BitPosition but BitPosition should be a variable from 0 to 7 representing the bit number to check
Thx
 

maranaza

Member level 2
Joined
Mar 27, 2002
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
351
You can do it in various ways, but no one is quite short. For example, you can decrement the variable BitPosition in the loop while in the same time rotate Mem to the right. When BitPosition is 0, go out from the loop and test BTFSS Mem,0.

maranaza
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top