View previous topic :: View next topic |
Author |
Message |
filjoa
Joined: 04 May 2008 Posts: 260
|
problem on 12F683 |
Posted: Tue Jul 29, 2008 2:01 pm |
|
|
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 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jul 29, 2008 2:25 pm |
|
|
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
|
|
Posted: Tue Jul 29, 2008 2:48 pm |
|
|
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
|
|
Posted: Tue Jul 29, 2008 4:06 pm |
|
|
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
|
|
Posted: Tue Jul 29, 2008 6:05 pm |
|
|
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. |
|
|
|