diff --git a/pic/318LPW1K-L/318LPW1K-L.c b/pic/318LPW1K-L/318LPW1K-L.c index d1d52d3..8d6171b 100644 --- a/pic/318LPW1K-L/318LPW1K-L.c +++ b/pic/318LPW1K-L/318LPW1K-L.c @@ -58,20 +58,17 @@ uint16_t __at(_CONFIG) __CONFIG = _CPD_OFF & // no data code protect // 0x2100 comes from the PIC12F629 Memory Programming document __code uint8_t __at(0x2100) EEPROM[] = {0xc9, 0x17, 0xc2, 0x00}; -/* set timer in ms */ -#define TICKS_PER_MS 145UL // the number of timer 1 ticks to wait for 1ms, using the internal 4MHz clock and a prescaler of 8, and hand tuning - void timer_1ms() { TMR1ON = 0; // disable timer 1 (to write value safely) - TMR1L = (0xffff-1*TICKS_PER_MS); // set time - TMR1H = (0xffff-1*TICKS_PER_MS)>>8; // set time + TMR1L = 0x6e; // set time (tuned per hand) + TMR1H = 0xff; // set time TMR1ON = 1; // start timer 1 } void timer_2ms() { TMR1ON = 0; // disable timer 1 (to write value safely) - TMR1L = (0xffff-2*TICKS_PER_MS); // set time - TMR1H = (0xffff-2*TICKS_PER_MS)>>8; // set time + TMR1L = 0x22; // set time (tunef per hand) + TMR1H = 0xff; // set time TMR1ON = 1; // start timer 1 }