X-Git-Url: http://www.average.org/gitweb/?p=sensor-light.git;a=blobdiff_plain;f=msp430%2Fmain.c;h=53ee457adf1da057d276a1f2bf221a9700be1a14;hp=fc80ae9b04fdbeeb4e180960ee4b055c34d745db;hb=HEAD;hpb=662310e4999c78fb786068643f100e76b9294c68;ds=sidebyside diff --git a/msp430/main.c b/msp430/main.c index fc80ae9..53ee457 100644 --- a/msp430/main.c +++ b/msp430/main.c @@ -6,8 +6,8 @@ enum {ev_btn1 = 0, ev_btn2, ev_pir1, ev_pir2, ev_tmr, ev_adc, ev_MAX}; #define PWM_ORDER 10 #define PWM_HALF 5 -#define LIGHT_THRESHOLD 800 -#define TIME_ON 160 +#define LIGHT_THRESHOLD 900 +#define TIME_ON 320 #ifdef ADCSC /* Let us hope that this is a "new" model */ # define BIT_RL BIT0 @@ -58,7 +58,7 @@ int main(void) P2DIR &= ~(BIT4|BIT5); // PIR Sensors P2OUT &= ~(BIT4|BIT5); // Pull down - P2REN |= BIT4|BIT5; // Enable pull-down + P2REN &= ~(BIT4|BIT5); // Disable pull P2IES &= ~(BIT4|BIT5); // INT on Lo->Hi edge P2IE |= BIT4|BIT5; // INT enable