A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
crazy pic ?? - Vincent - Apr 5 3:41:00 2005
Message
Hello
all,
I have a pic16628
project using a switch that trigger an electro pneumatic valve.
The program runs well
for many days and sometimes, on some boards... You wake it up and It goes
crazy !!!!
I
explain.
The pic is always
asleep. the MCLR PIN is tied directly to +5v (no pull up resistor, juste a direct
connection).
the normal behaviour is
: 1 action on the switch trigger the valve once..
When the prog goes mad,
it gives : 1 action trig the valve many times, 3, 4 or 5 or fully
automaticaly.
My code has subroutines
forsingle shot, 3 times in a row, or full auto (repeatade trigger until you release
the switch) but that all.
Everything goes like if
the proc is damage or something. Can the RAM or the flash be damage and lead to such
behaviour ?
I program the PIC trough ICSP with a JDM PG1
programmer.
The PIC PG1 doc says
that one should not connect the ICSP programmer when the MCLR is tied directly to +5.
Since the PG1 tied MCLR to +13v during programming.
Could this be the cause
of my problems ??
Any help or comment
would be great !!
I am totaly losed
!!
Thank in
advance,
Vince

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: crazy pic ?? - Leon Heller - Apr 5 4:06:00 2005
Message
----- Original Message -----
From: Vincent
To: p...@yahoogroups.com
Sent: Tuesday, April 05, 2005 8:41 AM
Subject: [piclist] crazy pic ??
Hello
all,
I have a pic16628
project using a switch that trigger an electro pneumatic valve.
The program runs well
for many days and sometimes, on some boards... You wake it up and It goes
crazy !!!!
I
explain.
The pic is always
asleep. the MCLR PIN is tied directly to +5v (no pull up resistor, juste a direct
connection).
the normal behaviour is
: 1 action on the switch trigger the valve once..
When the prog goes mad,
it gives : 1 action trig the valve many times, 3, 4 or 5 or fully
automaticaly.
My code has subroutines
forsingle shot, 3 times in a row, or full auto (repeatade trigger until you release
the switch) but that all.
Everything goes like if
the proc is damage or something. Can the RAM or the flash be damage and lead to such
behaviour ?
I program the PIC trough ICSP with a JDM PG1
programmer.
The PIC PG1 doc says
that one should not connect the ICSP programmer when the MCLR is tied directly to +5.
Since the PG1 tied MCLR to +13v during programming.
Could this be the cause
of my problems ??
Any help or comment
would be great !!
I am totaly losed
!!
It could be spikes from the valve solenoid that are causing the problem, or
something else, if it is mains-powered. Try using a transient suppressor (like an AVX
Transguard) on the 5V supply to the PIC. I always use them on anythingI design, that is
connected to the mains.
Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: crazy pic ?? - rtstofer - Apr 5 11:25:00 2005
If you tied MCLR' to +5 and then tried to do ICSP, I'm not sure how
it would come out. Maybe the flash did't program properly? Maybe
at some operating condition it doesn't read correctly?
Of course, you could always be using Low Voltage Programming which
might work properly.
I would use a pull-up resistor on MCLR'.
--- In piclist@picl..., "Leon Heller" <leon.heller@d...>
wrote:
> Message----- Original Message -----
> From: Vincent
> To: piclist@picl...
> Sent: Tuesday, April 05, 2005 8:41 AM
> Subject: [piclist] crazy pic ??
> Hello all,
>
> I have a pic16628 project using a switch that trigger an electro
pneumatic valve.
>
> The program runs well for many days and sometimes, on some
boards... You wake it up and It goes crazy !!!!
>
> I explain.
>
> The pic is always asleep. the MCLR PIN is tied directly to +5v
(no pull up resistor, juste a direct connection).
> the normal behaviour is : 1 action on the switch trigger the
valve once..
>
> When the prog goes mad, it gives : 1 action trig the valve many
times, 3, 4 or 5 or fully automaticaly.
>
> My code has subroutines forsingle shot, 3 times in a row, or
full auto (repeatade trigger until you release the switch) but that
all.
>
> Everything goes like if the proc is damage or something. Can the
RAM or the flash be damage and lead to such behaviour ?
>
> I program the PIC trough ICSP with a JDM PG1 programmer.
> The PIC PG1 doc says that one should not connect the ICSP
programmer when the MCLR is tied directly to +5. Since the PG1 tied
MCLR to +13v during programming.
>
> Could this be the cause of my problems ??
>
> Any help or comment would be great !!
> I am totaly losed !!
>
> It could be spikes from the valve solenoid that are causing the
problem, or something else, if it is mains-powered. Try using a
transient suppressor (like an AVX Transguard) on the 5V supply to
the PIC. I always use them on anythingI design, that is connected to
the mains.
>
> Leon
> --
> Leon Heller, G1HSM
> http://www.geocities.com/leon_heller

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
RE: crazy pic ?? - Vincent - Apr 5 11:34:00 2005
Message
Generaly speaking, how would one diagnose that a PIC is damaged
?
What
would be (or is) the result of connecting the +5volt directly to the +13V for the PIC
?
Can
some RAM location be destroyed, can some flash location be destroyed too
?
In such
case, what would be the symptoms ?
Imagine
a return instruction is detroyed, would the program execution continue and ignore an
invalide instruction ?
Therefor, the return is "jumped" and the next instruction performed. The stack
pointer will therfore be fill up with an invalide address.. And so on
?
Has
anyone any experience on that topic, the symptoms and the associated behaviours, like a
"pic going crazy"!!!
Thank
for your help !!
Vince
PS : Rtstopher did post in between... Yes ! actualy, I have
modified my design, so that there is a 33k pull up now on the MCLR, so that 33K isolate
the 5v and the 13v during HVP.... I hope it will avoid some later
problems...
but... I am still VERY interrested with your opinion on the
topic !!!!!

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )