how to use the option_reg bit 2-0

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
saravana_3
Posts: 61
Joined: Thu Dec 20, 2007 4:23 pm
Location: singapore

how to use the option_reg bit 2-0

Post by saravana_3 »

hi friends,
what is the purpose of the prescalar,
how to set the Option_reg bits 2 to 0 of the 16f84,
by seting this how can control the TMR0
thanks
saran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: how to use the option_reg bit 2-0

Post by Benj »

Hello Saran

The prescalar divides the clock speed to allow the hardware timers to run at different speeds with a fixed overall clock speed.

You can modify the prescalar by writing to the option register.

For more information please refer to the Timer0 portion of the device datasheet.

Post Reply