Mercurial > public > hwos_code
view src/wait.asm @ 472:4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
NEW: Show battery type in information menu (T0:1.5V AA, T1:3.6V AA, T2:3.6V/0.8A LiIon, T3:Internal 18650, T4:Internal 16650)
author | heinrichsweikamp |
---|---|
date | Sun, 18 Dec 2016 18:20:39 +0100 |
parents | 653a3ab08062 |
children | b455b31ce022 |
line wrap: on
line source
;============================================================================= ; ; File wait.asm ; ; Wait routines ; ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. ;============================================================================= ; HISTORY ; 2004-01-31 : [chsw] Initial version. ; 2007-05-11 : Updated (OSTC code). ; 2011-10-18 : [mH] Timings tested with oscilloscope #include "hwos.inc" basic CODE ; ========================================================== ; WAIT 1 MILLISECOND (Not exact: 1,008ms +/- 30,5µs + worst case ISR latency) ; ========================================================== global WAITMSX WAITMSX movwf waitms_temp WAITMSX2 setf TMR5H movlw .255-.32 ;32 x 31,5µs = 1,008ms movwf TMR5L bcf PIR5,TMR5IF ; Clear flag WAITMSX3 btfss PIR5,TMR5IF bra WAITMSX3 ; Wait loop decfsz waitms_temp,F bra WAITMSX2 return ;============================================================================= END