News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

what happened with the Declare PORTB_Pullups

Started by Yves, May 07, 2023, 10:44 AM

Previous topic - Next topic

Yves

Hello all,

Is Declare PORTB_Pullups not part of Positron anymore? I don't see it in new positron manual. I want to use it for the 16F876A.

Yves
Yves

Gary Scott

#1
PinMode

Syntax
PinMode Port.Pin or Pin Number , Mode

Overview
Makes the specified Port or Pin an input, output or enables internal pull-up resistors.

Page 170

Yves

Thanks for the info, but the PinPullup Enable, PORTB don't seems to work with the 16F876A though it has this possibility to have weak internal pullup. It is bit 7 on the  OPTION_REG REGISTER but I forgot how to address it. Looking at the spec I have to clear bit 7 to enable PortB pullup.

Yves
Yves

Gary Scott

This is what I would do.
OPTION_REG.7 = 0

RGV250

Hi,
I have just compiled a program with 4.0.3.3 and it compiles with   Declare PORTB_Pullups = True   in it.

Bob

Gary Scott

#5
Quote from: RGV250 on May 07, 2023, 08:00 PMHi,
I have just compiled a program with 4.0.3.3 and it compiles with   Declare PORTB_Pullups = True   in it.

Bob

The only mention of  PORTB_Pullups in the manual is it's a "Protected Compiler Word".

But, this thread covers the subject:   https://protoncompiler.com/index.php/topic,665.msg4660.html#msg4660