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

C0 and C1 pins in pic18f45k80 [SOLVED]

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



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

C0 and C1 pins in pic18f45k80 [SOLVED]
PostPosted: Wed Jan 13, 2016 2:03 am     Reply with quote

HI everybody..
can i use C0 AND C1 pins in PIC8F45K80 as normal i/o pins ,and if so how ??
please help .. your help would be highly appreciable
Thanks in advance
_________________
KaalaayaTasmaiNamah:


Last edited by Madhu_k_r on Sat Jan 23, 2016 12:49 am; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Wed Jan 13, 2016 2:35 am     Reply with quote

They are.

Nothing special, _provided you have not got the secondary oscillator/clock enabled or selected_.

Key always with such questions, is _start with the data sheet_. In this case Table 11-5.

Pin C0, is the secondary clock input, or the secondary oscillator output, or a digital I/O. The priority on these tables runs 'bottom to top', so you have to ensure everything to do with the secondary clock is disabled. So you then go to the oscillator section. In here we find:

"If a secondary oscillator is not desired and digital I/O on
port pins, RC0 and RC1, is needed, the SOSCSELx
bits must be set to Digital mode."

A search then says that SOCSEL is in CONFIG1L which implies it is a _fuse_. Looking at these fuses we see that the secondary oscillator can be set for low power mode, high power mode, or digital mode. So now look at the CCS include file for the processor. We see:

"SOSC_LOW,SOSC_DIG,SOSC_HIGH"

I wonder which one might imply it is to be used for digital I/O?....

SOSC_DIG

Select this in your fuses and the pins become available.
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Wed Jan 13, 2016 11:37 pm     Reply with quote

Thank you So much Ttelmah
Very Happy i have changed the flag from SOSC_HIGH ,TO SOSC_DIG, AND it is working now
_________________
KaalaayaTasmaiNamah:
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