PIC16F877A - OPTION_REG Register

Thread Starter

dragu_stelian

Joined Mar 18, 2017
6
Hello!
Why this statement "OPTION_REG = 0xC5;" is ok when I am writing to OPTION_REG register, but when I am using the next statements I get an error ?
"RBPU not a member of a struct/union"

OPTION_REGbits.RBPU = 0;
OPTION_REGbits.INTEDG = 0;
OPTION_REGbits.T0CS = 0;
OPTION_REGbits.T0SE = 0;
OPTION_REGbits.PSA = 0;
OPTION_REGbits.PS2 = 0;
OPTION_REGbits.PS1 = 0;
OPTION_REGbits.PS0 = 1;

I also trying OPTION_REGbits.NOT_RBPU = 0;
 

Thread Starter

dragu_stelian

Joined Mar 18, 2017
6
I looked in the header file for PIC16F877A, and RBPU is defined as nRBPU.
Now the program works.
I am using HI TECH compiler.
Thank you guys !
 
Top