pic changing program speed ?
David Cary email (remove spam text)
I believe that
Roman Black <EZY.NET.AU> on 2001-04-04 04:06:30 AM fastvid
meant to write something like this:
;= waitXX100msec -> long time delay routine (with clrwdt!) =
waitXX100msec movwf GreatwaitReg ; store the waiting
clrf count_inner ; prepare lsb
decfsz count_inner ; dec and loop 256 times
goto loop_inner ; 1+2 inst x 256 (delay period)
clrwdt ; give the dog a bone
decfsz GreatwaitReg ; dec outer loop counter
goto loop_outer ; 1+1+2 inst x value of
; (delay period)
retlw 0 ; return
; You can add a third (or fourth) loop with no effort, and
; for varying timings you can always load the inner loop
; vars with a value instead of clearing them (which=256).
; My personal pref with stepper motors is to set the inner
; loop value so that when Greatvalue==256 I get the slowest
; speed I need. You then get the best speed range possible
; just by varying the Greatvalue byte.
; -- Roman Black
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the