#include "commondef.h"
#include "ioports.h"
#include <signal.h>
+#include "backlight.h"
unsigned char statecount;
}
}
-
-void TMR3_set(void)
-{
- TMR3L = 1000 & 0xff;
- TMR3H = 1000 >> 8;
- T3CONbits.TMR3ON = 1;
-}
-
-void io_intcountinit(void)
-{
- statecount = 0;
- T3CON = 0b10001100; // TMR3 = 16bit, CCP is not use TMR3, Prescaler=1:2(1uS)
- // DO-not-use SYNC, Internal clock, TMR3 temporally off.
- PIR2bits.TMR3IF = 0;
- PIE2bits.TMR3IE = 1;
- IPR2bits.TMR3IP = 0; // Low priority.
- INTCONbits.PEIE = 1;
- RCONbits.IPEN = 0;
- TMR3L = 0;
- TMR3H = 0;
- TMR3_set();
-}
-
-
-
#if defined(pic18f23k22) || defined(pic18f24k22) || defined(pic18f25k22) || defined(pic18f26k22) || \
defined(_18F23K22) || defined(_18F24K22) || defined(_18F25K22) || defined(_18F26K22)
ANSELC = AN_C_VAL;
TRISC = TRIS_C_VAL_O;
// lcd_backlightinit();
-// io_intcountinit();
}
#endif
LATC = 0x00;
TRISC = TRIS_C_VAL_O;
// lcd_backlightinit();
- io_intcountinit();
}
#endif
INTCON3bits.INT2IE = 0;
// lcd_backlightinit();
- io_intcountinit();
}
#else
void keyin_ioinit(void)
LATC = 0x00;
TRISC = TRIS_C_VAL_O;
// lcd_backlightinit();
- io_intcountinit();
}
#endif