I was trying to enable the weak pull ups on the 12F1571.
Am I correct that there is no 'direct' access to the register for the enable for this device?
From the Microchip documentation, it looks as though the WPUEN register, is in the option register, bit 7 so I am setting this using:
SetOption_Reg.7=0'enable Port A pullups in general.SETWPUA0=1'portA.0 not pulled upSETWPUA1=1'portA.1 not pulled upSetWPUA2=0'portA.2 not pulled upSetWPUA3=1'portA.3 pulled upSetWPUA4=1'portA.4 pulled upSetWPUA5=0'portA.5 not pulled up
The online help shows the global enable as being called using this:
SetRBPU=0'enabling Port B pullups in general.SETWPUB1=1'portb.1 pulled upSetWPUB2=1'portb.2SetWPUB3=1'portb.3SetWPUB4=1'portb.4
So I changed RBPU to: RAPU but this is not recognised. I searched the chipdata file using @trev ' s excellent PicInfo program and it shows no entries for RAPU.
Having looked again, this appears to be referred to in GCB as: NOT_WPUEN. No wonder I'm confused!
Ah well. This might help someone out in the future.
Last edit: mkstevo 2020-04-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was trying to enable the weak pull ups on the 12F1571.
Am I correct that there is no 'direct' access to the register for the enable for this device?
From the Microchip documentation, it looks as though the WPUEN register, is in the option register, bit 7 so I am setting this using:
The online help shows the global enable as being called using this:
So I changed RBPU to: RAPU but this is not recognised. I searched the chipdata file using @trev ' s excellent PicInfo program and it shows no entries for RAPU.
Having looked again, this appears to be referred to in GCB as: NOT_WPUEN. No wonder I'm confused!
Ah well. This might help someone out in the future.
Last edit: mkstevo 2020-04-30