[SOLVED] How to run a loop for a certain amount of time?

Status
Not open for further replies.
Re: How to run a loop for a certain amount time?

I tried everything but didn't work, I don't know what is the mistake.
 

Re: How to run a loop for a certain amount time?

You have set RA4/T0CKI as timer0 clock source in OPTION_REG. I guess you want an internal clock source?
 

Re: How to run a loop for a certain amount time?

No I have set the T0CS to use the internal cycle clock.
 

Re: How to run a loop for a certain amount time?

No I have set the T0CS to use the internal cycle clock.

How?
I'm referring to
Code:
OPTION_REG = 0x3A;

OPTION_REG
bit 5 T0CS: TMR0 Clock Source Select bit
1 = Transition on RA4/T0CKI pin
0 = Internal instruction cycle clock (CLKO)
 

Re: How to run a loop for a certain amount time?

No I have set the T0CS to use the internal cycle clock.

if i look on datasheet 5.3 page 48
you are wrong as FvM told you before..
OPTIONREG must be 0x0A
so T0CS=0 internal instruction cycle and Prescaler=1/128
 


Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…