View previous topic :: View next topic |
Author |
Message |
amjad_alahdal
Joined: 19 Feb 2013 Posts: 50
|
PortC |
Posted: Tue Mar 19, 2013 11:36 pm |
|
|
I'm using PIC18F2455. I need to use almost all pins. I'm having some problem with PORTC. I need them to be Digital I/O. How do I set the Port to be Digital I/O in the fuses line ?? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
amjad_alahdal
Joined: 19 Feb 2013 Posts: 50
|
|
Posted: Wed Mar 20, 2013 12:04 am |
|
|
Sure ?
Because, I have tried to set some inputs and outputs. Some worked as outputs. It's just I can't use them all |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Mar 20, 2013 12:24 am |
|
|
I assumed you had already tested all the pins on PortC and found that
pins C4 and C5 don't work as digital pins after the PIC is powered up
initially. And then, they can only be programmed to be input-only pins.
That's what I'm talking about in my post (pins C4 and C5). |
|
|
amjad_alahdal
Joined: 19 Feb 2013 Posts: 50
|
|
Posted: Wed Mar 20, 2013 12:35 am |
|
|
Ok thanks.
I will give it a try. Indeed, I need to use 4 pins as outputs and 3 as inputs. I'll modify the connection the way you said. And I'm going to use C4 and C5 as inputs and C6 as well. The rest will be outputs. I'll post the result. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Wed Mar 20, 2013 3:16 am |
|
|
Seriously, just read the data sheet.....
If you look at table 1-2, and read what it says for each port pin here, it tells you exactly 'what' the chip's pins can do. Look at the 'pin type' column, against each pin.
So pin RC0, is listed as I/O, 'digital I/O', while pin RC4, is listed as I, 'digital input'. The manufacturer can't be much clearer than this....
The same for RC5.
You are not going to get very far in electronics, if you can't take a 'hint' as strong as this one!......
Best Wishes |
|
|
|