dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Fri Apr 08, 2005 2:44 pm |
|
|
If you look at the datasheet, the OPTION register bit 6 enables/disables the GP0,GP1/GP3 pullups.
Load the W register with your desired bit configuration for the OPTION register then use the assembly OPTION instruction to transfer it to the OPTION register similar to the following:
#asm
movlw 0x40
OPTION
#endasm
BTW< beware that other instructions that use the OPTION register will overwrite the OPTION register, so you will need to set all the bits at one time manually. For example a setup_timer() command will overwrite the OPTION bits. So use the datasheet,plan ahead and set them all with one command. |
|