#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...
Archive:
See:
Code:
Shift by 4 bits at a time"
file: /Techref/microchip/math/bit/index.htm, 5KB, , updated: 2012/1/23 03:10, local time: 2024/11/24 06:23,
owner: IMB-yahoo-J86,
18.118.144.199:LOG IN
|
©2024 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://sxlist.com/TECHREF/microchip/math/bit/index.htm"> PIC Microcontoller Bit Math Methods</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.