CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem with port C of 18F2550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

Problem with port C of 18F2550
PostPosted: Fri Aug 31, 2012 6:39 am     Reply with quote

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: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Aug 31, 2012 7:26 am     Reply with quote

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: 19539

View user's profile Send private message

PostPosted: Fri Aug 31, 2012 9:03 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group