Quote:
|
Originally Posted by tribotec_ca88
I've included timers.h in all c files i'm using timers in...and this is what i ended up writing to initialize Timer1:
T1CONbits.T1CKPS0 = 1; // 1:8 Prescale (clock=1.25MHz/each tick=800ns)
T1CONbits.T1CKPS1 = 1;
T1CONbits.TMR1CS = 0; // Internal clock
TMR1H = 0x85; // Timer1's most significant byte
TMRIL = 0xED; // Timer1's least significant byte
T1CONbits.TMR1ON = 1; // Timer1 set as on
IPR1bits.TMR1IP = 0; // Sets interrupt as low priority
PIR1bits.TMR1IF = 0; // Overflow flag
PIE1bits.TMR1IE = 1; // Timer1 interrupt
INTCONbits.GIEL = 1; // Low priority interrupts OK
but for some reason i still get a few errors related to the TMR1H and TMR1L variables stating:
C:\NossoCodigo\Code_26Jan\user_routines.c:168:Erro r [1105] symbol 'TMRIL' has not been defined
C:\NossoCodigo\Code_26Jan\user_routines.c:168:Erro r [1101] lvalue required
I understand they haven't been defined but where exactly would I define them (and as what?!) ?
thanks, any help at all would be greatly appreciated!!
|
it looks like you're using "TMRIL" instead of "TMR1L"?
sorry if I'm mistaken,