Searching \ for '[PIC]: Subroutin for a pause' 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/devices.htm?key=pic
Search entire site for: 'Subroutin for a pause'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Subroutin for a pause'
2001\01\19@143522 by Christian Vlaskowits

picon face
Hi,

I'm new to pic programing, and I've encouterd a problem, doing a pause.
Right now I'm using the decreas command to make a short pause, this is the
subroutin;


wait
      movlw   200             ; load count1 with decimal 200
      movwf   count1
d1      movlw   200             ; load count2 with decimal 200
      movwf   count2

d2      decfsz  count2,1        ; decrement and skip next line if zero
      goto    d2              ; if not zero
      decfsz  count1,1        ; decrement count1 if count2 is zero
      goto    d1              ; do inside loop again if count2 nz
      retlw   00

But after calling it in a program a couple of times, the pause gets shorter
and shorter. Have I maybe forgotten to reset or clear something? Or Does
anybody know a better way of initiating a pause.

Any help is very appreciated


Best Regards
/Christian

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\01\22@025658 by Ian Rozowsky

flavicon
face
Is your watchdog timer enabled? If so, you may need a CLRWDT in there to
prevent the PIC from resetting.

Ian Rozowsky
Engineering Manager
Centurion Systems
P.O. Box 506
Cramerview 2060
South Africa
Tel   : +27-11-462-4499
Fax   : +27-11-704-3412
e-mail: spam_OUTrozTakeThisOuTspamcentsys.co.za
web: http://www.centsys.co.za

{Original Message removed}

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