View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
Problem with port C of 18F2550 |
Posted: Fri Aug 31, 2012 6:39 am |
|
|
Hi! I`m using 18F2550. I want to use the whole port c as usual port, but I can`t controll pins RC1 and RC0. I tried to set the ports as outputs - *0xF94=0x00; . No effect.
Help! |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Fri Aug 31, 2012 7:26 am |
|
|
Most pins on PICs are used for several subsystems(usb,comparators,adc,etc.)
If you read the datasheet you'll see what else those pins are used for as well as whether they can be input, output or both uses. Note: not ALL pins can be configured or used for output ! Those arrows in the pinout diagram are important!!
If a pin has several uses, you'll have to disable those alternate uses or setup as per the datasheet, to use them for simple I/O.
Also Microchip and CCS have 'defaults' that you may need to override.
hth
jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Fri Aug 31, 2012 9:03 am |
|
|
Temtronic is spot on about disabling the other systems.
However you also have to 'add' restrictions on what I/O is actually available. On portc, for the 2550, pins C4, and C5, _only_ support input when used as normal I/O. No output available. C3, also does not exist at all. So you are never going to be able to use the 'whole port'.
Best Wishes |
|
|
|