Darrel,
You forget that your 18F uses it's hardware multiplier. The 16 series does not have one and needs to do a software multply, that's a HUGE difference. I'm a little surprised that the ">>2" takes that much longer than ">>1". I suspected around 10-20 cycles difference, not 60. It should take a little longer since it uses a looped code rather than the straight code ">>1" produces. Strange, perhaps i'll look into it sometime ............ or not.
Henrik,
You should make sure that the variables reside in the same memorybank. You do that by using the "BANK" statement. If you don't it will be slower since the pic needs to switch banks between each statement. Declare your variables like .....
Code:
Dummy1 VAR WORD BANK0
Delay VAR WORD BANK0
OldPulseTime VAR WORD BANK0
/Ingvar
PS. Henrik, vart skall jag skicka fakturan
DS.
Bookmarks