Page 1 of 1

16F684 weak pull-ups?

Posted: Mon May 04, 2009 12:55 pm
by jadiflow
Hi,

I'm trying to activate the internal A-reg weak pull-ups in an 16F684. I have the following C-code block:

//enable weak pullups
//C Code:
option_reg = option_reg & 0b01111111; //enable wpua

//weak pullup on A
//C Code:
wpua = 0b00110111; //wpua on all

The wpua... line generates a compiler error. I checked the 16F684.fcd and didn't find anything on the weak pullup register. Is this not implemented in the F684?

Thanks,

Jan Didden

Re: 16F684 weak pull-ups?

Posted: Mon May 04, 2009 6:39 pm
by kersing
jadiflow wrote: wpua = 0b00110111; //wpua on all

The wpua... line generates a compiler error. I checked the 16F684.fcd and didn't find anything on the weak pullup register. Is this not implemented in the F684?
Jan,

It looks like it is called WPU, not WPUA in the definition for this processor.

Good luck,

Jac

Re: 16F684 weak pull-ups?

Posted: Tue May 05, 2009 8:37 am
by jadiflow
Yes indeed that's it.

Funny, I thought about that and did a search for 'wpu' through the .fcd, but didn't find it.

Thanks and best regards,

Jan Didden

Re: 16F684 weak pull-ups?

Posted: Tue May 05, 2009 9:10 am
by Benj
Hello Jan

The registers are defined in the BoostC/Include files rather then the FCD files. These are more for configuring Flowcode for the chip rather then configuring the compiler.