|
|
View previous topic :: View next topic |
Author |
Message |
Madhu_k_r
Joined: 12 Jan 2016 Posts: 26 Location: Bengaluru
|
C0 and C1 pins in pic18f45k80 [SOLVED] |
Posted: Wed Jan 13, 2016 2:03 am |
|
|
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: 19537
|
|
Posted: Wed Jan 13, 2016 2:35 am |
|
|
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
|
|
Posted: Wed Jan 13, 2016 11:37 pm |
|
|
Thank you So much Ttelmah
i have changed the flag from SOSC_HIGH ,TO SOSC_DIG, AND it is working now _________________ KaalaayaTasmaiNamah: |
|
|
|
|
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
|