Searching \ for 'Erratic PC increment through interrupt' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'Erratic PC increment through interrupt'.

Truncated match.
PICList Thread
'Erratic PC increment through interrupt'
1996\04\26@074704 by Wolfram Liebchen

flavicon
face
Does anyone know, if there is danger of erratic PC increment
caused by an interrupt during a MOVWF PCL ?
The application note AN556, concerning table reads / computed GOTO
on a PIC 16Cxx device, says, that one has to disable interrupts to
prevent the computed GOTO from jumping one instruction too far.

The data book (at least for PIC 17C42) says, that increment of PC
is inhibited after GOTO, CALL, RETURN... and MOVWF PCL. So then, there
should be no danger?
Or even worse, an interreupt during a normal GOTO could also cause a
false jump ?!?

I would like to hear, if anyone has tested for this problem.

TIA

Wolfram


+-----------------------------------------------+
! Wolfram Liebchen, spam_OUTliebchenTakeThisOuTspamipserv.ffo.fgan.de !
!      Forschungsinstitut fuer Optik            !
!      Schloss Kressbach                        !
!      D-72072 Tuebingen                        !
!      Tel: +49 (0)7071 / 709-158               !
!      Fax: +49 (0)7071 / 709-270   (G3 / G4)   !
+-----------------------------------------------+

1996\04\26@090603 by myke predko

flavicon
face
>Does anyone know, if there is danger of erratic PC increment
>caused by an interrupt during a MOVWF PCL ?
>The application note AN556, concerning table reads / computed GOTO
>on a PIC 16Cxx device, says, that one has to disable interrupts to
>prevent the computed GOTO from jumping one instruction too far.
>
>
>Wolfram

Wolfram, my ownly comment would be that interrupts may be disabled during a
"movwf PCL", but I believe the command that is normally used in
tables/computed jumps is "addwf PCL,f" (which is not in your list of
interrupt disabling commands).

I think I have lucked out in my applications by doing table reads _before_
interrupts are enabled and inside interrupt handlers (in which interrupts
are disabled).

I will definitely add this to my list of "things to avoid".

Myke
Myke

"We're Starfleet officers, weird is part of the job."

Capt. Catherine Janeway

1996\04\26@114316 by Scott Dattalo

face
flavicon
face
Wolfram Liebchen wrote:
>
> Does anyone know, if there is danger of erratic PC increment
> caused by an interrupt during a MOVWF PCL ?
> The application note AN556, concerning table reads / computed GOTO
> on a PIC 16Cxx device, says, that one has to disable interrupts to
> prevent the computed GOTO from jumping one instruction too far.
>
> The data book (at least for PIC 17C42) says, that increment of PC
> is inhibited after GOTO, CALL, RETURN... and MOVWF PCL. So then, there
> should be no danger?
> Or even worse, an interreupt during a normal GOTO could also cause a
> false jump ?!?
>
> I would like to hear, if anyone has tested for this problem.
>

The information in AN556 is incorrect. You do not need to disable interrupts
in computed GOTOs.

Scott


P.S.
Andy W., I just checked your PIC question 5. It still references AN576.

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