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

Open Drain Output pic24F

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







Open Drain Output pic24F
PostPosted: Tue Dec 29, 2009 3:53 am     Reply with quote

I need to use on PIC24F an output as ano open drain.

I just need to set to 1 the propper bit of the ODCx register.
Is there in CCS a function or a pre processor directive that makes this?

thanks
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Dec 29, 2009 4:16 am     Reply with quote

Quote:
Is there in CCS a function or a pre processor directive that makes this?
No.
- You can define the OCD registers yourself by #byte or #word statements
- You can emulate open drain by switching the respective pin between output_low and input, as it would be
done with other PICs that don't have OCD registers.
Guest








PostPosted: Tue Dec 29, 2009 5:09 am     Reply with quote

FvM wrote:
Quote:
Is there in CCS a function or a pre processor directive that makes this?
No.
- You can define the OCD registers yourself by #byte or #word statements
- You can emulate open drain by switching the respective pin between output_low and input, as it would be
done with other PICs that don't have OCD registers.


Thank you very much.
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