View previous topic :: View next topic |
Author |
Message |
stewc Guest
|
Problem with 12F675 |
Posted: Thu Jun 26, 2008 5:00 am |
|
|
Hi
I am having a power-on problem with a project I am doing using a PIC 12F675. The program is fairly simple - it just flashes an LED.
When I power-up (apply +5v) to the PIC, sometimes it works, sometimes not. I have tried all sorts of things to fix this but I am stuck - I havent seen this with another pic device and my hardware is ok.
The configuration fuses I have are
Internal RC no clk
WDT OFF
Power-up timer OFF (tried with ON and didnt work at all)
MCR Internal
BOD OFF
Code protect OFF
EE2 protect off.
I think it must be a reset issue but I dont know how to fix it. Any help would be great
TIA Stew |
|
|
Guest
|
flakey 12F675 |
Posted: Thu Jun 26, 2008 5:25 am |
|
|
This is what I use for my 12F683 projects...
#include <12f683.h>
#fuses INTRC_IO,NOWDT,NOPUT,NOPROTECT,NOMCLR
...perhaps you need to add the NOMLCR option ?
Jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jun 26, 2008 10:53 am |
|
|
Always post your compiler version. Some early versions of the compiler
have bugs in the init code for the comparator and/or ADC. If you post
your version, I can check if your version is affected. |
|
|
andervsq
Joined: 17 Sep 2008 Posts: 1
|
|
Posted: Wed Sep 17, 2008 9:26 pm |
|
|
Hi,
I'm having the same problem too. My CCS C is:
IDE version 3.36
PCB, PCM e PCW version 3.168
Is possible to write an ASM code to solve it?
Can you help me about it?
Thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Sep 17, 2008 9:32 pm |
|
|
Post your program that flashes an LED.
The program must be complete. It must have the #include, #fuses,
and #use delay statements, and a main(). It must compile with no errors. |
|
|
drdelphi
Joined: 22 Apr 2007 Posts: 22 Location: Romania
|
|
Posted: Wed Sep 17, 2008 11:43 pm |
|
|
you can try to enable both PUT (power up timer) and BOR (brown out reset).
putting a 100nF decoupling capacitor between VDD and VSS also might help.
good luck |
|
|
kjrudko
Joined: 10 Feb 2009 Posts: 1
|
|
Posted: Wed Feb 25, 2009 2:36 pm |
|
|
The 12F675 and 12F629 are one of the PICs that has a reset latching problem. The power supply must be very clean for it to run right. If you use a 5V regulator, the problem usually goes away, but if you are hooking up 5V directly, then transient voltages on the ms scale can cause the chip to lock up. The best fix is to use a decoupling capacitor with a voltage regulator or a small value resistor in series with the power supply. |
|
|
|