Searching \ for '[PIC] strange reset behaviour of 12f629' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'strange reset behaviour of 12f629'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] strange reset behaviour of 12f629'
2009\04\06@221437 by jim

flavicon
face
I'm having some troubles getting a pic12f629 to start properly. The strangest part about it is in the batch I have 2 pics whose instruction at 3FFF is:
sublw xx
works fine. All the ones with the proper instruction retlw xx have reset problems. The power supply isn't excessively slow. The MCLR pin is held high with a 10K
resistor, The BOE and Power up Timer flags are set as well as external MCLR . Any idea why the PICs with the sublw instruction at 3FFF start properly while the others
don't?
Thanks,
Jim


2009\04\06@233642 by cllow2020

picon face
i've reset problem when using f628A, it use to drive 7 psc 12VDC relays
through NPN transister, what i did was MCLR pin pull up using 1k & pull down
0.1UF . VCC & GND add 0.1UF( as near to it pin). config word WDT OFF.



On Tue, Apr 7, 2009 at 10:13 AM, jim <spam_OUTcinetronTakeThisOuTspampassport.ca> wrote:

{Quote hidden}

> -

2009\04\07@040451 by Alan B. Pearce

face picon face
>All the ones with the proper instruction retlw xx have reset problems.

Are you sure that should be a retlw instruction? I thought there are some
devices with the OSCTUNE value at the highest address that used a movlw
instruction at that address, and then rolled around to address 0.

Use of the retlw instruction implies a call to the highest address, which
isn't always possible as it implies making sure page bits are set correctly
first.

2009\04\07@043953 by Jinx

face picon face
> >All the ones with the proper instruction retlw xx have reset problems.
>
> Are you sure that should be a retlw instruction?

All my 12F675 (same datasheet as the 629) projects have retlw, as per
the datasheet, at 0x3ff for

bank1
call 0x3ff
movwf osccal

If the call 0x3ff isn't used you'd think it would be irrelevant what is
there

If it is used and there's a sublw then you'd expect all kinds of wraparound
loops or stack problems

2009\04\07@081246 by Xiaofan Chen

face picon face
On Tue, Apr 7, 2009 at 4:04 PM, Alan B. Pearce <.....Alan.B.PearceKILLspamspam@spam@stfc.ac.uk> wrote:
>>All the ones with the proper instruction retlw xx have reset problems.
>
> Are you sure that should be a retlw instruction? I thought there are some
> devices with the OSCTUNE value at the highest address that used a movlw
> instruction at that address, and then rolled around to address 0.
>

It should be a retlw xx (34xx). You call 0x3ff and then move it to
OSCCAL for PIC12F629/12F675/PIC16F630/PIC16F676.

Xiaofan

2009\04\07@081629 by Xiaofan Chen

face picon face
On Tue, Apr 7, 2009 at 10:13 AM, jim <cinetronspamKILLspampassport.ca> wrote:
> I'm having some troubles getting a pic12f629 to start properly.
> The strangest part about it is in the batch I have 2 pics whose
> instruction at 3FFF is:
> sublw xx
> works fine. All the ones with the proper instruction retlw xx have
> reset problems.

A bit strange. Are you using internal RC oscillator? Have you
followed the following example code from Microchip?

C:\Program Files\Microchip\MPASM Suite\Template\Object\12F675TMPO.asm
;------------------------------------------------------------------------------
; OSCCAL RESTORE (not required if internal OSC is not used)
;------------------------------------------------------------------------------

       errorlevel -302
       BSF     STATUS,RP0    ; set file register bank to 1
       CALL    0x3FF         ; retrieve factory calibration value
       MOVWF   OSCCAL        ; update register with factory cal value
       BCF     STATUS,RP0    ; set file register bank to 0
       errorlevel +302

You can try this and see if it helps.

Xiaofan

2009\04\07@094348 by jim

flavicon
face



{Quote hidden}

Thanks everyone, this is a strange one indeed. Yes definitely on the two
pics that work it is a sublw instruction not retlw in the 3FFF location.
I am not however doing the OSCCAL Restore routine as shown above so not
sure how it would affect anything. When I do the OSCCAL Restore on  the
PICS with retlw in 3FFF it doesn't help the reset problem. Very
strange..
jim
>
> Xiaofan

2009\04\07@104935 by Bob Axtell

face picon face
About 18 months ago, I had reset problems with PIC12F629 and 'F675.
The problem was
somewhat complex, but had nothing to do with the RETLW  xx at 0x3ff.

