#define BIT(addr,bit) bit #define ADDR(addr,bit) addr #define MASK(addr,bit) 1<<(bit) Then: #define myflag somereg,5 movlw BIT(myflag) movf ADDR(myflag),w andlw MASK(myflag) etc...
Techniques for exploiting the parallelism of bitwise operations [incl bit reversals, counting, and Morton keys] by Ron Gutman
Shift by 4 bits at a time"
|file: /Techref/microchip/math/bit/index.htm, 5KB, , updated: 2012/1/23 03:10, local time: 2018/11/14 08:33,
|©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/microchip/math/bit/index.htm"> PIC Microcontoller Bit Math Methods</A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20181114 RussellMc, Van Horn, David, Sean Breheny, David C Brown, Isaac M. Bavaresco, Neil, Bob Blick, John Gardner, AB Pearce - UKRI STFC, Harold Hallikainen,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!