View previous topic :: View next topic |
Author |
Message |
Chen Guest
|
Programmable auto-reload Timer output? |
Posted: Thu Feb 06, 2003 12:38 pm |
|
|
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
|
Re: Programmable auto-reload Timer output? |
Posted: Thu Feb 06, 2003 12:52 pm |
|
|
:=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? |
Posted: Thu Feb 06, 2003 1:18 pm |
|
|
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? |
Posted: Thu Feb 06, 2003 1:40 pm |
|
|
:=:=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
|
Re: Programmable auto-reload Timer output? |
Posted: Mon Feb 10, 2003 2:07 am |
|
|
:=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 |
|
|
|