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

oscillator pins in 16f676[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

oscillator pins in 16f676[SOLVED]
PostPosted: Mon Mar 14, 2016 7:07 am     Reply with quote

hi..
how to use oscillator pins as a normal i/o's in pic16f676
i have tried INTRC_IO flag but still not working
i am using ccs5.008 version and crystal 4MHZ
thanks in advance ...
_________________
KaalaayaTasmaiNamah:


Last edited by Madhu_k_r on Mon Mar 14, 2016 11:12 pm; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9220
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:25 am     Reply with quote

Please post your program. We need to see what you're doing to tell you what is wrong.

Jay
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Mar 14, 2016 7:28 am     Reply with quote

post your program including #fuses and you #use delay statement so i can see what all you have going on.
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:31 am     Reply with quote

this is my main program

#include <CHAIR_CONTROL_ONLY.h>

void main()
{
delay_ms(200);

while(TRUE)
{
output_low(pin_a4);
delay_ms(200);
output_high(pin_a4);

}

}


#include <16F684.h>


#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOPROTECT //Code protected from reads
#FUSES INTRC_IO //Internal RC Osc,no CLKOUT
#FUSES NOMCLR

#use delay(crystal=4000000)
_________________
KaalaayaTasmaiNamah:
temtronic



Joined: 01 Jul 2010
Posts: 9220
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:36 am     Reply with quote

comments
1) the order of the code is totally wrong ! Please consult either the CCS manual,any of the examples int he examples folder or the code library here

2) your subject says 16F676 yete the processor header is for 16F684A. THAT is troubling... WHICH is it ?

3) chair_control_only.h is not known to me, it COULD be affecting your program.

Jay
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:42 am     Reply with quote

temtronic wrote:
comments
1) the order of the code is totally wrong ! Please consult either the CCS manual,any of the examples int he examples folder or the code library here

2) your subject says 16F676 yete the processor header is for 16F684A. THAT is troubling... WHICH is it ?

3) chair_control_only.h is not known to me, it COULD be affecting your program.

Jay



i am sorry it's 16f676.h
_________________
KaalaayaTasmaiNamah:
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:43 am     Reply with quote

#include <16F676.h>


#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOPROTECT //Code protected from reads
#FUSES INTRC_IO //Internal RC Osc,no CLKOUT
#FUSES NOMCLR //Master Clear pin used for I/O

#use delay(crystal=4000000)
_________________
KaalaayaTasmaiNamah:
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:45 am     Reply with quote

[quote="Madhu_k_r"][quote="temtronic"]comments
1) the order of the code is totally wrong !

thanks for your reply
but what is wrong with the order
i just want to make that pin high and low
i coudn't make it
i have tried it in proteus simulation
_________________
KaalaayaTasmaiNamah:
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 7:46 am     Reply with quote

[quote="Madhu_k_r"][quote="temtronic"]comments


3) chair_control_only.h is not known to me, it COULD be affecting your program.


and chair_control is just a project name
_________________
KaalaayaTasmaiNamah:
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Mar 14, 2016 8:06 am     Reply with quote

Code:

#use delay(crystal=4000000)


read the CCS manual please --
the line above contradicts what your fuses say!!

RTFM and your problem will go away.......
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

PostPosted: Mon Mar 14, 2016 11:00 pm     Reply with quote

thank you "asmboy" and all
i have changed to #use delay(internal=4000000)
and working now
_________________
KaalaayaTasmaiNamah:
Madhu_k_r



Joined: 12 Jan 2016
Posts: 26
Location: Bengaluru

View user's profile Send private message

Re: oscillator pins in 16f676 [SOLVED]
PostPosted: Mon Mar 14, 2016 11:11 pm     Reply with quote

Madhu_k_r wrote:
hi..
how to use oscillator pins as a normal i/o's in pic16f676
i have tried INTRC_IO flag but still not working
i am using ccs5.008 version and crystal 4MHZ
thanks in advance ...

_________________
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