Page 1 of 1

Pic18f2553 Weak Pull up support

Posted: Fri Apr 07, 2023 7:34 pm
by alanwms
Help would be appreciated. I have FC9 and attempting to enable weak pull up resistors on port B. I don't see that selection in the "project options area.

Is that something I have to code in a "C" box? I think it could be "SET WPUB1 = 1" Maybe

On the same subject - I can never find a document which lists the instruction sets for these devices. Any suggestions?

Re: Pic18f2553 Weak Pull up support

Posted: Fri Apr 07, 2023 9:22 pm
by chipfryer27
Hi

I'm guessing that it would be rather difficult to include that in the options due to the differing chips.

Enabling is done as you suggest by setting a register however looking at the datasheets returned during a search, it seems like whomever was given the job of creating the documentation for this chip perhaps took the rest of the day off..... Not a lot of info.....

If I find anything of interest I'll post.

Regards

Re: Pic18f2553 Weak Pull up support

Posted: Sat Apr 08, 2023 8:17 am
by chipfryer27
Hi

Helps if I read the datasheet :)

In my defence I was heading out.....

In the datasheet for the device it states

"This data sheet documents only the devices’ features and specifications that are in addition to the features and specifications of the PIC18F2455/2550/4455/4550 devices"

Therefore if you download the DS for the above listed, you will get far more documentation. Page 116 documents Port B and the Weak Pull Ups, and page 118 shows a table of registers (clear INTCON2 bit 7 to enable WPU).

Regards

Re: Pic18f2553 Weak Pull up support

Posted: Sat Apr 08, 2023 3:16 pm
by alanwms
Thank you!

Now I just have to figure out how to text that bit 7 bit to be clear.

Re: Pic18f2553 Weak Pull up support

Posted: Sat Apr 08, 2023 3:28 pm
by chipfryer27
Hi

FC allows many ways from setting the entire register to a single bit.

I rarely need to use "C" or ASM as FC makes everything so easy ;)

If you only need to set / clear a single bit and if I remember correctly (if I'm wrong someone will correct me) you can use:-
clear_bit(INTCON2,7);

"clear_bit" is the instruction, the register you want to work on is capitalised then comes the bit you want to set/clear.

I can't check if I'm correct until back. If I'm wrong it won't compile.

Regards

Re: Pic18f2553 Weak Pull up support

Posted: Sun Apr 09, 2023 8:14 pm
by chipfryer27
Hi

Created a chart just with the above instruction and it compiled OK.

Regards

Re: Pic18f2553 Weak Pull up support

Posted: Mon Apr 10, 2023 2:17 am
by alanwms
Perfect - Thank you