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
16F684 weak pull-ups?
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: 16F684 weak pull-ups?
Jan,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?
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
― C.S. Lewis
- 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?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel