CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Programmable auto-reload Timer output?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Chen
Guest







Programmable auto-reload Timer output?
PostPosted: Thu Feb 06, 2003 12:38 pm     Reply with quote

I am using PIC18F8620, and I need a varible clock to pace my operation.

Is there a programmable auto-reload timer output? (up to MHz range)
___________________________
This message was ported from CCS's old forum
Original Post ID: 11365
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: Programmable auto-reload Timer output?
PostPosted: Thu Feb 06, 2003 12:52 pm     Reply with quote

:=I am using PIC18F8620, and I need a varible clock to pace my operation.
:=
:=Is there a programmable auto-reload timer output? (up to MHz range)

If I get your question right.
Concider doing this from main;
Use the internal 16 bit timer

while(true)
{ if(timer overflow interupt flag is set)
{ Set_timer(variable time)
Clear timer interupt flag
Perform what oprtations you must
}
}

This does not require using an interupt. It only checks the interupt flag. You basicly gate your operatios to a time interval that is variable with the value you load into the timer.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11366
Chen
Guest







Re: Programmable auto-reload Timer output?
PostPosted: Thu Feb 06, 2003 1:18 pm     Reply with quote

Thanks for your suggestion, but

I prefer no PIC is involved at all after the clock started

Also, your approach seems to change the clock a little depending on when the Set_timer(variable time)is called.



:=If I get your question right.
:=Concider doing this from main;
:=Use the internal 16 bit timer
:=
:=while(true)
:={ if(timer overflow interupt flag is set)
:= { Set_timer(variable time)
:= Clear timer interupt flag
:= Perform what oprtations you must
:= }
:=}
:=
:=This does not require using an interupt. It only checks the interupt flag. You basicly gate your operatios to a time interval that is variable with the value you load into the timer.
___________________________
This message was ported from CCS's old forum
Original Post ID: 11368
Sherpa Doug
Guest







Re: Programmable auto-reload Timer output?
PostPosted: Thu Feb 06, 2003 1:40 pm     Reply with quote

:=:=I am using PIC18F8620, and I need a varible clock to pace my operation.
:=:=
:=:=Is there a programmable auto-reload timer output? (up to MHz range)
:=
:=If I get your question right.
:=Concider doing this from main;
:=Use the internal 16 bit timer
:=
:=while(true)
:={ if(timer overflow interupt flag is set)
:= { Set_timer(variable time)
:= Clear timer interupt flag
:= Perform what oprtations you must
:= }
:=}
:=
:=This does not require using an interupt. It only checks the interupt flag. You basicly gate your operatios to a time interval that is variable with the value you load into the timer.

How about subtracting a fixed value from the timer instead of setting it. Then it can count a few ticks before you poll the flag with no accumulated error.

The only stand-alone chips that I know of that do this are dedicated synthisizer chips which generally work at many MHz and draw lots of power. Look at an AD9853 for example. I briefly looked at it for a project untill I saw it takes 500mA supply current!!!

___________________________
This message was ported from CCS's old forum
Original Post ID: 11370
Richard Slater



Joined: 08 Sep 2003
Posts: 12
Location: Cambridge, UK

View user's profile Send private message Visit poster's website

Re: Programmable auto-reload Timer output?
PostPosted: Mon Feb 10, 2003 2:07 am     Reply with quote

:=I am using PIC18F8620, and I need a varible clock to pace my operation.
:=
:=Is there a programmable auto-reload timer output? (up to MHz range)

Maybe a programmable frequency synthesiser from Cypress is what your looking for? Look under 'Programmable Clocks' on their website. I am currently including their CY22150 in a project, available for a few dollars from Digikey.


Good luck

Richard

Richard
___________________________
This message was ported from CCS's old forum
Original Post ID: 11467
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group