16F684 weak pull-ups?

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times
Contact:

16F684 weak pull-ups?

Post 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

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: 16F684 weak pull-ups?

Post 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
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times
Contact:

Re: 16F684 weak pull-ups?

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F684 weak pull-ups?

Post 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.

Post Reply