Hi, i need to use the timer1 on my 16f76 by interrupt. the pic runs at 18,432 MHZ.i want to realise an interrupt every about 1 second. what code do i have to put in my program?,could you please post it? sorry, i'm new in Pic programming! thanks
valemike Guest
Posted: Fri Aug 27, 2004 2:55 pm
Look at ex_stwt1.c
It uses Timer1 interrupts.
You would just need to redefine #INTS_PER_SECOND to:
18432000 / (4*4*65536) = 17.578
So choose 17 or 18 to be your #INTS_PER_SECOND definition. Unfortunately, 17.578 smack in the middle between 17 and 18, so choose your pick.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum