#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:
Code:
Shift by 4 bits at a time"
| file: /techref/microchip/math/bit/index.htm, 4KB, , updated: 2008/10/8 12:57, local time: 2009/11/3 22:55,
38.107.191.84:LOG IN
|
| ©2009 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? Please DO link to this page! Digg it! <A HREF="http://www.piclist.com/techref/microchip/math/bit/index.htm"> PIC Microcontoller Bit Math Methods</A> |
| Did you find what you needed? |
Watch, recieve and send I2C via serial port. 100Kb/s. Also 5 TTL out & 8 in. $15 chip $30 w/ PCB $40 kit $50 A&T |
Welcome to www.piclist.com! |
.