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?
Pic18f2553 Weak Pull up support
-
- Posts: 117
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 2:29 pm
- Has thanked: 24 times
- Been thanked: 7 times
-
- Valued Contributor
- Posts: 1186
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 289 times
- Been thanked: 417 times
Re: Pic18f2553 Weak Pull up support
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
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
-
- Valued Contributor
- Posts: 1186
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 289 times
- Been thanked: 417 times
Re: Pic18f2553 Weak Pull up support
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
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
-
- Valued Contributor
- Posts: 1186
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 289 times
- Been thanked: 417 times
Re: Pic18f2553 Weak Pull up support
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
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
-
- Valued Contributor
- Posts: 1186
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 289 times
- Been thanked: 417 times
Re: Pic18f2553 Weak Pull up support
Hi
Created a chart just with the above instruction and it compiled OK.
Regards
Created a chart just with the above instruction and it compiled OK.
Regards