Pic18f2553 Weak Pull up support

For general Flowcode discussion that does not belong in the other sections.
Post Reply
alanwms
Posts: 117
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 24 times
Been thanked: 7 times

Flowcode v9 Pic18f2553 Weak Pull up support

Post 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?

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: Pic18f2553 Weak Pull up support

Post 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

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: Pic18f2553 Weak Pull up support

Post 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

alanwms
Posts: 117
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 24 times
Been thanked: 7 times

Re: Pic18f2553 Weak Pull up support

Post by alanwms »

Thank you!

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

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: Pic18f2553 Weak Pull up support

Post 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

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: Pic18f2553 Weak Pull up support

Post by chipfryer27 »

Hi

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

Regards

alanwms
Posts: 117
Joined: Fri Dec 04, 2020 2:29 pm
Has thanked: 24 times
Been thanked: 7 times

Re: Pic18f2553 Weak Pull up support

Post by alanwms »

Perfect - Thank you

Post Reply