mkstevo - 2020-04-30

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:

Set Option_Reg.7  = 0 'enable Port A pullups in general.
SET WPUA0 = 1 'portA.0 not pulled up
SET WPUA1 = 1 'portA.1 not pulled up
Set WPUA2 = 0 'portA.2 not pulled up
Set WPUA3 = 1 'portA.3 pulled up
Set WPUA4 = 1 'portA.4 pulled up
Set WPUA5 = 0 'portA.5 not pulled up

The online help shows the global enable as being called using this:

    Set RBPU = 0 'enabling Port B pullups in general.
    SET WPUB1 = 1 'portb.1 pulled up
    Set WPUB2 = 1 'portb.2
    Set WPUB3 = 1 'portb.3
    Set WPUB4 = 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