Home › Forums › Microcontrollers › PIC Microcontroller › timer in pic18f This topic has 1 reply, 2 voices, and was last updated 10 years, 2 months ago by Ligo George. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts October 1, 2014 at 12:08 pm #8867 PNParticipant Hi, can you guide me on use of timers of pic? actually what i have to do is, for 8sec time, i have to average values from a sensor. how do i increment count every sec? will the following method work instead of timers? for(count=0;count<= 8;count++) { do(something); delay_ms(1000); } October 3, 2014 at 1:11 pm #9359 Ligo GeorgeKeymaster You may solve it by incrementing a variable as above…. but the best solution is to use PIC’s internal timer module.. eg : //Start Timer for(a=read_timer;a< a_value;) { //Do Something } //Stop Timer You can use Timer0 module… Read the Timer0 section in the datasheet. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in The reCAPTCHA verification period has expired. Please reload the page. Log In