OSDN Git Service

[IDLE] Swap write order of TMR0[H|L].
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 12 Jun 2013 16:40:01 +0000 (01:40 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 12 Jun 2013 16:40:01 +0000 (01:40 +0900)
idle.c

diff --git a/idle.c b/idle.c
index 8f4a3ac..59738cc 100644 (file)
--- a/idle.c
+++ b/idle.c
@@ -59,8 +59,8 @@ void idle(unsigned int initial)
    /* Set TMR0 for interrupt*/
    /* Pre-scaler: 1/16, PSA=0(ON), TOSE=0, T0CS=0(INTERNAL), T08BIT=1(8bit), TMR0ON=1(START) */
    contword = _T0PS0 | _T0PS1 | _T08BIT | _TMR0ON; // _T0PS2
-   TMR0H = initial >> 8;
    TMR0L = initial & 0xff;
+   TMR0H = initial >> 8;
    T0CON = contword;
    
    Sleep();