View previous topic :: View next topic |
Author |
Message |
IceMetal
Joined: 20 Nov 2008 Posts: 79 Location: white Plains, NY
|
12f675 code will compile but it would not run |
Posted: Wed Dec 29, 2010 12:44 pm |
|
|
I have this simple code that I been trying to run on my pic12f675
Code: | #include <12F675.h>
#fuses INTRC_IO,NOWDT,NOPUT,NOPROTECT,NOMCLR
#use delay(clock=4000000)
void main()
{
while(1)
{
OUTPUT_HIGH(PIN_A0);
delay_ms(1000);
output_low(PIN_A0);
delay_ms(1000);
}
} |
it does compile but when I burn it into the chip it would not run I though it was something wrong with the hardware, but when I put this hex file that I downloaded from online the led starts blinking
http://www.voti.nl/blink/code/b675i-1.hex |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Dec 29, 2010 1:33 pm |
|
|
What's your compiler version ?
Are you running this in Proteus or a real board ?
Also, what's the Vdd voltage on your PIC board ? |
|
|
IceMetal
Joined: 20 Nov 2008 Posts: 79 Location: white Plains, NY
|
|
Posted: Wed Dec 29, 2010 4:44 pm |
|
|
PCM programmer wrote: | What's your compiler version ?
Are you running this in Proteus or a real board ?
Also, what's the Vdd voltage on your PIC board ? |
I'm using version 4.068
this is my circuit I'm using the pickit 2
voltage is 5V
also I'm using this with MPLAB IDE v8.56 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Dec 29, 2010 6:13 pm |
|
|
I installed vs. 4.068 and it works in hardware. The LED is blinking.
I don't see an LED on your schematic. My LED circuit looks like this:
Code: |
pin 470 ohms LED
A0 ---/\/\/\/------->|----
|
|
----- Ground
---
-
|
Also, make sure you compile the program for "Release" mode
and not Debug mode. |
|
|
|