Maker Pro
Maker Pro

PIC12F629 problem

D

DesignElect

Jan 1, 1970
0
Hello,

I'll try to explain what's happening as simply as possible:

I've designed a fairly simple circuit based around a PIC12F629.

It is configured as follows;

GP0=digital O/P
GP1=Analogue comparator input (Comparator mode 04h)
GP2=Digital O/P
GP3=digital I/P
GP4=digital I/P
GP5=digital I/P
Internal voltage reference set to low voltage 01. Fed internally to CIN+.
All Interrupts disabled, Internal oscillator, internal MCLR, pull-ups enabled
on I/Ps except GP3.
What happens is that the circuit works fine, but only when GP3 is pulled low.
When it goes high, it appears to generate a reset, fairly regularly, but mostly
at a point in the program just following reading the comparator status bit.
(ie, the program re-starts). I have ran the program on the simulator and it
goes fine. (It's not supported by my emulator)

Has anyone come across this problem before? I am starting to think that there
is a problem with this chip.... or does anyone know if it's possible that a
problem with the programmer could cause something like this.

Many thanks for any help,

Peter
 
B

Brian Logan

Jan 1, 1970
0
Could it be the watchdog that's resetting it? Maybe you're setting the config on
the PIC when you program it, but not doing so on the simulator?
 
B

Brian Logan

Jan 1, 1970
0
It's definitely disabled. And I can't see anywhere it can be re-enabled in the
program.

And it's a very specific problem because I have used this chip before and not
had any problems at all.

I notice GP3 is also the Vpp pin. Is it possible you are allowing this pin to go
high enough to enter programming mode?

How about decoupling? I know that the power needs VERY closely positioned
decoupling for the internal oscillator to work reliably.
 
W

Wouter van Ooijen

Jan 1, 1970
0
Could it be the watchdog that's resetting it?
It's definitely disabled. And I can't see anywhere it can be re-enabled in the
program.

If you think that is how the watchog works better read the datasheet
(again).



Wouter van Ooijen

-- ------------------------------------
http://www.voti.nl
PICmicro chips, programmers, consulting
 
D

DesignElect

Jan 1, 1970
0
It's definitely disabled. And I can't see anywhere it can be re-enabled in
the

If you think that is how the watchog works better read the datasheet
(again).

I only wrote that for clarity
 
D

DesignElect

Jan 1, 1970
0
I notice GP3 is also the Vpp pin. Is it possible you are allowing this pin to
go
high enough to enter programming mode?

That seems to have been the problem. Presumably, it can't have been going into
reset mode through a MCLR as it's set to internal, that only leaves programming
mode.
A bit extra decoupling has sorted it out.

Many thanks.

Pete
 
Top