My problem was that the brownout detector was not working right, and I
had to codeup a
workaround. The brownout detector was acting just like the brownout
detector of another chip (I think the 16F628A), and the same
workaround worked for the PIC12F629 as well.

I forgot the exact problem, but I KNOW I posted the problem on the
PIClist. Let's try to find it
Mr Pierce helped me catch the problem .

--Bob

On Mon, Apr 6, 2009 at 7:13 PM, jim <EraseMEcinetronspam_OUTspamTakeThisOuTpassport.ca> wrote:
> I'm having some troubles getting a pic12f629 to start properly. The strangest part about it is in the batch I have 2 pics whose instruction at 3FFF is:
> sublw xx
> works fine. All the ones with the proper instruction retlw xx have reset problems. The power supply isn't excessively slow. The MCLR pin is held high with a 10K
> resistor, The BOE and Power up Timer flags are set as well as external MCLR . Any idea why the PICs with the sublw instruction at 3FFF start properly while the others
> don't?
> Thanks,
> Jim
>
>
> -

2009\04\07@105654 by Tamas Rudnai

face picon face
On Tue, Apr 7, 2009 at 9:04 AM, Alan B. Pearce <Alan.B.Pearcespamspam_OUTstfc.ac.uk>wrote:

> Are you sure that should be a retlw instruction? I thought there are some
> devices with the OSCTUNE value at the highest address that used a movlw
> instruction at that address, and then rolled around to address 0
>

That is with the baseline ones. With those the POR starts with the highest
number of address by filling all 1s into the PC, then it rolls over to the
address 0.

Tamas
--
http://www.mcuhobby.com

2009\04\07@110803 by Alan B. Pearce

face picon face
>My problem was that the brownout detector was not working right,
>and I had to codeup a workaround. The brownout detector was acting
>just like the brownout detector of another chip (I think the 16F628A),
>and the same workaround worked for the PIC12F629 as well.
>
>I forgot the exact problem, but I KNOW I posted the problem on the
> PIClist. Let's try to find it
>
>Mr Pierce helped me catch the problem .

Hmm, I seem to remember that, IIRC I saw the errata for another chip than
the one Bob was using that had symptoms very much like he described, so I
pointed him at the errata, and I think it gave a workaround. The errata for
his chip did not list the problem.

2009\04\07@112034 by Bob Axtell

face picon face
That's it, Alan.Sorry I spelled your name wrong.

The reason why I mention it is that it is possible that some stocks of
devices might still
have that problem at some distributors.

--Bob A.

On Tue, Apr 7, 2009 at 8:08 AM, Alan B. Pearce <@spam@Alan.B.PearceKILLspamspamstfc.ac.uk> wrote:
{Quote hidden}

> -

2009\04\07@130810 by jim

flavicon
face


On Tue, 2009-04-07 at 16:08 +0100, Alan B. Pearce wrote:
> >My problem was that the brownout detector was not working right,
> >and I had to codeup a workaround. The brownout detector was acting
> >just like the brownout detector of another chip (I think the 16F628A),
> >and the same workaround worked for the PIC12F629 as well.
> >
> >I forgot the exact problem, but I KNOW I posted the problem on the
> > PIClist. Let's try to find it
> >
> >Mr Pierce helped me catch the problem .
>
> Hmm, I seem to remember that, IIRC I saw the errata for another chip than
> the one Bob was using that had symptoms very much like he described, so I
> pointed him at the errata, and I think it gave a workaround. The errata for
> his chip did not list the problem.

I found the problem, though it doesn't explain why the chips with sublw
at 3FFF always worked. I was initializing my interrupts before I did an
EEPROM read. Moving the Interrupts to after the EEPROM read solved the
problem. Thanks for all the help. While there is still a bit of a
mystery here, I got the chips with the retlw at 3FFF to work properly.
Jim
>

2009\04\07@154857 by Jinx

face picon face
> I was initializing my interrupts before I did an EEPROM read.
> Moving the Interrupts to after the EEPROM read solved the
> problem

Jim, if it's any consolation I've had and reported the same sort of
thing. Not with interrupts and EEPROM as in your case but some
chips just won't work if the initialisation isn't done in a particular
order. And that's not in the datasheet

I've found enough buggy little things with PICs, that have wasted
many many many hours. Which I'd love to send Microchip a bill
for. I'll be honest and say my trust in PICs is waning. Too many
products, too many revisions, too slow to document

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...