
Originally Posted by
Brock
Speaking of assembly, is it possible to modify the PBPPIC18.LIB file (shiftout routine)?
I'm sure it is possible. If you do a Find... on the term "ifdef SHIFTTOGGLE_USED", you should be able to find the right section.
Code:
ifdef SHIFTTOGGLE_USED
LIST
shifttoggle
movf RM2, W ; Get clock bit mask
xorwf INDF1, F ; Toggle clock
ifdef SHIFT_PAUSEUS
movf R0, W ; Save shift data
movwf R1
movf R0 + 1, W
movwf R1 + 1
movlw (SHIFT_PAUSEUS) >> 8 ; Slow down transfer
movwf R0 + 1
movlw low (SHIFT_PAUSEUS)
call PAUSEUSL
movf R1, W ; Restore shift data
movwf R0
movf R1 + 1, W
movwf R0 + 1
movf RM2, W ; Get clock bit mask
PAUSEUS_USED = 1
else
nop ; Slow down transfer
if (OSC > 4)
bra $ + 2
endif
if (OSC > 8)
bra $ + 2
endif
if (OSC > 12)
bra $ + 2
endif
if (OSC > 16)
bra $ + 2
endif
if (OSC > 20)
bra $ + 2
endif
if (OSC > 25)
bra $ + 2
bra $ + 2
endif
if (OSC > 33)
bra $ + 2
bra $ + 2
endif
if (OSC > 40)
bra $ + 2
endif
endif
xorwf INDF1, F
return
NOLIST
endif
The bold text is the stuff you need to tweek. If I were doing it, I would start with the "if (OSC > XX)...endif" statement which would be just below the OSC value your using (if (OSC > 16)), comment it out (add a semi-colon), and see how it runs. Then do the same for the next "if (OSC > XX)...endif", and so on. You coud even remove the "nop ; Slow down transfer".
Don't see why it wouldn't work. But the suggestion comes with all the standard disclaimers
.
Save a copy of the original file if you plan on doing this.
Just had to say it.
Let us know how it goes!
Steve
Bookmarks