Code:
Bit # 76543210
TRISIO = %01010101
if you want to set few bits without altering the other, you may need to set them manually one after the other or use bitwise OR.
let's say you want to change bit 0,2,4,6 of OPTION_REG which you already set to %00000000, then all you need to do is to use
OPTION_REG=OPTION_REG | %01010101
You can refer to section 4.17 and see the following
http://www.learn-c.com/boolean.htm
HTH
Last edited by mister_e; - 11th November 2007 at 02:24.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks