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 support@ccsinfo.com

problem on 12F683

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



Joined: 04 May 2008
Posts: 260

View user's profile Send private message

problem on 12F683
PostPosted: Tue Jul 29, 2008 2:01 pm     Reply with quote

Hi

I try make a little example with this PIC12F683 with internal clock but it don't work...

Quote:

#include <12F683.h>
#use delay(clock=4000000)
#fuses NOWDT,INTRC_IO, NOCPD, NOPROTECT, MCLR, NOPUT, BROWNOUT, IESO, FCMEN

void main()
{
while(TRUE)
{
output_high(PIN_A0); //pin number 7
delay_ms(1000);
output_low(PIN_A0);
delay_ms(1000);

}
}


I have on PIN_A0 one LED.

some one can help me?

regards Wink
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 29, 2008 2:25 pm     Reply with quote

Post your compiler version. It's a 4-digit number in this format: x.xxx
It's given at the top of the .LST file. The .LST file is in your project directory.
Ttelmah
Guest







PostPosted: Tue Jul 29, 2008 2:48 pm     Reply with quote

Obvious comments apply though:
Hopefully you have a pull up on the MCLR input.
Series resistor to the LED.

Best Wishes
filjoa



Joined: 04 May 2008
Posts: 260

View user's profile Send private message

PostPosted: Tue Jul 29, 2008 4:06 pm     Reply with quote

Hi

yes, I dont remember resistor on MCLR :S and other problem stay on the LED, it stay dead..

now all work, thanks...
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Tue Jul 29, 2008 6:05 pm     Reply with quote

If I am not mistaken, the GPIO pins 0-3 default to analog inputs. They must be specifically set to digital I/O with a set up function. I don't have access to my compiler just now, but look at the setup functions in the help files and the appropriate parameters in the 12F683.h files.
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