Thread: Using Timers
View Single Post
  #9   Spotlight this post!  
Unread 30-01-2006, 08:42
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Using Timers

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,
__________________